Package com.kheops.jmap.client
Class JMapApplicationContext
java.lang.Object
com.kheops.jmap.client.JMapApplicationContext
This class contains useful information about a JMap client application. It is
used to initialize JMap client extensions. It provides, for example, a
reference to the application network connection, to the view manager, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant for a standalone Java application -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addLicenseRestrictions
(ClientLicenseRestrictions licenseRestrictions) static void
destroy()
Destroys the JMapApplicationContext instance.Returns the instance of the current JMap application.Returns the JMap AutoZoom service.Returns the context manager for this application.getFrame()
static JMapApplicationContext
The JMap home directory is the root directory where JMap writes its files (parameters,cached, data, etc.).Returns the query manager for this application.Gets the URL to use for information reports.Convenient function to safely obtain current connection's username if applicable.Returns the View Synchronize Group service.void
setApplication
(JMapApplication jmapApplication) Sets the instance of the current JMap application.void
setJMapHome
(File jMapHome) Deprecated.void
setURLOpener
(URLOpener URLOpener)
-
Field Details
-
APPLICATION_TYPE_STANDALONE
public static final int APPLICATION_TYPE_STANDALONEConstant for a standalone Java application- See Also:
-
-
Method Details
-
getInstance
-
getBaseURL
- Returns:
- the application base URL
-
getURLOpener
- Returns:
- the application URL opener or null if not available
-
setURLOpener
- Parameters:
URLOpener
- the application URL opener
-
getViewManager
- Returns:
- the application view manager or null if not available
-
getQueryInterfaceManager
- Returns:
- the application query manager or null if not available
-
getFrame
- Returns:
- the application main frame
-
getLicenseRestrictions
-
addLicenseRestrictions
-
getApplication
Returns the instance of the current JMap application.- Returns:
- the instance of the JMap application.
-
setApplication
Sets the instance of the current JMap application.- Parameters:
jmapApplication
- the instance of the JMap application.
-
getQueryManager
Returns the query manager for this application.- Returns:
- a query manager
- See Also:
-
getContextManager
Returns the context manager for this application.- Returns:
- a context manager
- See Also:
-
getAutoZoomService
Returns the JMap AutoZoom service.- Returns:
- autoZoom service
- See Also:
-
getViewSyncGroup
Returns the View Synchronize Group service.- Returns:
- viewSyncGroup service
- See Also:
-
destroy
public static void destroy()Destroys the JMapApplicationContext instance. -
getJMapHome
The JMap home directory is the root directory where JMap writes its files (parameters,cached, data, etc.). This directory is called .jmap and is normally located inside the user's home directory.- Returns:
- the JMap home directory where JMap writes its files.
-
setJMapHome
Deprecated.Sets the JMap home directory.- Parameters:
jMapHome
- the new JMap home directory
-
getReportURL
Gets the URL to use for information reports. By default, the value is the application base URL plus /reports. It can overriden by using the setReportURL(url) method or can be set in application launch parameters using 'reportpath', for example, absolute path: -reportpath http://www.jmap.com:8090/customDir/ or relative path: -reportpath /customDir/- Returns:
- URL for information reports
-
getUsername
Convenient function to safely obtain current connection's username if applicable.- Returns:
- current username or default value
-