Interface Desktop


public interface Desktop
Main Desktop Interface.
  • Method Details

    • getVersion

      String getVersion()
      Returns the version string of the Desktop.
      Returns:
      the version string of the Desktop.
    • getHomeDirectory

      File getHomeDirectory()
      Returns the home directory of the Desktop.
      Returns:
      the home directory of the Desktop.
    • getUniqueID

      int getUniqueID()
      Returns the unique identification of the Desktop.
      Returns:
      the unique identification of the Desktop.
    • getCodebase

      URL getCodebase()
      Returns the codebase of the Desktop.
      Returns:
      the codebase of the Desktop.
    • getSecureCodebase

      URL getSecureCodebase()
      Returns the secure codebase of the Desktop.
      Returns:
      the secure codebase of the Desktop.
    • getLicense

      DesktopLicense getLicense()
      Returns the license of the Desktop.
      Returns:
      the license of the Desktop.
    • getStation

      DesktopStation getStation()
      Returns the station of the Desktop.
      Returns:
      the station of the Desktop.
    • getUser

      DesktopUser getUser()
      Returns the user of the Desktop.
      Returns:
      the user of the Desktop.
    • getConfig

      DesktopConfig getConfig()
      Returns the configuration parameters of the Desktop.
      Returns:
      the configuration parameters of the Desktop.
    • getCompiler

      Compiler getCompiler()
      Returns the expression compiler of the Desktop.
      Returns:
      the expression compiler of the Desktop.
    • createDdeTopic

      DdeTopic createDdeTopic(String topicName) throws Exception
      Creates and returns a new DDE Topic with the supplied name.
      Parameters:
      topicName - the name of the new DDE Topic.
      Returns:
      the new DDE Topic with specified topicName.
      Throws:
      NullPointerException - if topicName is null.
      Exception - if another error occurs.
    • getApplication

      Application getApplication()
      Returns the Application of the Desktop.
      Returns:
      the Application of the Desktop.
    • getPrimaryStage

      Stage getPrimaryStage()
      Returns the primary Stage of the Desktop.
      Returns:
      the primary Stage of the Desktop.
    • getImageCache

      ImageCache getImageCache()
      Returns the ImageCache of the Desktop.
      Returns:
      the ImageCache of the Desktop.
    • showDocument

      void showDocument(String uri)
      Opens the specified URI in a new browser window or tab. The determination of whether it is a new browser window or a tab in an existing browser window will be made by the browser preferences. Note that this will respect the pop-up blocker settings of the default browser; it will not try to circumvent them.
      Parameters:
      uri - the URI of the web page that will be opened in a browser.
      Throws:
      NullPointerException - if uri is null or empty.
    • getServerTime

      long getServerTime()
      Returns the time of the Application Server (milliseconds).
      Returns:
      the time of the Application Server (milliseconds).
    • getServerTimeZone

      TimeZone getServerTimeZone()
      Returns the time zone of the Application Server.
      Returns:
      the time zone of the Application Server.
    • getServerEnvironName

      String getServerEnvironName()
      Returns the environment name of the Application Server.
      Returns:
      the environment name of the Application Server.
    • getServerPageExtension

      String getServerPageExtension()
      Returns the file extension of a page of the Application Server.
      Returns:
      the file extension of a page of the Application Server.
    • getWebServiceLoggerLevel

      Level getWebServiceLoggerLevel()
      Returns the logging level of web service invocations.
      Returns:
      the logging level of web service invocations.
    • setWebServiceLoggerLevel

      void setWebServiceLoggerLevel(Level level)
      Changes the logging level of web service invocations.
      Parameters:
      level - the new logging level of web service invocations.
      Throws:
      NullPointerException - if level is null.
    • initHttpSecurityHeaders

      void initHttpSecurityHeaders(URLConnection urlconn)
      Initialize the HTTP Security Headers of an URLConnection.
      Parameters:
      urlconn - the URL Connection to be initialized.
      Throws:
      NullPointerException - if urlconn is null.
    • initHttpSecurityHeaders

      void initHttpSecurityHeaders(HttpRequest.Builder builder)
      Initialize the HTTP Security Headers of an HttpRequest.Builder.
      Parameters:
      builder - the HTTP Request Builder to be initialized.
      Throws:
      NullPointerException - if builder is null.
    • initWebServicePort

      void initWebServicePort(Object port) throws Exception
      Initialize a web service port.
      Parameters:
      port - the web service port to initialize.
      Throws:
      NullPointerException - if port is null.
      IllegalArgumentException - if the port is invalid.
      Exception - if another error occurs.
    • initWebServicePort

      void initWebServicePort(Object port, URL endpoint) throws Exception
      Initialize a web service port using supplied endpoint.
      Parameters:
      port - the web service port to initialize.
      endpoint - the endpoint of the web service port.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if the port is invalid.
      Exception - if another error occurs.
    • initWebServicePort

      void initWebServicePort(Object port, jakarta.xml.ws.Service service, URL codebase) throws Exception
      Initialize a web service port using supplied service and codebase.
      Parameters:
      port - the web service port to initialize.
      service - the web service associatted with the port.
      codebase - the codebase used to compute the port endpoint.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if the port is invalid.
      Exception - if another error occurs.
    • getNetServerManager

      NetServerManager getNetServerManager() throws Exception
      Returns the Desktop NetServerManager.
      Returns:
      the Desktop NetServerManager.
      Throws:
      IllegalStateException - if not logged in.
      Exception - if another error occurs.
    • listObjectNames

      List<String> listObjectNames(AccessLevel level, ObjectType type, String prefix)
      Returns a list of names of objects with access level, type and prefix.
      Parameters:
      level - the access level of the objects.
      type - the type of the objects that will be listed.
      prefix - the name prefix used to filter the returned names.
      Returns:
      the names of objects saved at specified access level.
      Throws:
      NullPointerException - if an argument is null.
    • readObject

      Object readObject(AccessLevel level, ObjectType type, String name) throws Exception
      Reads an object with the specified access level, type and name.
      Parameters:
      level - the access level of the object.
      type - the type of the object.
      name - the name of the object.
      Returns:
      the requested object or null if not found.
      Throws:
      NullPointerException - if an argument is null.
      Exception - if another error occurs.
    • writeObject

      void writeObject(AccessLevel level, ObjectType type, String name, Object object) throws Exception
      Writes an object with the specified access level, type and name.
      Parameters:
      level - the access level of the object.
      type - the type of the object.
      name - the name of the object.
      object - the object that will be saved.
      Throws:
      NullPointerException - if an argument is null.
      Exception - if another error occurs.
    • renameObject

      void renameObject(AccessLevel level, ObjectType type, String name, String newName)
      Renames an object with the specified access level, type and name.
      Parameters:
      level - the access level of the object.
      type - the type of the object.
      name - the name of the object.
      newName - the new name of the object.
      Throws:
      NullPointerException - if an argument is null.
    • deleteObject

      void deleteObject(AccessLevel level, ObjectType type, String name)
      Deletes an object with the specified access level, type and name.
      Parameters:
      level - the access level of the object.
      type - the type of the object.
      name - the name of the object.
      Throws:
      NullPointerException - if an argument is null.
    • isLogin

      boolean isLogin()
      Returns true if logged in (not in anonymous state).
      Returns:
      true if logged in (not in anonymous state).
    • getLoginServices

      Map<String,LoginService> getLoginServices() throws Exception
      Returns an unmodifiable map with all defined login services.
      Returns:
      an unmodifiable map with all defined login services.
      Throws:
      Exception - if an error occurs.
    • getLoginSettings

      Settings getLoginSettings() throws Exception
      Returns the login settings for the user.
      Returns:
      the login settings for the user.
      Throws:
      Exception - if an error occurs.
    • getLoginState

      Object getLoginState() throws Exception
      Returns the state of the login.
      Returns:
      the state of the login.
      Throws:
      Exception - if an error occurs.
    • getAutoLoginParameters

      String getAutoLoginParameters() throws Exception
      Returns the encoded parameters required for auto-login.
      Returns:
      the encoded parameters required for auto-login.
      Throws:
      Exception - if an error occurs.
    • tryAutoLogin

      boolean tryAutoLogin()
      Attempts auto-login the Desktop using configuration parameters.
      Returns:
      true if the auto-login operation was successful.
      Throws:
      StationException - if the desktop station is unusable.
    • loginProfiles

      List<LoginProfile> loginProfiles(String userCode, char[] password)
      Returns an unmodifiable list with all profiles of specified user.
      Parameters:
      userCode - the identification of the user.
      password - the plain-text password of the user.
      Returns:
      an unmodifiable list with all profiles of specified user.
      Throws:
      NullPointerException - if an argument is null.
      ExpiredException - if the user password expired.
    • loginCheck

      DesktopUser loginCheck(String userCode, char[] password, int profileCode)
      Returns the user with supplied credentials and profile.
      Parameters:
      userCode - the identification of the user.
      password - the plain-text password of the user.
      profileCode - the identification of a user profile.
      Returns:
      the user or null if user not found or invalid.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
    • login

      void login(String userCode, char[] password, int profileCode)
      Login using supplied user, password and profile information.
      Parameters:
      userCode - the identification of the user.
      password - the plain-text password of the user.
      profileCode - the identification of a user profile.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
      IllegalStateException - if the user is already login.
      ExpiredException - if the user password expired.
    • logout

      void logout(Object loginState) throws Exception
      Logout the current user saving the supplied login state.
      Parameters:
      loginState - state to be saved for next login (can be null).
      Throws:
      Exception - if an error occurs.
    • encodeCredentials

      String encodeCredentials(String userCode, char[] password)
      Returns a string with the encoding of supplied credentials.
      Parameters:
      userCode - the identification of the user.
      password - the plain-text password of the user.
      Returns:
      a string with the encoding of supplied credentials.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
    • checkPassword

      boolean checkPassword(char[] password)
      Returns true if login password equals supplied password.
      Parameters:
      password - the plain-text password to be checked.
      Returns:
      true if login password equals supplied password.
    • changeLoginPassword

      void changeLoginPassword(char[] password, char[] npassword) throws Exception
      Changes the password of the currently login user.
      Parameters:
      password - the current password of the login user.
      npassword - the new password of the login user.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
      Exception - if another error occurs.
    • changeLogoutPassword

      void changeLogoutPassword(String userCode, char[] npassword) throws Exception
      Changes the password of the specified user when logout.
      Parameters:
      userCode - the identification of the user.
      npassword - the new password of the login user.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
      Exception - if another error occurs.
    • createMailSender

      MailSender createMailSender() throws Exception
      Creates and returns a new mail message builder and sender.
      Returns:
      a new mail message builder and sender.
      Throws:
      Exception - if another error occurs.
    • changeMailAddress

      void changeMailAddress(char[] password, String address) throws Exception
      Changes the mail address of the currently login user.
      Parameters:
      password - the password of the login user.
      address - the new mail address of the user.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
      Exception - if another error occurs.