com.acciente.induction.controller
Interface Form

All Known Implementing Classes:
HTMLForm

public interface Form

This interface provides access to the HTML form submitted as part of the request (if any). Both GET and POST parameters are accesible. If the same parameter is defined via GET and POST the value sent via POST prevails.

Author:
Adinath Raveendra Raj

Method Summary
 boolean containsParam(String sParamName)
          Used to check if the specified HTML form has the specified parameter.
 boolean getBoolean(String sParamName)
          Return the value of the specified HTML form parameter as a boolean value
 com.acciente.commons.htmlform.FileHandle getFile(String sParamName)
          Return the value of the specified HTML form parameter as a file handle, this method should only be used to access a form parameter that represents an uploded file
 float getFloat(String sParamName)
          Return the value of the specified HTML form parameter as a float value
 int getInteger(String sParamName)
          Return the value of the specified HTML form parameter as an integer value
 List getList(String sParamName)
          Return the value of the specified list HTML form parameter
 long getLong(String sParamName)
          Return the value of the specified HTML form parameter as a long value
 Map getMap(String sParamName)
          Return the value of the specified map HTML form parameter
 Object getObject(String sParamName)
          Return the value of the specified HTML form parameter as an object value
 Set getParamNames()
          Returns a list of the parameter names in the HTML form
 String getString(String sParamName)
          Return the value of the specified HTML form parameter as a string value
 

Method Detail

getObject

Object getObject(String sParamName)
                 throws FormException
Return the value of the specified HTML form parameter as an object value

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getMap

Map getMap(String sParamName)
           throws FormException
Return the value of the specified map HTML form parameter

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a map with string keys and data or other maps in the value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getList

List getList(String sParamName)
             throws FormException
Return the value of the specified list HTML form parameter

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a list of strings (and/or otehr types as specified on the form)
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getString

String getString(String sParamName)
                 throws FormException
Return the value of the specified HTML form parameter as a string value

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getInteger

int getInteger(String sParamName)
               throws FormException
Return the value of the specified HTML form parameter as an integer value

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getFloat

float getFloat(String sParamName)
               throws FormException
Return the value of the specified HTML form parameter as a float value

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getLong

long getLong(String sParamName)
             throws FormException
Return the value of the specified HTML form parameter as a long value

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getBoolean

boolean getBoolean(String sParamName)
                   throws FormException
Return the value of the specified HTML form parameter as a boolean value

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getFile

com.acciente.commons.htmlform.FileHandle getFile(String sParamName)
                                                 throws FormException
Return the value of the specified HTML form parameter as a file handle, this method should only be used to access a form parameter that represents an uploded file

Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException

getParamNames

Set getParamNames()
                  throws FormException
Returns a list of the parameter names in the HTML form

Returns:
a list containing strings, each string being a parameter name
Throws:
FormException

containsParam

boolean containsParam(String sParamName)
                      throws FormException
Used to check if the specified HTML form has the specified parameter. Parameter names are case-sensitive.

Parameters:
sParamName - the name of the HTML form parameter
Returns:
true if the parameter is defined in the form, false otherwise
Throws:
IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
FormException


Copyright © 2008-2013 Acciente, LLC. All Rights Reserved.