Class WikiModuleInfo

    • Constructor Summary

      Constructors 
      Constructor Description
      WikiModuleInfo​(java.lang.String name)
      Create a new info container.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(WikiModuleInfo mod)
      boolean equals​(java.lang.Object obj)
      The WikiModuleInfo is equal to another WikiModuleInfo, if the name is equal.
      java.lang.String getAdminBeanClass()
      Returns the AdminBean class which is supposed to manage this module.
      java.lang.String getAuthor()
      Returns the name of the author of this plugin (if defined).
      java.lang.String getAuthorUrl()
      Returns the url of the author of this plugin (if defined).
      java.lang.String getDescription()
      The description of what this module does.
      java.lang.String getHtmlTemplate()
      Return the location of the html template for this module.
      java.lang.String getMaxVersion()
      Returns the maximum version of JSPWiki that this module supports.
      java.lang.String getMinVersion()
      Returns the minimum version of JSPWiki that this module supports.
      java.lang.String getModuleUrl()
      The URL for this getting more information about this module.
      java.lang.String getModuleVersion()
      The current version of the implemented module
      java.lang.String getName()
      Returns the common name for this particular module.
      java.lang.String getScriptLocation()
      Return the location of the script for this module.
      java.lang.String getStylesheetLocation()
      Returns the style sheet location for this module.
      protected java.lang.String getTextResource​(java.lang.String resourceLocation)
      Attempts to locate a resource from a JAR file and returns it as a string.
      int hashCode()
      protected void initializeFromXML​(org.jdom2.Element el)
      Initializes the ModuleInfo from some standard XML elements which are under the given element.
      • Methods inherited from class java.lang.Object

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

      • WikiModuleInfo

        public WikiModuleInfo​(java.lang.String name)
        Create a new info container.
        Parameters:
        name - The name of the module.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        The WikiModuleInfo is equal to another WikiModuleInfo, if the name is equal. All objects are unique across JSPWiki.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj -
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • initializeFromXML

        protected void initializeFromXML​(org.jdom2.Element el)
        Initializes the ModuleInfo from some standard XML elements which are under the given element.
        Parameters:
        el - The element to parse.
      • getAdminBeanClass

        public java.lang.String getAdminBeanClass()
        Returns the AdminBean class which is supposed to manage this module.
        Returns:
        A class name.
      • getName

        public java.lang.String getName()
        Returns the common name for this particular module. Note that this is not the class name, nor is it an alias. For different modules the name may have different meanings.

        Every module defines a name, so this method should never return null.

        Returns:
        A module name.
      • getDescription

        public java.lang.String getDescription()
        The description of what this module does.
        Returns:
        A module description.
      • getModuleUrl

        public java.lang.String getModuleUrl()
        The URL for this getting more information about this module.
        Returns:
        A module URL.
      • getModuleVersion

        public java.lang.String getModuleVersion()
        The current version of the implemented module
        Returns:
        A module version.
      • getHtmlTemplate

        public java.lang.String getHtmlTemplate()
        Return the location of the html template for this module.
        Returns:
        The path to the location.
      • getStylesheetLocation

        public java.lang.String getStylesheetLocation()
        Returns the style sheet location for this module.
        Returns:
        The path to the location.
      • getScriptLocation

        public java.lang.String getScriptLocation()
        Return the location of the script for this module.
        Returns:
        The path to the location.
      • getAuthor

        public java.lang.String getAuthor()
        Returns the name of the author of this plugin (if defined).
        Returns:
        Author name, or null.
      • getAuthorUrl

        public java.lang.String getAuthorUrl()
        Returns the url of the author of this plugin (if defined).
      • getMinVersion

        public java.lang.String getMinVersion()
        Returns the minimum version of JSPWiki that this module supports.
        Returns:
        The minimum version.
      • getMaxVersion

        public java.lang.String getMaxVersion()
        Returns the maximum version of JSPWiki that this module supports.
        Returns:
        The maximum version.
      • getTextResource

        protected java.lang.String getTextResource​(java.lang.String resourceLocation)
                                            throws java.io.IOException
        Attempts to locate a resource from a JAR file and returns it as a string.
        Parameters:
        resourceLocation - an URI of the resource
        Returns:
        The content of the file
        Throws:
        java.io.IOException - if the JAR file or the resource cannot be read