Package cl.obcom.desktopfx.core
Interface Desktop
public interface Desktop
Main Desktop Interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeLoginPassword
(char[] password, char[] npassword) Changes the password of the currently login user.void
changeLogoutPassword
(String userCode, char[] npassword) Changes the password of the specified user when logout.void
changeMailAddress
(char[] password, String address) Changes the mail address of the currently login user.boolean
checkPassword
(char[] password) Returnstrue
if 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.void
deleteObject
(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 theApplication
of 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 theImageCache
of 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 primaryStage
of 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.long
Returns the time of the Application Server (milliseconds).Returns the time zone of the Application Server.Returns the station of the Desktop.int
Returns 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.void
Initialize the HTTP Security Headers of anHttpRequest.Builder
.void
initHttpSecurityHeaders
(URLConnection urlconn) Initialize the HTTP Security Headers of anURLConnection
.void
initWebServicePort
(Object port) Initialize a web service port.void
initWebServicePort
(Object port, jakarta.xml.ws.Service service, URL codebase) Initialize a web service port using supplied service and codebase.void
initWebServicePort
(Object port, URL endpoint) Initialize a web service port using supplied endpoint.boolean
isLogin()
Returnstrue
if 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.void
Login 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.void
Logout 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.void
renameObject
(AccessLevel level, ObjectType type, String name, String newName) Renames an object with the specified access level, type and name.void
setWebServiceLoggerLevel
(Level level) Changes the logging level of web service invocations.void
showDocument
(String uri) Opens the specified URI in a new browser window or tab.boolean
Attempts auto-login the Desktop using configuration parameters.void
writeObject
(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
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
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
- iftopicName
isnull
.Exception
- if another error occurs.
-
getApplication
Application getApplication()Returns theApplication
of the Desktop.- Returns:
- the
Application
of the Desktop.
-
getPrimaryStage
Stage getPrimaryStage()Returns the primaryStage
of the Desktop.- Returns:
- the primary
Stage
of the Desktop.
-
getImageCache
ImageCache getImageCache()Returns theImageCache
of the Desktop.- Returns:
- the
ImageCache
of 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
- ifuri
isnull
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
Changes the logging level of web service invocations.- Parameters:
level
- the new logging level of web service invocations.- Throws:
NullPointerException
- iflevel
isnull
.
-
initHttpSecurityHeaders
Initialize the HTTP Security Headers of anURLConnection
.- Parameters:
urlconn
- the URL Connection to be initialized.- Throws:
NullPointerException
- ifurlconn
isnull
.
-
initHttpSecurityHeaders
Initialize the HTTP Security Headers of anHttpRequest.Builder
.- Parameters:
builder
- the HTTP Request Builder to be initialized.- Throws:
NullPointerException
- ifbuilder
isnull
.
-
initWebServicePort
Initialize a web service port.- Parameters:
port
- the web service port to initialize.- Throws:
NullPointerException
- ifport
isnull
.IllegalArgumentException
- if theport
is 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 theport
is 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 theport
is 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
null
if 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()Returnstrue
if logged in (not in anonymous state).- Returns:
true
if 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
Returns the login settings for the user.- Returns:
- the login settings for the user.
- Throws:
Exception
- if an error occurs.
-
getLoginState
Returns the state of the login.- Returns:
- the state of the login.
- Throws:
Exception
- if an error occurs.
-
getAutoLoginParameters
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
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
null
if 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
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
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) Returnstrue
if login password equals supplied password.- Parameters:
password
- the plain-text password to be checked.- Returns:
true
if 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.
-