org.ceryle.wiki.plugin.assertion
Class AssertedPlugin

java.lang.Object
  extended by org.ceryle.wiki.plugin.assertion.AssertedPlugin
All Implemented Interfaces:
WikiPlugin
Direct Known Subclasses:
Asserted, HasAssertedTagOfPlugin

public class AssertedPlugin
extends Object
implements WikiPlugin

A plugin that performs a query using methods from the WikiMapManager to list the entire set of wiki Assertions, or applies one or more filters upon that set. The output can either mimic the original Assertions or be formatted as a bullet or numbered list, count only, etc.

Parameters

If following any parameters an assertion expression is included, it will override the subject, predicate and object parameters (i.e., all three are ignored). The wild card "[*]" will match any page. E.g., "[*] [*] [*]" will match all pages — the same as providing no parameters or expression. "[*] [IsA] [Book]" will match all pages asserted as being a Book.

Example

The first example lists all Assertions, the second applies the specific filter, returning all wiki pages that have been asserted as instances of the class "Book".

    [{Assertions}]
    [{Assertions predicate='IsA' object='[Book]' }]
  

Author:
Murray Altheim

Field Summary
static String PARAM_LOGIC
           
static String PARAM_OBJECT
           
static String PARAM_OUTPUT
           
static String PARAM_PAGE
           
static String PARAM_PREDICATE
           
static String PARAM_RAW
           
static String PARAM_SUBJECT
           
static String PARAM_TEMPLATES
           
 
Fields inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin
CORE_PLUGINS_RESOURCEBUNDLE
 
Constructor Summary
AssertedPlugin()
           
 
Method Summary
 String execute(WikiContext context, Map params)
           
protected  void printResult(WikiContext context, StringBuffer out, Collection assertions, int format)
          Generate output from the Collection of assertions according to the format, writing it to the StringBuffer out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_PAGE

public static final String PARAM_PAGE
See Also:
Constant Field Values

PARAM_SUBJECT

public static final String PARAM_SUBJECT
See Also:
Constant Field Values

PARAM_PREDICATE

public static final String PARAM_PREDICATE
See Also:
Constant Field Values

PARAM_OBJECT

public static final String PARAM_OBJECT
See Also:
Constant Field Values

PARAM_OUTPUT

public static final String PARAM_OUTPUT
See Also:
Constant Field Values

PARAM_TEMPLATES

public static final String PARAM_TEMPLATES
See Also:
Constant Field Values

PARAM_LOGIC

public static final String PARAM_LOGIC
See Also:
Constant Field Values

PARAM_RAW

public static final String PARAM_RAW
See Also:
Constant Field Values
Constructor Detail

AssertedPlugin

public AssertedPlugin()
Method Detail

execute

public String execute(WikiContext context,
                      Map params)
Specified by:
execute in interface WikiPlugin

printResult

protected void printResult(WikiContext context,
                           StringBuffer out,
                           Collection assertions,
                           int format)
Generate output from the Collection of assertions according to the format, writing it to the StringBuffer out. The output format is as according to PluginTextUtils.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.