org.ceryle.wiki.plugin.assertion
Class AssertionFormPlugin

java.lang.Object
  extended by com.ecyrd.jspwiki.forms.FormElement
      extended by org.ceryle.wiki.plugin.form.FormPlugin
          extended by org.ceryle.wiki.plugin.assertion.AssertionFormPlugin
All Implemented Interfaces:
WikiPlugin, PluginConstants
Direct Known Subclasses:
AssertForm

public class AssertionFormPlugin
extends FormPlugin
implements WikiPlugin, PluginConstants

The AssertionFormPlugin extends the FormPlugin, treating the form controls (generally, input fields) as a set of asserted name-value properties.

Author:
Murray Altheim

Field Summary
 
Fields inherited from class org.ceryle.wiki.plugin.form.FormPlugin
CANCEL_BUTTON_NAME, cancelButtonLabel, editButtonLabel, m_capitalize, m_checkAboutPage, m_checkPermissions, m_debug, m_engine, m_formname, m_id, m_ignore, m_mode, m_pluginName, m_prefix, m_prefixes, m_prototype, m_style, m_submitServlet, m_useSelect, m_verbose, MAX_FIELD_LENGTH, MODE_CANCEL, MODE_EDIT, MODE_INIT, MODE_SAVE, MODE_SELECT, MODE_VIEW, PARAM_ABOUT, PARAM_CAPITALIZE, PARAM_LABEL_CANCEL, PARAM_LABEL_EDIT, PARAM_LABEL_SAVE, PARAM_PREFIX, PARAM_STYLE, PARAM_TEST, PARAM_VERBOSE, REMOVE_TAG, saveButtonLabel, SELECT_BUTTON_NAME, selectButtonLabel, SIZEMAP_PREFIX, SUBMIT_BUTTON_NAME, unknownUser
 
Fields inherited from class com.ecyrd.jspwiki.forms.FormElement
FORM_VALUES_CARRIER, HANDLERPARAM_PREFIX, HIDE_SUCCESS, PARAM_ELEMENT, PARAM_FORM, PARAM_FORMNAMEHIDDEN, PARAM_HANDLER, PARAM_HIDEFORM, PARAM_INPUTNAME, PARAM_POPULATE, PARAM_SUBMITHANDLER, PARAM_VALUE
 
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
AssertionFormPlugin()
          Default constructor.
 
Method Summary
 String execute(WikiContext context, Map params)
          Execute the plugin, returning XHTML-compatible markup.
 void postSave(WikiContext context, List controls)
          A stub method called just after saving the plugin text back to the page provider in mode MODE_SAVE.
 void postWrite(WikiContext context, List controls, StringBuffer out)
          A method called just after the form output is generated to the output buffer in mode MODE_VIEW.
 void preSave(WikiContext context, List controls)
          A stub method called just prior to saving the plugin text back to the page provider in mode MODE_SAVE.
 void preWrite(WikiContext context, List controls, StringBuffer out)
          A stub method called just prior to the form output being generated to the output buffer in mode MODE_VIEW.
 
Methods inherited from class org.ceryle.wiki.plugin.form.FormPlugin
checkAuthorization, createFormControls, error, getAbout, getIgnoreParams, getMode, getModeName, getSizeFor, getSizeMap, getStyleParameter, lockPage, printTest, setSizeFor, transferSubmission, unlockPage, writeFormOutput, writePageText
 
Methods inherited from class com.ecyrd.jspwiki.forms.FormElement
getFormInfo, storeFormInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertionFormPlugin

public AssertionFormPlugin()
Default constructor.

Method Detail

execute

public String execute(WikiContext context,
                      Map params)
Execute the plugin, returning XHTML-compatible markup.

Specified by:
execute in interface WikiPlugin
Overrides:
execute in class FormPlugin
Parameters:
context -
params -
Returns:
the generated output to be displayed on the wiki page.
See Also:
WikiPlugin.execute(com.ecyrd.jspwiki.WikiContext,java.util.Map)

postWrite

public void postWrite(WikiContext context,
                      List controls,
                      StringBuffer out)
A method called just after the form output is generated to the output buffer in mode MODE_VIEW.

Generates an AssertionEvent for each valid FormControl. A FormControl with a value of null or an empty String is ignored.

Specified by:
postWrite in class FormPlugin
Parameters:
context - the WikiContext of the form session
controls - the List of FormControls
out - the output buffer

preSave

public void preSave(WikiContext context,
                    List controls)
Description copied from class: FormPlugin
A stub method called just prior to saving the plugin text back to the page provider in mode MODE_SAVE.

Specified by:
preSave in class FormPlugin
Parameters:
context - the WikiContext of the form session
controls - the List of FormControls

postSave

public void postSave(WikiContext context,
                     List controls)
Description copied from class: FormPlugin
A stub method called just after saving the plugin text back to the page provider in mode MODE_SAVE.

Specified by:
postSave in class FormPlugin
Parameters:
context - the WikiContext of the form session
controls - the List of FormControls

preWrite

public void preWrite(WikiContext context,
                     List controls,
                     StringBuffer out)
Description copied from class: FormPlugin
A stub method called just prior to the form output being generated to the output buffer in mode MODE_VIEW.

Specified by:
preWrite in class FormPlugin
Parameters:
context - the WikiContext of the form session
controls - the List of FormControls
out - the output buffer


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