|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.wiki.plugin.tag.TagPlugin
public class TagPlugin
This extends the AssertionPlugin
but for use in adding one or more "tags" or associated properties or facets
to a wiki page.
Please note that this is different than categorizing a page, which is
done using the Category. Unlike the Category
plugin, there is no provision for expressing/altering the Subject or Predicate
of the Assertion: the Subject is always the current page and the Predicate is
the value of the tagging predicate TAG_PREDICATE). The tag must exist
as a wiki page.
See also:
PluginTextUtils is
available to format the output.
[{Tag tagname }]
[{Tag Honcho }]
The wiki page "Honcho" would need to already exist, otherwise an error
message is displayed (which does include a link to create the missing
page).
Category| Field Summary | |
|---|---|
static String |
CLASS_TAG_ERROR
View anchor class attribute value for tag error messages. |
static String |
CLASS_TAGS
View anchor class attribute value for tag messages. |
protected static org.apache.log4j.Logger |
log
|
protected static String |
LSBR
|
protected WikiContext |
m_context
|
protected boolean |
m_debug
|
protected WikiEngine |
m_engine
|
protected int |
m_outputFormat
|
protected Map |
m_params
|
protected TagManager |
m_tagManager
|
static String |
PLUGIN_NAME
|
static boolean |
REQUIRE_PAGE_FOR_TAG
When true, any tag names must exist as pages or an error message is generated. |
protected static String |
RSBR
|
static String |
TAG_PREDICATE
The name of the tagging predicate. |
| Fields inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin |
|---|
CORE_PLUGINS_RESOURCEBUNDLE |
| Constructor Summary | |
|---|---|
TagPlugin()
|
|
| Method Summary | |
|---|---|
protected void |
appendErrorMessage(StringBuffer out,
String pagename)
Appends a suitable error message. |
protected void |
error(WikiContext context,
StringBuffer out,
Exception e)
Process an error by clearing the existing buffer and populating it with an error message. |
String |
execute(WikiContext context,
Map params)
Overrides the method in AssertionPlugin,
permitting multiple Objects, creating a separate Assertion for each by reusing
the Subject (the current page name) and Predicate TAG_PREDICATE. |
protected void |
printTagOutput(StringBuffer out,
List terms)
When the AssertionHandler is not available, the plugin uses this method to generate its output. |
protected void |
processTerms(String pagename,
List terms)
Process the Terms via the TagManager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
public static String CLASS_TAGS
public static String CLASS_TAG_ERROR
public static boolean REQUIRE_PAGE_FOR_TAG
public static final String TAG_PREDICATE
public static String PLUGIN_NAME
protected static final String LSBR
protected static final String RSBR
protected boolean m_debug
protected int m_outputFormat
protected Map m_params
protected WikiContext m_context
protected TagManager m_tagManager
protected WikiEngine m_engine
| Constructor Detail |
|---|
public TagPlugin()
| Method Detail |
|---|
public String execute(WikiContext context,
Map params)
AssertionPlugin,
permitting multiple Objects, creating a separate Assertion for each by reusing
the Subject (the current page name) and Predicate TAG_PREDICATE.
Execute the plugin, obtaining the '_cmdline' parameter, processing
accordingly, returning XHTML-compatible markup.
execute in interface WikiPlugincontext - params -
WikiPlugin.execute(com.ecyrd.jspwiki.WikiContext,java.util.Map)
protected void processTerms(String pagename,
List terms)
throws QueryException
QueryException
protected void printTagOutput(StringBuffer out,
List terms)
protected void appendErrorMessage(StringBuffer out,
String pagename)
protected void error(WikiContext context,
StringBuffer out,
Exception e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||