Class DefaultPlugin
- java.lang.Object
-
- net.ontopia.topicmaps.nav2.plugins.DefaultPlugin
-
- All Implemented Interfaces:
PluginIF
- Direct Known Subclasses:
FulltextPlugin
,GooglePlugin
,RDF2TMPlugin
,ReloadPlugin
,TextPlugin
,TopicMapLinkPlugin
,ValidationPlugin
,VizPlugin
public class DefaultPlugin extends Object implements PluginIF
INTERNAL: This is the plugin implementation that is used if no other implementation is requested in the plugin.xml file.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
description
protected String
directory
protected List
groups
protected String
id
protected Map
params
static String
RP_TOPIC_ID
static String
RP_TOPICMAP_ID
protected int
state
protected String
target
protected String
title
protected String
uri
-
Fields inherited from interface net.ontopia.topicmaps.nav2.plugins.PluginIF
ACTIVATED, DEACTIVATED, ERROR
-
-
Constructor Summary
Constructors Constructor Description DefaultPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGroup(String groupId)
INTERNAL: Add the specified group to groups this plugin belongs to.boolean
equals(Object obj)
String
generateHTML(ContextTag context)
INTERNAL: Called by the framework to make the plugin produce the HTML that is going to represent it on a web page in the web application.String
getDescription()
INTERNAL: Gets the description of this plugin.List
getGroups()
INTERNAL: Returns the groups this plugin belongs to.String
getId()
INTERNAL: Returns the ID of this plugin.String
getParameter(String name)
INTERNAL: Returns the value of the parameter.String
getPluginDirectory()
INTERNAL: Returns the path to the plugin directory.int
getState()
INTERNAL: Returns the state of this plugin.protected String
getStateAsString()
String
getTarget()
INTERNAL: Returns the URI frame target of this plugin.String
getTitle()
INTERNAL: Returns the title of this plugin.String
getURI()
INTERNAL: Returns the URI of this plugin.int
hashCode()
void
init()
INTERNAL: Called by the framework to finalize initialization.void
resetGroups()
INTERNAL: Reset all group settings for this plugin.void
setDescription(String description)
INTERNAL: Sets the description of this plugin.void
setGroups(List groups)
INTERNAL: Sets the groups this plugin belongs to.void
setId(String id)
INTERNAL: Sets the ID of this plugin.void
setParameter(String name, String value)
INTERNAL: Called by the framework to give the plugin the value of a configuration parameter.void
setPluginDirectory(String path)
INTERNAL: Called by the framework to give the plugin the directory its plugin.xml file was found in.void
setState(int state)
INTERNAL: Sets the state of this plugin.void
setTarget(String target)
INTERNAL: Sets the URI frame target of this plugin.void
setTitle(String title)
INTERNAL: Sets the title of this plugin.void
setURI(String uri)
INTERNAL: Sets the URI of this plugin.String
toString()
-
-
-
Field Detail
-
state
protected int state
-
title
protected String title
-
description
protected String description
-
uri
protected String uri
-
target
protected String target
-
id
protected String id
-
directory
protected String directory
-
params
protected Map params
-
groups
protected List groups
-
RP_TOPICMAP_ID
public static final String RP_TOPICMAP_ID
- See Also:
- Constant Field Values
-
RP_TOPIC_ID
public static final String RP_TOPIC_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
Description copied from interface:PluginIF
INTERNAL: Called by the framework to finalize initialization. Called when there are no more parameters.
-
generateHTML
public String generateHTML(ContextTag context)
Description copied from interface:PluginIF
INTERNAL: Called by the framework to make the plugin produce the HTML that is going to represent it on a web page in the web application.- Specified by:
generateHTML
in interfacePluginIF
- Returns:
- An HTML string to be written into the page. If the returned string is null it means that the plugin does not wish to be displayed on this page.
-
getId
public String getId()
Description copied from interface:PluginIF
INTERNAL: Returns the ID of this plugin.
-
setId
public void setId(String id)
Description copied from interface:PluginIF
INTERNAL: Sets the ID of this plugin.
-
resetGroups
public void resetGroups()
Description copied from interface:PluginIF
INTERNAL: Reset all group settings for this plugin. After this operation this plugin will belong to no group.- Specified by:
resetGroups
in interfacePluginIF
-
getGroups
public List getGroups()
Description copied from interface:PluginIF
INTERNAL: Returns the groups this plugin belongs to. Each group is represented by a string containing the group id.
-
addGroup
public void addGroup(String groupId)
Description copied from interface:PluginIF
INTERNAL: Add the specified group to groups this plugin belongs to.
-
setGroups
public void setGroups(List groups)
Description copied from interface:PluginIF
INTERNAL: Sets the groups this plugin belongs to.
-
getTitle
public String getTitle()
Description copied from interface:PluginIF
INTERNAL: Returns the title of this plugin.
-
setTitle
public void setTitle(String title)
Description copied from interface:PluginIF
INTERNAL: Sets the title of this plugin.
-
getDescription
public String getDescription()
Description copied from interface:PluginIF
INTERNAL: Gets the description of this plugin.- Specified by:
getDescription
in interfacePluginIF
-
setDescription
public void setDescription(String description)
Description copied from interface:PluginIF
INTERNAL: Sets the description of this plugin.- Specified by:
setDescription
in interfacePluginIF
-
getURI
public String getURI()
Description copied from interface:PluginIF
INTERNAL: Returns the URI of this plugin.
-
setURI
public void setURI(String uri)
Description copied from interface:PluginIF
INTERNAL: Sets the URI of this plugin.Note: This has not to contain the web application context path.
Example:
plugins/hello/hello.jsp
-
getTarget
public String getTarget()
Description copied from interface:PluginIF
INTERNAL: Returns the URI frame target of this plugin.
-
setTarget
public void setTarget(String target)
Description copied from interface:PluginIF
INTERNAL: Sets the URI frame target of this plugin.
-
getState
public int getState()
Description copied from interface:PluginIF
INTERNAL: Returns the state of this plugin.
-
setState
public void setState(int state)
Description copied from interface:PluginIF
INTERNAL: Sets the state of this plugin.
-
getParameter
public String getParameter(String name)
Description copied from interface:PluginIF
INTERNAL: Returns the value of the parameter.- Specified by:
getParameter
in interfacePluginIF
-
setParameter
public void setParameter(String name, String value)
Description copied from interface:PluginIF
INTERNAL: Called by the framework to give the plugin the value of a configuration parameter.- Specified by:
setParameter
in interfacePluginIF
-
getPluginDirectory
public String getPluginDirectory()
Description copied from interface:PluginIF
INTERNAL: Returns the path to the plugin directory. This is the path in the file system the server is running in, if the web application is deployed as an unexploded WAR.- Specified by:
getPluginDirectory
in interfacePluginIF
-
setPluginDirectory
public void setPluginDirectory(String path)
Description copied from interface:PluginIF
INTERNAL: Called by the framework to give the plugin the directory its plugin.xml file was found in. This is useful for plugins which wish to use other files found in the same directory.- Specified by:
setPluginDirectory
in interfacePluginIF
-
getStateAsString
protected String getStateAsString()
-
-