|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.wiki.plugin.assertion.AssertionPlugin
public class AssertionPlugin
The AssertionPlugin is used to make a wiki assertion.
This plugin does its own internal parsing and therefore relies on the availability
of the entire plugin command line taken from a parameter named "_expression"
(CommandLineParser.PARAM_EXPRESSION).
[{Assert debug='true' [Fido] Isa [Dog] }]
This plugin is not based on QueryPlugin but does have dependencies on both it and some common QueryPlugin-related classes.
The interaction of the parameters and an attempt at helpful error messages means that the output section of this plugin is rather convoluted.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
protected WikiContext |
m_context
|
protected boolean |
m_debug
|
protected boolean |
m_echo
|
protected String |
m_emptyText
|
protected WikiEngine |
m_engine
|
protected AssertionHandler |
m_handler
|
protected boolean |
m_hide
|
protected boolean |
m_isTemplate
|
protected int |
m_outputFormat
|
protected Map |
m_params
|
protected AssertionProcessor |
m_parser
|
protected static QueryItemManager |
m_queryManager
|
protected String |
NoPagesFound
|
static String |
PARAM_ECHO
|
static String |
PARAM_HIDE
|
static String |
PARAM_OUTPUT
|
static String |
PARAM_TEMPLATE
|
static String |
PLUGIN_NAME
|
| Fields inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin |
|---|
CORE_PLUGINS_RESOURCEBUNDLE |
| Fields inherited from interface org.ceryle.wiki.plugin.util.PluginConstants |
|---|
ACL, AOP, APOS_ENT, ASTERISK, BCL, BOP, BR, CAPCL, CAPOP, CLATT, COLON, COMMA, DIV_class, DIV_style, DIVCL, DOT, EQ, EQQUO, EQSQUO, FALSE, FORMCL, FORMOP, GET, ICL, INPUTOP, IOP, LABELCL, LABELFOR, LABELOP, LCURL, LICL, LIOP, LPAR, LSBR, MT, NBSP, NL, OLCL, OLOP, P_class, PCL, PLUGCL, PLUGO, POP, POST, QUO, QUOCL, QUOETCL, RCURL, RPAR, RSBR, SEMI, SP, SPAN_class, SPANCL, SPANOP, SQUO, TABLECL, TABLEOP, TDCL, TDOP, THCL, THOP, TRCL, TROP, TRUE, TTCL, TTOP, ULCL, ULOP, UNDER |
| Constructor Summary | |
|---|---|
AssertionPlugin()
|
|
| Method Summary | |
|---|---|
protected boolean |
appendErrorMessage(StringBuffer out,
Exception exception,
Expression expr,
String body)
Appends a suitable error message. |
protected void |
assertionError(WikiContext context,
StringBuffer out,
Exception exception)
Process an error by clearing the existing buffer and populating it with an error message. |
protected Stack |
convertToTerms(Map params,
String pagename)
Converts the terms of the expression. |
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)
Execute the plugin, obtaining the '_cmdline' parameter, processing accordingly, returning XHTML-compatible markup. |
WikiEngine |
getEngine()
Returns the WikiEngine supporting the wiki environment of this plugin. |
void |
initialize(WikiContext context,
Map map)
For compliance with earlier versions of the InitializablePlugin API. |
void |
initialize(WikiEngine engine)
The initialization method. |
protected void |
processExpression(StringBuffer out,
String body,
Stack terms)
Parses the parameter Map, processing and converting the terms as necessary. |
| 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 PLUGIN_NAME
public static final String PARAM_ECHO
public static final String PARAM_HIDE
public static final String PARAM_OUTPUT
public static final String PARAM_TEMPLATE
protected String NoPagesFound
protected String m_emptyText
protected WikiContext m_context
protected Map m_params
protected boolean m_echo
protected boolean m_hide
protected boolean m_isTemplate
protected boolean m_debug
protected int m_outputFormat
protected static QueryItemManager m_queryManager
protected AssertionHandler m_handler
protected AssertionProcessor m_parser
protected WikiEngine m_engine
| Constructor Detail |
|---|
public AssertionPlugin()
| Method Detail |
|---|
public String execute(WikiContext context,
Map params)
execute in interface WikiPlugincontext - params -
WikiPlugin.execute(com.ecyrd.jspwiki.WikiContext,java.util.Map)public WikiEngine getEngine()
protected Stack convertToTerms(Map params,
String pagename)
throws PluginException
PluginException
protected void processExpression(StringBuffer out,
String body,
Stack terms)
throws QueryException,
AssertionException,
PluginException
QueryException
AssertionException
PluginException
protected boolean appendErrorMessage(StringBuffer out,
Exception exception,
Expression expr,
String body)
protected void assertionError(WikiContext context,
StringBuffer out,
Exception exception)
protected void error(WikiContext context,
StringBuffer out,
Exception e)
public void initialize(WikiContext context,
Map map)
throws PluginException
PluginException
public void initialize(WikiEngine engine)
throws PluginException
initialize in interface InitializablePluginPluginException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||