|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ecyrd.jspwiki.forms.FormElement
org.ceryle.wiki.plugin.form.MetaFormPlugin
public class MetaFormPlugin
MetaFormPlugin extends FormElement
in the same manner as FormPlugin, except that it reads from and writes to
the metadata of a wiki page backed by an XNodeProvider (from an XNodeStore).
Currently, the plugin will actually fail to create edit session if unable to obtain a page lock. This may be extreme, given that normally the wiki permits over-edits, but given this is a form interface it is more likely to lose content in the event of a failure. Maybe not? This is something to check out in practice...
This permits modification of internal XNodeStore database metadata from an external, web-based form. While no security implications are immediately obvious, modification of the internal database by an external party may have unknown results.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
protected boolean |
m_checkAboutPage
|
protected boolean |
m_checkPermissions
|
protected WikiEngine |
m_engine
|
protected String |
m_pluginName
This is the common plugin invocation name, and should match a wiki page name for documentation. |
static int |
MAX_FIELD_LENGTH
The maximum field content length before the form will use a textarea rather than an input field. |
static int |
MODE_CANCEL
Constant indicating Cancel button activated mode. |
static int |
MODE_EDIT
Constant indicating Edit mode. |
static int |
MODE_INIT
Constant indicating initial mode. |
static int |
MODE_SAVE
Constant indicating Save button activated mode. |
static int |
MODE_SELECT
Constant indicating Select button activated mode. |
static int |
MODE_VIEW
Constant indicating form view mode. |
static String |
PARAM_CID
The cid parameter name. |
static String |
PARAM_NID
The nid parameter name. |
static String |
PARAM_VERBOSE
The verbose parameter name. |
static String |
PARAM_XID
The xid parameter name. |
static boolean |
TEXT_WRAP_PRE
When true, text documents are wrapped with a <pre> element. |
protected static String |
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 | |
|---|---|
MetaFormPlugin()
Default constructor. |
|
| Method Summary | |
|---|---|
String |
execute(WikiContext context,
Map params)
Execute the plugin, processing accordingly, returning XHTML-compatible markup. |
int |
getMode()
Return the current plugin mode. |
String |
getModeName()
Return the name of the current mode. |
String |
getXID()
Return the value of the xid parameter, null if undefined. |
protected void |
printTest(Map map,
StringBuffer out,
String title,
String color)
Print out the name-value pairs of the Map map to the StringBuffer, using the title and color spec. |
protected void |
writeFormOutput(WikiContext context,
List controls,
StringBuffer out)
Writes the form output provided by the List of FormControls to the StringBuffer out. |
| 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 |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
protected String m_pluginName
public static boolean TEXT_WRAP_PRE
public static final int MODE_INIT
public static final int MODE_VIEW
public static final int MODE_CANCEL
public static final int MODE_EDIT
public static final int MODE_SELECT
public static final int MODE_SAVE
public static final String PARAM_XID
public static final String PARAM_CID
public static final String PARAM_NID
public static final String PARAM_VERBOSE
public static int MAX_FIELD_LENGTH
protected static String unknownUser
protected boolean m_checkPermissions
protected boolean m_checkAboutPage
protected WikiEngine m_engine
| Constructor Detail |
|---|
public MetaFormPlugin()
| Method Detail |
|---|
public String execute(WikiContext context,
Map params)
execute in interface WikiPlugincontext - params -
WikiPlugin.execute(com.ecyrd.jspwiki.WikiContext,java.util.Map)public String getXID()
protected void writeFormOutput(WikiContext context,
List controls,
StringBuffer out)
context - the WikiContext of the form sessioncontrols - the List of FormControlsout - the output buffer
protected void printTest(Map map,
StringBuffer out,
String title,
String color)
public int getMode()
public final String getModeName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||