net.ontopia.topicmaps.nav2.plugins
Class DefaultPlugin

java.lang.Object
  extended by 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 java.lang.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
protected  java.lang.String description
           
protected  java.lang.String directory
           
protected  java.util.List groups
           
protected  java.lang.String id
           
protected  java.util.Map params
           
static java.lang.String RP_TOPIC_ID
           
static java.lang.String RP_TOPICMAP_ID
           
protected  int state
           
protected  java.lang.String target
           
protected  java.lang.String title
           
protected  java.lang.String uri
           
 
Fields inherited from interface net.ontopia.topicmaps.nav2.plugins.PluginIF
ACTIVATED, DEACTIVATED, ERROR
 
Constructor Summary
DefaultPlugin()
           
 
Method Summary
 void addGroup(java.lang.String groupId)
          INTERNAL: Add the specified group to groups this plugin belongs to.
 boolean equals(java.lang.Object obj)
           
 java.lang.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.
 java.lang.String getDescription()
          INTERNAL: Gets the description of this plugin.
 java.util.List getGroups()
          INTERNAL: Returns the groups this plugin belongs to.
 java.lang.String getId()
          INTERNAL: Returns the ID of this plugin.
 java.lang.String getParameter(java.lang.String name)
          INTERNAL: Returns the value of the parameter.
 java.lang.String getPluginDirectory()
          INTERNAL: Returns the path to the plugin directory.
 int getState()
          INTERNAL: Returns the state of this plugin.
protected  java.lang.String getStateAsString()
           
 java.lang.String getTarget()
          INTERNAL: Returns the URI frame target of this plugin.
 java.lang.String getTitle()
          INTERNAL: Returns the title of this plugin.
 java.lang.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(java.lang.String description)
          INTERNAL: Sets the description of this plugin.
 void setGroups(java.util.List groups)
          INTERNAL: Sets the groups this plugin belongs to.
 void setId(java.lang.String id)
          INTERNAL: Sets the ID of this plugin.
 void setParameter(java.lang.String name, java.lang.String value)
          INTERNAL: Called by the framework to give the plugin the value of a configuration parameter.
 void setPluginDirectory(java.lang.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(java.lang.String target)
          INTERNAL: Sets the URI frame target of this plugin.
 void setTitle(java.lang.String title)
          INTERNAL: Sets the title of this plugin.
 void setURI(java.lang.String uri)
          INTERNAL: Sets the URI of this plugin.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

state

protected int state

title

protected java.lang.String title

description

protected java.lang.String description

uri

protected java.lang.String uri

target

protected java.lang.String target

id

protected java.lang.String id

directory

protected java.lang.String directory

params

protected java.util.Map params

groups

protected java.util.List groups

RP_TOPICMAP_ID

public static final java.lang.String RP_TOPICMAP_ID
See Also:
Constant Field Values

RP_TOPIC_ID

public static final java.lang.String RP_TOPIC_ID
See Also:
Constant Field Values
Constructor Detail

DefaultPlugin

public DefaultPlugin()
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.

Specified by:
init in interface PluginIF

generateHTML

public java.lang.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 interface PluginIF
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 java.lang.String getId()
Description copied from interface: PluginIF
INTERNAL: Returns the ID of this plugin.

Specified by:
getId in interface PluginIF

setId

public void setId(java.lang.String id)
Description copied from interface: PluginIF
INTERNAL: Sets the ID of this plugin.

Specified by:
setId in interface PluginIF

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 interface PluginIF

getGroups

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

Specified by:
getGroups in interface PluginIF

addGroup

public void addGroup(java.lang.String groupId)
Description copied from interface: PluginIF
INTERNAL: Add the specified group to groups this plugin belongs to.

Specified by:
addGroup in interface PluginIF

setGroups

public void setGroups(java.util.List groups)
Description copied from interface: PluginIF
INTERNAL: Sets the groups this plugin belongs to.

Specified by:
setGroups in interface PluginIF

getTitle

public java.lang.String getTitle()
Description copied from interface: PluginIF
INTERNAL: Returns the title of this plugin.

Specified by:
getTitle in interface PluginIF

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: PluginIF
INTERNAL: Sets the title of this plugin.

Specified by:
setTitle in interface PluginIF

getDescription

public java.lang.String getDescription()
Description copied from interface: PluginIF
INTERNAL: Gets the description of this plugin.

Specified by:
getDescription in interface PluginIF

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: PluginIF
INTERNAL: Sets the description of this plugin.

Specified by:
setDescription in interface PluginIF

getURI

public java.lang.String getURI()
Description copied from interface: PluginIF
INTERNAL: Returns the URI of this plugin.

Specified by:
getURI in interface PluginIF

setURI

public void setURI(java.lang.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

Specified by:
setURI in interface PluginIF

getTarget

public java.lang.String getTarget()
Description copied from interface: PluginIF
INTERNAL: Returns the URI frame target of this plugin.

Specified by:
getTarget in interface PluginIF

setTarget

public void setTarget(java.lang.String target)
Description copied from interface: PluginIF
INTERNAL: Sets the URI frame target of this plugin.

Specified by:
setTarget in interface PluginIF

getState

public int getState()
Description copied from interface: PluginIF
INTERNAL: Returns the state of this plugin.

Specified by:
getState in interface PluginIF

setState

public void setState(int state)
Description copied from interface: PluginIF
INTERNAL: Sets the state of this plugin.

Specified by:
setState in interface PluginIF

getParameter

public java.lang.String getParameter(java.lang.String name)
Description copied from interface: PluginIF
INTERNAL: Returns the value of the parameter.

Specified by:
getParameter in interface PluginIF

setParameter

public void setParameter(java.lang.String name,
                         java.lang.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 interface PluginIF

getPluginDirectory

public java.lang.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 interface PluginIF

setPluginDirectory

public void setPluginDirectory(java.lang.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 interface PluginIF

hashCode

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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStateAsString

protected java.lang.String getStateAsString()


Copyright © 2000-2012 Ontopia.