org.jboss.wiki
Class WikiInsidePlugin

java.lang.Object
  extended by org.jboss.wiki.WikiInsidePlugin

public abstract class WikiInsidePlugin
extends java.lang.Object

Author:
Damon Sicore
, Tomasz Szymanski


This class is for making WikiInsidePlugins.

The only difference is that they are processed in HTMLTranslatorParts plugin and return String to insert inside showed page.

WikiSession attributes are the same as in WikiPlugin

To add definition of WikiInsidePlugin you need to add coresponding part to wiki-common/src/etc/WikiInsidePlugins.xml:
 <entry key="unique plugin name - this will be used in page source">plugin class name</entry>
 
See Also:
WikiPlugin

Constructor Summary
WikiInsidePlugin()
           
 
Method Summary
 java.lang.String getName()
          Returns name of that plugin.
abstract  void init()
          It's run after initiating plugin.
abstract  java.lang.String process(org.jboss.wiki.WikiPage wikiPage, org.jboss.wiki.WikiSession wikiSession, java.util.HashMap<java.lang.String,java.lang.String> attributes)
          Processes the given page, and attributes and return String to show in the apropriate place on the page.
 void setName(java.lang.String name)
          Sets name of current plugin.
 void setWikiEngine(org.jboss.wiki.WikiEngine wikiEngine)
          Sets wikiEngine.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiInsidePlugin

public WikiInsidePlugin()
Method Detail

process

public abstract java.lang.String process(org.jboss.wiki.WikiPage wikiPage,
                                         org.jboss.wiki.WikiSession wikiSession,
                                         java.util.HashMap<java.lang.String,java.lang.String> attributes)
Processes the given page, and attributes and return String to show in the apropriate place on the page.

Parameters:
wikiPage - Page where from the plugin was executed.
wikiSession - Session for passing attibutes etc.
attributes - Attributes given to plugin.
Returns:
String to show.

init

public abstract void init()
It's run after initiating plugin.


setWikiEngine

public void setWikiEngine(org.jboss.wiki.WikiEngine wikiEngine)
Sets wikiEngine.

Parameters:
wikiEngine - WikiEngine to set.

getName

public java.lang.String getName()
Returns name of that plugin.

Returns:
name of current plugin.

setName

public void setName(java.lang.String name)
Sets name of current plugin.

Parameters:
name - Name of the plugin.