Class Plugin

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Plugin​(java.lang.String id)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getDependencies()
      Dependencies plugin IDs.
      org.w3c.dom.Document getDocument()
      Plugin's XML document from 'plugin.xml'.
      java.util.Map<java.lang.String,​java.lang.String> getEndpoints()
      Endpoints for connecting the plugin in JSP templates.
      java.lang.String getId()
      Plugin's ID.
      java.util.List<Lang> getLanguages()
      List of supported by plugin languages, main is the first.
      java.lang.String getName()
      Deprecated.
      java.util.Set<java.lang.String> getObjectTypes()
      Plugin's entities.
      java.util.Set<java.lang.String> getOwnedPaths()
      Owned directories, used for removing of excess files on unpacking of update.zip.
      java.lang.String getResourcePath​(java.lang.String name)
      Gets path of a file, placed int the plugin's package.
      java.util.Set<Table> getTables()
      Used DB tables.
      java.util.Set<java.lang.String> getUnusedPaths()
      Outdated path, used by plugin.
      org.w3c.dom.Document getXml​(java.lang.String name, org.w3c.dom.Document defaultValue)
      XML document from the plugin's package.
      void init​(java.sql.Connection con)
      Initialization during server's start.
      boolean isEnabled​(ParameterMap config, java.lang.String defaultValue)
      If the plugin enabled.
      protected java.util.Map<java.lang.String,​java.lang.String> loadEndpoints()
      Default implementation, loads endpoints from the XML document.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Plugin

        protected Plugin​(java.lang.String id)
    • Method Detail

      • getId

        public java.lang.String getId()
        Plugin's ID.
        Returns:
      • getName

        @Deprecated
        public java.lang.String getName()
        Deprecated.
      • getDocument

        public org.w3c.dom.Document getDocument()
        Plugin's XML document from 'plugin.xml'.
        Returns:
        parsed document object from or empty document if there is no such file.
      • getXml

        public org.w3c.dom.Document getXml​(java.lang.String name,
                                           org.w3c.dom.Document defaultValue)
        XML document from the plugin's package.
        Parameters:
        name -
        defaultValue -
        Returns:
      • loadEndpoints

        protected java.util.Map<java.lang.String,​java.lang.String> loadEndpoints()
        Default implementation, loads endpoints from the XML document. Deprecated way, for backward compatibility only.
        Returns:
      • getResourcePath

        public java.lang.String getResourcePath​(java.lang.String name)
        Gets path of a file, placed int the plugin's package.
        Parameters:
        name - name of the file.
        Returns:
      • getEndpoints

        public java.util.Map<java.lang.String,​java.lang.String> getEndpoints()
        Endpoints for connecting the plugin in JSP templates.
        Returns:
      • init

        public void init​(java.sql.Connection con)
                  throws java.lang.Exception
        Initialization during server's start.
        Parameters:
        con -
        Throws:
        java.lang.Exception
      • isEnabled

        public boolean isEnabled​(ParameterMap config,
                                 java.lang.String defaultValue)
        If the plugin enabled.
        Parameters:
        config - configuration, where the plugin can be explicitly enabled.
        defaultValue - default value if not explicitly enabled: '1' - enabled, 'lic' - if presented in license.
        Returns:
        true or false.
      • getDependencies

        public java.util.Set<java.lang.String> getDependencies()
        Dependencies plugin IDs.
        Returns:
      • getLanguages

        public java.util.List<Lang> getLanguages()
        List of supported by plugin languages, main is the first. For any of supported languages must be presented translated documentation and localized UI.
        Returns:
        default return single list of Lang.RU.
      • getTables

        public java.util.Set<Table> getTables()
        Used DB tables.
        Returns:
      • getObjectTypes

        public java.util.Set<java.lang.String> getObjectTypes()
        Plugin's entities.
        Returns:
      • getOwnedPaths

        public java.util.Set<java.lang.String> getOwnedPaths()
        Owned directories, used for removing of excess files on unpacking of update.zip.
        Returns:
      • getUnusedPaths

        public java.util.Set<java.lang.String> getUnusedPaths()
        Outdated path, used by plugin. Related to the application's root directory. May be used for cleaning up of old files and directories.
        Returns: