Class JMapApplicationContext

java.lang.Object
com.kheops.jmap.client.JMapApplicationContext

public class JMapApplicationContext extends Object
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 Details

    • APPLICATION_TYPE_STANDALONE

      public static final int APPLICATION_TYPE_STANDALONE
      Constant for a standalone Java application
      See Also:
  • Method Details

    • getInstance

      public static JMapApplicationContext getInstance()
    • getBaseURL

      public URL getBaseURL()
      Returns:
      the application base URL
    • getURLOpener

      public URLOpener getURLOpener()
      Returns:
      the application URL opener or null if not available
    • setURLOpener

      public void setURLOpener(URLOpener URLOpener)
      Parameters:
      URLOpener - the application URL opener
    • getViewManager

      public ViewManager getViewManager()
      Returns:
      the application view manager or null if not available
    • getQueryInterfaceManager

      public QueryInterfaceManager getQueryInterfaceManager()
      Returns:
      the application query manager or null if not available
    • getFrame

      public Frame getFrame()
      Returns:
      the application main frame
    • getLicenseRestrictions

      public final ClientLicenseRestrictions getLicenseRestrictions()
    • addLicenseRestrictions

      public final void addLicenseRestrictions(ClientLicenseRestrictions licenseRestrictions)
    • getApplication

      public JMapApplication getApplication()
      Returns the instance of the current JMap application.
      Returns:
      the instance of the JMap application.
    • setApplication

      public void setApplication(JMapApplication jmapApplication)
      Sets the instance of the current JMap application.
      Parameters:
      jmapApplication - the instance of the JMap application.
    • getQueryManager

      public QueryManager getQueryManager()
      Returns the query manager for this application.
      Returns:
      a query manager
      See Also:
    • getContextManager

      public JMapContextManager getContextManager()
      Returns the context manager for this application.
      Returns:
      a context manager
      See Also:
    • getAutoZoomService

      public JMapAutoZoomService getAutoZoomService()
      Returns the JMap AutoZoom service.
      Returns:
      autoZoom service
      See Also:
    • getViewSyncGroup

      public ViewSyncGroup getViewSyncGroup()
      Returns the View Synchronize Group service.
      Returns:
      viewSyncGroup service
      See Also:
    • destroy

      public static void destroy()
      Destroys the JMapApplicationContext instance.
    • getJMapHome

      public File 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 public void setJMapHome(File jMapHome)
      Deprecated.
      Sets the JMap home directory.
      Parameters:
      jMapHome - the new JMap home directory
    • getReportURL

      public URL 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

      public String getUsername()
      Convenient function to safely obtain current connection's username if applicable.
      Returns:
      current username or default value