public class FormHandlerExecutor
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
protected class  | 
FormHandlerExecutor.DefaultDynamoHttpServletRequestWrapper
Class for a default request wrapper to handle calls to the form handler. 
 | 
class  | 
FormHandlerExecutor.DefaultDynamoHttpServletResponse
Class for a default response to handle calls to the form handler. 
 | 
class  | 
FormHandlerExecutor.FormHandlerInvocationResult
It holds the form handler result and actual form handler which is invoked. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string. 
 | 
static java.lang.String | 
DROPLET_DESCRIPTOR_CANT_FIND_COMPONENT  | 
static java.lang.String | 
INVALID_FORM_HANDLER
The Constant INVALID_FORM_HANDLER. 
 | 
static java.lang.String | 
NULL
Placeholder value for null. 
 | 
| Constructor and Description | 
|---|
FormHandlerExecutor(java.lang.String pFormHandler,
                   java.lang.String pHandlerMethod)
Create a new FormHandlerExecutor element. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addInput(java.lang.String pName,
        java.lang.Object pValue)
Adds an input field to this form. 
 | 
void | 
addInput(java.lang.String pName,
        java.lang.Object pValue,
        java.lang.String pType,
        java.lang.String pFormName,
        int pPriority,
        java.lang.String pDefault,
        TagConverter pConverter,
        java.util.Properties pConverterArgs)
Adds an input field to this form. 
 | 
void | 
addInput(java.lang.String pName,
        java.lang.Object pValue,
        TagConverter pConverter,
        java.util.Properties pConverterArgs)
Adds an input field to this form. 
 | 
void | 
addRequestData(java.util.Map<java.lang.String,java.lang.String> pValues)
Adds the given keys (and values) to the request as parameters. 
 | 
protected void | 
checkInputType(java.lang.String pType)
Check to type of the form input field. 
 | 
FormHandlerExecutor.FormHandlerInvocationResult | 
createFormHandlerInvocationResult()
Calls methods to create a request and response and then creates a form handler invocation result object to hold
 the result of invoking the form handler. 
 | 
DynamoHttpServletRequest | 
createRequestWrapper()
Creates a request to handle calls to the form handler. 
 | 
DynamoHttpServletResponse | 
createResponse()
Creates a response to use in calls to the form handler. 
 | 
FormHandlerExecutor.FormHandlerInvocationResult | 
execute()
It builds the form tag and sends an event which internally execute the form
 handler and returns the result back. 
 | 
java.lang.String | 
getErrorURLProperty(java.lang.String pHandlerMethod)
Method to workaround a form handler redirect bug 13572977 which can result in form handler processing continuing
 even after an error if the error url is null. 
 | 
java.lang.Object | 
getFormHandler()
Gets the resolved form handler. 
 | 
FormTag | 
getFormTag()
Return the form tag. 
 | 
java.util.Set<java.lang.String> | 
getInputNames()
Returns a Set containing the names of the input fields on this form. 
 | 
java.lang.Object | 
getInputValues(java.lang.String pName)
Returns the value of an input with the given name, pName. 
 | 
java.lang.String | 
getXssFiltering()
Gets the xss filtering. 
 | 
boolean | 
isRequiresSessionConfirmation()
Checks if is requires session confirmation. 
 | 
void | 
processFormHandlerResult(FormHandlerExecutor.FormHandlerInvocationResult pFormHandlerResult)
Check for form exceptions and errors on the result of the form handler invocation. 
 | 
void | 
setRequiresSessionConfirmation(boolean pRequiresSessionConfirmation)
Sets the requires session confirmation. 
 | 
protected void | 
setValueParametersOnExistingRequest(DynamoHttpServletRequest pRequest)
Set the value parameters dynamically on an existing request. 
 | 
void | 
setXssFiltering(java.lang.String pXssFiltering)
Sets the xss filtering. 
 | 
public static java.lang.String CLASS_VERSION
public static final java.lang.String NULL
public static final java.lang.String INVALID_FORM_HANDLER
public static final java.lang.String DROPLET_DESCRIPTOR_CANT_FIND_COMPONENT
public FormHandlerExecutor(java.lang.String pFormHandler,
                           java.lang.String pHandlerMethod)
                    throws DropletException
pFormHandler - the form's name (Nucleus absolute path)pHandlerMethod - the handler methodDropletException - the droplet exceptionpublic java.lang.String getXssFiltering()
public void setXssFiltering(java.lang.String pXssFiltering)
pXssFiltering - the new xss filteringpublic boolean isRequiresSessionConfirmation()
public void setRequiresSessionConfirmation(boolean pRequiresSessionConfirmation)
pRequiresSessionConfirmation - the new requires session confirmationpublic FormHandlerExecutor.FormHandlerInvocationResult createFormHandlerInvocationResult() throws java.io.IOException
java.io.IOExceptionpublic DynamoHttpServletRequest createRequestWrapper()
public DynamoHttpServletResponse createResponse() throws java.io.IOException
java.io.IOExceptionpublic void addInput(java.lang.String pName,
                     java.lang.Object pValue)
              throws javax.servlet.ServletException
pName - the name of the input field (this is also the parameter name).pValue - the value of the input field.javax.servlet.ServletException - if an error occurspublic void addInput(java.lang.String pName,
                     java.lang.Object pValue,
                     TagConverter pConverter,
                     java.util.Properties pConverterArgs)
              throws javax.servlet.ServletException
pName - the name of the input field (this is also the parameter name).pValue - the value of the input field.pConverter - the TagConverter to use (null means no converter)pConverterArgs - the converter args to use (null means no converter args)javax.servlet.ServletException - if an error occurspublic void addInput(java.lang.String pName,
                     java.lang.Object pValue,
                     java.lang.String pType,
                     java.lang.String pFormName,
                     int pPriority,
                     java.lang.String pDefault,
                     TagConverter pConverter,
                     java.util.Properties pConverterArgs)
              throws javax.servlet.ServletException
pName - the name of the input field (this is also the parameter name).pValue - the value of the input field.pType - the form type.pFormName - the Nucleus path of the form.pPriority - the input form tag priority.pDefault - a String valuepConverter - the TagConverter to use (null means no converter)pConverterArgs - the converter args to use (null means no converter args)javax.servlet.ServletException - if an error occurspublic void addRequestData(java.util.Map<java.lang.String,java.lang.String> pValues)
pValues - a map of keys and valuesprotected void checkInputType(java.lang.String pType)
pType - the type of the form input field.public java.util.Set<java.lang.String> getInputNames()
public java.lang.Object getInputValues(java.lang.String pName)
pName - the namepublic FormTag getFormTag()
public java.lang.Object getFormHandler()
protected void setValueParametersOnExistingRequest(DynamoHttpServletRequest pRequest)
pRequest - the new value parameters on existing requestpublic java.lang.String getErrorURLProperty(java.lang.String pHandlerMethod)
pHandlerMethod - Form handler method that will be invokedpublic FormHandlerExecutor.FormHandlerInvocationResult execute() throws DropletException
DropletException - the droplet exceptionpublic void processFormHandlerResult(FormHandlerExecutor.FormHandlerInvocationResult pFormHandlerResult) throws DropletException
pFormHandlerResult - the result of the form handler invocationDropletException - containing the exceptions that have occurred