org.apache.wiki.modules
Class WikiModuleInfo

java.lang.Object
  extended by org.apache.wiki.modules.WikiModuleInfo
All Implemented Interfaces:
Comparable<WikiModuleInfo>
Direct Known Subclasses:
DefaultPluginManager.WikiPluginInfo

public class WikiModuleInfo
extends Object
implements 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
protected  String m_adminBeanClass
           
protected  String m_author
           
protected  String m_maxVersion
           
protected  String m_minVersion
           
protected  String m_name
           
protected  URL m_resource
           
protected  String m_scriptLocation
           
protected  String m_scriptText
           
protected  String m_stylesheetLocation
           
protected  String m_stylesheetText
           
 
Constructor Summary
WikiModuleInfo(String name)
          Create a new info container.
 
Method Summary
 int compareTo(WikiModuleInfo arg0)
          
 boolean equals(Object obj)
          The WikiModuleInfo is equal to another WikiModuleInfo, if the name is equal.
 String getAdminBeanClass()
          Returns the AdminBean class which is supposed to manage this module.
 String getAuthor()
          Returns the name of the author of this plugin (if defined).
 String getMaxVersion()
          Returns the maximum version of JSPWiki that this module supports.
 String getMinVersion()
          Returns the minimum version of JSPWiki that this module supports.
 String getName()
          Returns the common name for this particular module.
 String getScriptLocation()
          Return the location of the script for this module.
 String getStylesheetLocation()
          Returns the style sheet location for this module.
protected  String getTextResource(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
 

Field Detail

m_name

protected String m_name

m_scriptLocation

protected String m_scriptLocation

m_scriptText

protected String m_scriptText

m_stylesheetLocation

protected String m_stylesheetLocation

m_stylesheetText

protected String m_stylesheetText

m_author

protected String m_author

m_resource

protected URL m_resource

m_minVersion

protected String m_minVersion

m_maxVersion

protected String m_maxVersion

m_adminBeanClass

protected String m_adminBeanClass
Constructor Detail

WikiModuleInfo

public WikiModuleInfo(String name)
Create a new info container.

Parameters:
name - The name of the module.
Method Detail

equals

public boolean equals(Object obj)
The WikiModuleInfo is equal to another WikiModuleInfo, if the name is equal. All objects are unique across JSPWiki.

Overrides:
equals in class Object
Parameters:
obj -
Returns:

hashCode

public int hashCode()

Overrides:
hashCode in class 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 String getAdminBeanClass()
Returns the AdminBean class which is supposed to manage this module.

Returns:
A class name.

getName

public 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.

getStylesheetLocation

public String getStylesheetLocation()
Returns the style sheet location for this module.

Returns:
The path to the location.

getScriptLocation

public String getScriptLocation()
Return the location of the script for this module.

Returns:
The path to the location.

getAuthor

public String getAuthor()
Returns the name of the author of this plugin (if defined).

Returns:
Author name, or null.

getMinVersion

public String getMinVersion()
Returns the minimum version of JSPWiki that this module supports.

Returns:
The minimum version.

getMaxVersion

public String getMaxVersion()
Returns the maximum version of JSPWiki that this module supports.

Returns:
The maximum version.

getTextResource

protected String getTextResource(String resourceLocation)
                          throws 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:
IOException - if the JAR file or the resource cannot be read

compareTo

public int compareTo(WikiModuleInfo arg0)

Specified by:
compareTo in interface Comparable<WikiModuleInfo>


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.