Package org.apache.wiki.modules
Class WikiModuleInfo
java.lang.Object
org.apache.wiki.modules.WikiModuleInfo
- All Implemented Interfaces:
java.lang.Comparable<WikiModuleInfo>
- Direct Known Subclasses:
DefaultPluginManager.WikiPluginInfo
public class WikiModuleInfo extends java.lang.Object implements java.lang.Comparable<WikiModuleInfo>
A WikiModule describes whatever JSPWiki plugin there is: it can be a plugin, an editor, a filter, etc.
- Since:
- 2.4
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringm_adminBeanClassprotected java.lang.Stringm_authorprotected java.lang.Stringm_authorUrlprotected java.lang.Stringm_descriptionprotected java.lang.Stringm_htmlTemplateprotected java.lang.Stringm_maxVersionprotected java.lang.Stringm_minVersionprotected java.lang.Stringm_moduleUrlprotected java.lang.Stringm_moduleVersionprotected java.lang.Stringm_nameprotected java.net.URLm_resourceprotected java.lang.Stringm_scriptLocationprotected java.lang.Stringm_scriptTextprotected java.lang.Stringm_stylesheetLocationprotected java.lang.Stringm_stylesheetText -
Constructor Summary
Constructors Constructor Description WikiModuleInfo(java.lang.String name)Create a new info container. -
Method Summary
Modifier and Type Method Description intcompareTo(WikiModuleInfo mod)booleanequals(java.lang.Object obj)The WikiModuleInfo is equal to another WikiModuleInfo, if the name is equal.java.lang.StringgetAdminBeanClass()Returns the AdminBean class which is supposed to manage this module.java.lang.StringgetAuthor()Returns the name of the author of this plugin (if defined).java.lang.StringgetAuthorUrl()Returns the url of the author of this plugin (if defined).java.lang.StringgetDescription()The description of what this module does.java.lang.StringgetHtmlTemplate()Return the location of the html template for this module.java.lang.StringgetMaxVersion()Returns the maximum version of JSPWiki that this module supports.java.lang.StringgetMinVersion()Returns the minimum version of JSPWiki that this module supports.java.lang.StringgetModuleUrl()The URL for this getting more information about this module.java.lang.StringgetModuleVersion()The current version of the implemented modulejava.lang.StringgetName()Returns the common name for this particular module.java.lang.StringgetScriptLocation()Return the location of the script for this module.java.lang.StringgetStylesheetLocation()Returns the style sheet location for this module.protected java.lang.StringgetTextResource(java.lang.String resourceLocation)Attempts to locate a resource from a JAR file and returns it as a string.inthashCode()protected voidinitializeFromXML(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
-
Field Details
-
m_name
-
m_description
-
m_moduleUrl
-
m_moduleVersion
-
m_htmlTemplate
-
m_scriptLocation
-
m_scriptText
-
m_stylesheetLocation
-
m_stylesheetText
-
m_author
-
m_authorUrl
-
m_resource
-
m_minVersion
-
m_maxVersion
-
m_adminBeanClass
-
-
Constructor Details
-
WikiModuleInfo
Create a new info container.- Parameters:
name- The name of the module.
-
-
Method Details
-
equals
The WikiModuleInfo is equal to another WikiModuleInfo, if the name is equal. All objects are unique across JSPWiki.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj-- Returns:
-
hashCode
- Overrides:
hashCodein classjava.lang.Object
-
initializeFromXML
Initializes the ModuleInfo from some standard XML elements which are under the given element.- Parameters:
el- The element to parse.
-
getAdminBeanClass
Returns the AdminBean class which is supposed to manage this module.- Returns:
- A class name.
-
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
The description of what this module does.- Returns:
- A module description.
-
getModuleUrl
The URL for this getting more information about this module.- Returns:
- A module URL.
-
getModuleVersion
The current version of the implemented module- Returns:
- A module version.
-
getHtmlTemplate
Return the location of the html template for this module.- Returns:
- The path to the location.
-
getStylesheetLocation
Returns the style sheet location for this module.- Returns:
- The path to the location.
-
getScriptLocation
Return the location of the script for this module.- Returns:
- The path to the location.
-
getAuthor
Returns the name of the author of this plugin (if defined).- Returns:
- Author name, or null.
-
getAuthorUrl
Returns the url of the author of this plugin (if defined). -
getMinVersion
Returns the minimum version of JSPWiki that this module supports.- Returns:
- The minimum version.
-
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.IOExceptionAttempts 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
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<WikiModuleInfo>
-