Class PluginDescriptor

All Implemented Interfaces:
Manageable, PersistenceCapable, Shareable, RegistryContext, UserFields, XObject, Described, Map, Serializable, Comparable<PluginDescriptor>

public final class PluginDescriptor extends Item implements Comparable<PluginDescriptor>
See Also:
  • Field Details Link icon

  • Method Details Link icon

    • getNTypeImpl Link icon

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class Item
      Returns:
      type describing the managed fields of the class of this node
    • newInstance Link icon

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class Item
      Returns:
      new instance of class of this node
    • createCoreDescriptor Link icon

      public static PluginDescriptor createCoreDescriptor(File libDir)
    • createCoreDescriptor Link icon

      public static PluginDescriptor createCoreDescriptor(ObjectList<File> libDir)
    • addJarToMap Link icon

      protected static void addJarToMap(Map<String,File> m, File root)
    • getPluginVersion Link icon

      public String getPluginVersion()
    • getPluginName Link icon

      public String getPluginName()
    • getPluginProvider Link icon

      public String getPluginProvider()
    • get Link icon

      public Object get(Object key, Object defaultValue)
      Description copied from interface: Map
      Returns the value associated with key. If there is no value associated with key, defaultValue is returned.
      Specified by:
      get in interface Map
      Overrides:
      get in class Item
      Parameters:
      key - a key for the map
      defaultValue - the default value
      Returns:
      the associated value, or defaultValue
    • readAttribute Link icon

      protected boolean readAttribute(String uri, String name, String value) throws SAXException
      Overrides:
      readAttribute in class Item
      Throws:
      SAXException
    • read Link icon

      public static PluginDescriptor read(String systemId, InputStream in, FileSystem fs, Object dir) throws IOException
      Throws:
      IOException
    • loadPlugin Link icon

      public boolean loadPlugin(Registry registry, ClassLoader parentLoader)
    • addExtensionToRegistry Link icon

      protected void addExtensionToRegistry()
      Add the EXT folder to the registry for it to be loaded before the core.
    • getPluginDirectory Link icon

      public Object getPluginDirectory()
    • getFileSystem Link icon

      public FileSystem getFileSystem()
    • setPluginState Link icon

      public void setPluginState(int state)
    • getPluginState Link icon

      public int getPluginState()
    • getPlugin Link icon

      public Plugin getPlugin()
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Node
    • getI18NBundle Link icon

      public I18NBundle getI18NBundle()
      Overrides:
      getI18NBundle in class Item
    • setI18NBundle Link icon

      public void setI18NBundle(I18NBundle bundle)
    • getLibraryFiles Link icon

      public Object[] getLibraryFiles()
    • getClassLoader Link icon

      public ClassLoader getClassLoader()
      Overrides:
      getClassLoader in class Item
    • getPluginClassLoader Link icon

      public PluginClassLoader getPluginClassLoader()
    • getURLForResource Link icon

      public URL getURLForResource(String name)
    • getInstance Link icon

      public static PluginDescriptor getInstance(String pluginId)
    • getInstance Link icon

      public static PluginDescriptor getInstance(Class cls)
    • getInstance Link icon

      public static PluginDescriptor getInstance(ClassLoader loader)
    • getConfigurationDirectory Link icon

      public File getConfigurationDirectory()
    • loadMethodsDoc Link icon

      public void loadMethodsDoc()
    • loadMethodsDoc Link icon

      public void loadMethodsDoc(URL u)
    • compareTo Link icon

      public int compareTo(PluginDescriptor o)
      First take the plugin descriptor from the highest directory priority (the user parameter plugin > the groimp installation folder > the pm plugin repo). If they are the same, take the higher version.
      Specified by:
      compareTo in interface Comparable<PluginDescriptor>
    • compareExtVersion Link icon

      protected static int compareExtVersion(String o1, String o2)
      To compare the extensions versions
    • getExtVersion Link icon

      protected static String getExtVersion(String name)
    • getLibrariesNames Link icon

      public String[] getLibrariesNames()
      Return the library (item) name, even if the library has not been loaded (thus the file is null).