Class JMapApplication

java.lang.Object
com.kheops.jmap.client.application.JMapApplication
All Implemented Interfaces:
ProjectEventListener

public abstract class JMapApplication extends Object implements ProjectEventListener
  • Field Details

  • Constructor Details

    • JMapApplication

      public JMapApplication()
  • Method Details

    • startup

      public void startup(JMapApplicationContext appContext)
    • getMessagingController

      public JMapClientMessagingController getMessagingController()
    • getEditionTransactionManager

      public EditionTransactionManager getEditionTransactionManager()
      Returns the main instance of the edition transaction manager.
      Returns:
      the main edition transaction manager instance.
    • getDefaultEditionEventDispatcher

      public DefaultEditionEventDispatcher getDefaultEditionEventDispatcher()
      Returns the default edition event dispatcher.
      Returns:
      the default edition event dispatcher.
    • getUserParameterController

      public JMapUserParameterController getUserParameterController()
    • openSession

      public boolean openSession(boolean showLoginDialog)
    • openProject

      protected void openProject(String projectName)
    • getFeaturesList

      public Properties getFeaturesList()
    • isFeatureAvailable

      public boolean isFeatureAvailable(String featureName)
      Parameters:
      featureName - the feature key in the features list
      Returns:
      true if the feature is available
    • getCurrentProject

      public Project getCurrentProject()
      Returns the current open project.
      Returns:
      the current open project or null if none is open
    • closeProject

      public void closeProject()
      Closes the current opened project.
    • createNewView

      public View createNewView()
      Creates a new view with the default view settings and adds it to the view manager. null is returned if a project is not opened.
      Returns:
      the new view
      See Also:
    • createNewView

      public View createNewView(MapContextInfo context)
      Creates a new view and adds it to the view manager. If context is null, the new view will be created with the default view settings. null is returned if a project is not opened.
      Parameters:
      context -
      Returns:
      the new view
      See Also:
    • projectOpened

      public void projectOpened(ProjectEvent event)
      Description copied from interface: ProjectEventListener
      This method is called when a project is opened and ready.
      Specified by:
      projectOpened in interface ProjectEventListener
      Parameters:
      event - the project event
      See Also:
    • projectClosed

      public void projectClosed(ProjectEvent event)
      Description copied from interface: ProjectEventListener
      This method is called when a project is closed.
      Specified by:
      projectClosed in interface ProjectEventListener
      Parameters:
      event - the project event
      See Also:
    • addProjectListener

      public void addProjectListener(ProjectEventListener listener)
      Adds a new project listener.
      Parameters:
      listener - the new listener
    • removeProjectListener

      public void removeProjectListener(ProjectEventListener listener)
      Removes a project listener.
      Parameters:
      listener - the listener to remove
    • shutdown

      public void shutdown()
      Shutdowns the application.
    • openUrl

      public void openUrl(String jsFunction, String url, boolean addLocaleParams) throws Exception
      Open an URL.
      Parameters:
      jsFunction - the JavaScript function name to use if the application is not running standalone
      url - the URL to execute
      addLocaleParams - if true, the Locale params will be added to the URL (&locale_lang=xx&locale_cntr=xx)
      Throws:
      Exception
    • getSplashLoginWindow

      public SplashLoginWindow getSplashLoginWindow()
      Returns the Splash window. The splash is available during the initialization. null will be returned otherwise.
      Returns:
      current splash window
    • getJMapVersion

      public final String getJMapVersion()
      Returns the JMap build version contained in the MANIFEST file.
      Returns:
      the JMap version
    • getClientExtension

      public JMapClientExtension getClientExtension(String className)
      Returns the instance of the client extension which matches the specified full class name.
      Parameters:
      className - the class name of the client extension
      Returns:
      the instance of the client extension or null if the class name was not found.
    • getExtensions

      public JMapClientExtension[] getExtensions()
      Returns all client extensions loaded by this application.
      Returns:
      all client extensions loaded by this application.
    • getJMapExtensionManifestValue

      protected final String getJMapExtensionManifestValue(Class<?> extensionClass, String manifestAttributeName)
    • getJMapExtensionVersion

      protected final String getJMapExtensionVersion(Class<?> extensionClass)
    • getUserParameter

      public UserParameter getUserParameter(String parameterKey)
      Returns the user parameter that was set for the specified parameter key.
      Parameters:
      parameterKey - the parameter key used to retrieve the user parameter.
      Returns:
      the user parameter defined for the specified parameter key, or null if not defined.
      See Also:
    • setUserParameter

      public void setUserParameter(UserParameter userParameter)
      Sets the specified user parameter.
      Parameters:
      userParameter - the user parameter to set.
      See Also:
    • getGuiService

      public abstract JMapGuiService getGuiService()
      Returns the GUI application service. This service is used to add / remove components in the application.
      Returns:
      the GUI application service
    • initGui

      public abstract void initGui()
      Initializes all GUI (Graphical User Interface) components.