Interface Desktop
public interface Desktop
Main Desktop Interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangeLoginPassword(char[] password, char[] npassword) Changes the password of the currently login user.voidchangeLogoutPassword(String userCode, char[] npassword) Changes the password of the specified user when logout.voidchangeMailAddress(char[] password, String address) Changes the mail address of the currently login user.booleancheckPassword(char[] password) Returnstrueif login password equals supplied password.createDdeTopic(String topicName) Creates and returns a new DDE Topic with the supplied name.Creates and returns a new mail message builder and sender.voiddeleteObject(AccessLevel level, ObjectType type, String name) Deletes an object with the specified access level, type and name.encodeCredentials(String userCode, char[] password) Returns a string with the encoding of supplied credentials.Returns theApplicationof the Desktop.Returns the encoded parameters required for auto-login.Returns the codebase of the Desktop.Returns the expression compiler of the Desktop.Returns the configuration parameters of the Desktop.Returns the home directory of the Desktop.Returns theImageCacheof the Desktop.Returns the license of the Desktop.Returns an unmodifiable map with all defined login services.Returns the login settings for the user.Returns the state of the login.Returns the DesktopNetServerManager.Returns the primaryStageof the Desktop.Returns the secure codebase of the Desktop.Returns the environment name of the Application Server.Returns the file extension of a page of the Application Server.longReturns the time of the Application Server (milliseconds).Returns the time zone of the Application Server.Returns the station of the Desktop.intReturns the unique identification of the Desktop.getUser()Returns the user of the Desktop.Returns the version string of the Desktop.Returns the logging level of web service invocations.voidInitialize the HTTP Security Headers of anHttpRequest.Builder.voidinitHttpSecurityHeaders(URLConnection urlconn) Initialize the HTTP Security Headers of anURLConnection.voidInitialize the HTTP Security Headers of aClientRequestContext.voidinitWebServicePort(Object port) Initialize a web service port.voidinitWebServicePort(Object port, Service service, URL codebase) Initialize a web service port using supplied service and codebase.voidinitWebServicePort(Object port, URL endpoint) Initialize a web service port using supplied endpoint.booleanisLogin()Returnstrueif logged in (not in anonymous state).listObjectNames(AccessLevel level, ObjectType type, String prefix) Returns a list of names of objects with access level, type and prefix.voidLogin using supplied user, password and profile information.loginCheck(String userCode, char[] password, int profileCode) Returns the user with supplied credentials and profile.loginProfiles(String userCode, char[] password) Returns an unmodifiable list with all profiles of specified user.voidLogout the current user saving the supplied login state.readObject(AccessLevel level, ObjectType type, String name) Reads an object with the specified access level, type and name.voidrenameObject(AccessLevel level, ObjectType type, String name, String newName) Renames an object with the specified access level, type and name.voidsetWebServiceLoggerLevel(Level level) Changes the logging level of web service invocations.voidshowDocument(String uri) Opens the specified URI in a new browser window or tab.booleanAttempts auto-login the Desktop using configuration parameters.voidwriteObject(AccessLevel level, ObjectType type, String name, Object object) Writes an object with the specified access level, type and name.
-
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
-
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
-
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
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- iftopicNameisnull.Exception- if another error occurs.
-
getApplication
Application getApplication()Returns theApplicationof the Desktop.- Returns:
- the
Applicationof the Desktop.
-
getPrimaryStage
-
getImageCache
ImageCache getImageCache()Returns theImageCacheof the Desktop.- Returns:
- the
ImageCacheof the Desktop.
-
showDocument
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- ifuriisnullor 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
Changes the logging level of web service invocations.- Parameters:
level- the new logging level of web service invocations.- Throws:
NullPointerException- iflevelisnull.
-
initHttpSecurityHeaders
Initialize the HTTP Security Headers of anURLConnection.- Parameters:
urlconn- the URL Connection to be initialized.- Throws:
NullPointerException- ifurlconnisnull.
-
initHttpSecurityHeaders
Initialize the HTTP Security Headers of anHttpRequest.Builder.- Parameters:
builder- the HTTP Request Builder to be initialized.- Throws:
NullPointerException- ifbuilderisnull.
-
initRestServiceRequest
Initialize the HTTP Security Headers of aClientRequestContext.- Parameters:
context- the rest service request context to initialize.- Throws:
NullPointerException- ifcontextisnull.
-
initWebServicePort
Initialize a web service port.- Parameters:
port- the web service port to initialize.- Throws:
NullPointerException- ifportisnull.IllegalArgumentException- if theportis invalid.Exception- if another error occurs.
-
initWebServicePort
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 isnull.IllegalArgumentException- if theportis invalid.Exception- if another error occurs.
-
initWebServicePort
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 isnull.IllegalArgumentException- if theportis invalid.Exception- if another error occurs.
-
getNetServerManager
Returns the DesktopNetServerManager.- Returns:
- the Desktop
NetServerManager. - Throws:
IllegalStateException- if not logged in.Exception- if another error occurs.
-
listObjectNames
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 isnull.
-
readObject
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
nullif not found. - Throws:
NullPointerException- if an argument isnull.Exception- if another error occurs.
-
writeObject
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 isnull.Exception- if another error occurs.
-
renameObject
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 isnull.
-
deleteObject
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 isnull.
-
isLogin
boolean isLogin()Returnstrueif logged in (not in anonymous state).- Returns:
trueif logged in (not in anonymous state).
-
getLoginServices
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
-
getLoginState
-
getAutoLoginParameters
-
tryAutoLogin
boolean tryAutoLogin()Attempts auto-login the Desktop using configuration parameters.- Returns:
trueif the auto-login operation was successful.- Throws:
StationException- if the desktop station is unusable.
-
loginProfiles
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 isnull.ExpiredException- if the user password expired.
-
loginCheck
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
nullif user not found or invalid. - Throws:
NullPointerException- if an argument isnull.IllegalArgumentException- if an argument is invalid.
-
login
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 isnull.IllegalArgumentException- if an argument is invalid.IllegalStateException- if the user is already login.ExpiredException- if the user password expired.
-
logout
-
encodeCredentials
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 isnull.IllegalArgumentException- if an argument is invalid.
-
checkPassword
boolean checkPassword(char[] password) Returnstrueif login password equals supplied password.- Parameters:
password- the plain-text password to be checked.- Returns:
trueif login password equals supplied password.
-
changeLoginPassword
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 isnull.IllegalArgumentException- if an argument is invalid.Exception- if another error occurs.
-
changeLogoutPassword
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 isnull.IllegalArgumentException- if an argument is invalid.Exception- if another error occurs.
-
createMailSender
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
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 isnull.IllegalArgumentException- if an argument is invalid.Exception- if another error occurs.
-