Package org.apache.wiki.forms
Class FormInfo
java.lang.Object
org.apache.wiki.forms.FormInfo
- All Implemented Interfaces:
java.io.Serializable
public class FormInfo extends java.lang.Object implements java.io.Serializable
Container for carrying HTTP FORM information between Plugin invocations in the Session.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FormInfo()Creates a new FormInfo with status == OK. -
Method Summary
Modifier and Type Method Description voidaddSubmission(java.util.Map<java.lang.String,java.lang.String> val)Adds the given values into the handler parameter map.java.lang.StringgetAction()Get the action set insetAction(String).java.lang.StringgetError()Return the error.java.lang.StringgetHandler()Return the name of the handler class.java.lang.StringgetName()Return the name of the form.java.lang.StringgetResult()Return the result.intgetStatus()Return the status.java.util.Map<java.lang.String,java.lang.String>getSubmission()Returns parameter name-value pairs for a Form handler WikiPlugin.booleanhide()Returns true, if the form is supposed to be hidden.voidsetAction(java.lang.String val)Set the value of the action parameter.voidsetError(java.lang.String val)Set an error string.voidsetHandler(java.lang.String val)Set the name of the handler class.voidsetHide(boolean val)Set the hide parameter.voidsetName(java.lang.String val)Sets the name of the form.voidsetResult(java.lang.String val)Set the result.voidsetStatus(int val)Set the status of the Form processing.voidsetSubmission(java.util.Map<java.lang.String,java.lang.String> val)Copies the given values into the handler parameter map using Map.putAll().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
EXECUTED
State: Form is executed.- See Also:
- Constant Field Values
-
OK
State: Form is OK.- See Also:
- Constant Field Values
-
ERROR
State: There was an error.- See Also:
- Constant Field Values
-
-
Constructor Details
-
FormInfo
public FormInfo()Creates a new FormInfo with status == OK.
-
-
Method Details
-
setStatus
Set the status of the Form processing.- Parameters:
val- EXECUTED, OK or ERROR.
-
getStatus
Return the status.- Returns:
- The status.
-
setHide
Set the hide parameter.- Parameters:
val- True or false.
-
hide
Returns true, if the form is supposed to be hidden.- Returns:
- True or false.
-
setAction
Set the value of the action parameter.- Parameters:
val- A value parameter.
-
getAction
Get the action set insetAction(String).- Returns:
- An Action.
-
setName
Sets the name of the form.- Parameters:
val- The name of the form.
-
getName
Return the name of the form.- Returns:
- The name of the form.
-
setHandler
Set the name of the handler class.- Parameters:
val- The name of the class.
-
getHandler
Return the name of the handler class.- Returns:
- The name of the class.
-
setResult
Set the result.- Parameters:
val- The result.
-
getResult
Return the result.- Returns:
- The result.
-
setError
Set an error string.- Parameters:
val- An error string.
-
getError
Return the error.- Returns:
- The error.
-
setSubmission
Copies the given values into the handler parameter map using Map.putAll().- Parameters:
val- parameter name-value pairs for a Form handler WikiPlugin
-
addSubmission
Adds the given values into the handler parameter map.- Parameters:
val- parameter name-value pairs for a Form handler WikiPlugin
-
getSubmission
Returns parameter name-value pairs for a Form handler WikiPlugin. The names are those of Form input fields, and the values whatever the user selected in the form. The FormSet plugin can also be used to provide initial values.- Returns:
- Handler parameter name-value pairs.
-