com.acciente.induction.controller
Class HTMLForm

java.lang.Object
  extended by com.acciente.induction.controller.HTMLForm
All Implemented Interfaces:
Form

public class HTMLForm
extends Object
implements Form

Internal. The implementation backing the the Form interface.

Author:
Adinath Raveendra Raj

Constructor Summary
HTMLForm(javax.servlet.http.HttpServletRequest oHttpServletRequest, Config.FileUpload oFileUploadConfig)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLForm

public HTMLForm(javax.servlet.http.HttpServletRequest oHttpServletRequest,
                Config.FileUpload oFileUploadConfig)
Method Detail

getObject

public Object getObject(String sParamName)
                 throws FormException
Description copied from interface: Form
Return the value of the specified HTML form parameter as an object value

Specified by:
getObject in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getList

public List getList(String sParamName)
             throws FormException
Description copied from interface: Form
Return the value of the specified list HTML form parameter

Specified by:
getList in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a list of strings (and/or otehr types as specified on the form)
Throws:
FormException

getMap

public Map getMap(String sParamName)
           throws FormException
Description copied from interface: Form
Return the value of the specified map HTML form parameter

Specified by:
getMap in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a map with string keys and data or other maps in the value
Throws:
FormException

getString

public String getString(String sParamName)
                 throws FormException
Description copied from interface: Form
Return the value of the specified HTML form parameter as a string value

Specified by:
getString in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getInteger

public int getInteger(String sParamName)
               throws FormException
Description copied from interface: Form
Return the value of the specified HTML form parameter as an integer value

Specified by:
getInteger in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getFloat

public float getFloat(String sParamName)
               throws FormException
Description copied from interface: Form
Return the value of the specified HTML form parameter as a float value

Specified by:
getFloat in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getLong

public long getLong(String sParamName)
             throws FormException
Description copied from interface: Form
Return the value of the specified HTML form parameter as a long value

Specified by:
getLong in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getBoolean

public boolean getBoolean(String sParamName)
                   throws FormException
Description copied from interface: Form
Return the value of the specified HTML form parameter as a boolean value

Specified by:
getBoolean in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getFile

public com.acciente.commons.htmlform.FileHandle getFile(String sParamName)
                                                 throws FormException
Description copied from interface: Form
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

Specified by:
getFile in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
a string value
Throws:
FormException

getParamNames

public Set getParamNames()
                  throws FormException
Description copied from interface: Form
Returns a list of the parameter names in the HTML form

Specified by:
getParamNames in interface Form
Returns:
a list containing strings, each string being a parameter name
Throws:
FormException

containsParam

public boolean containsParam(String sParamName)
                      throws FormException
Description copied from interface: Form
Used to check if the specified HTML form has the specified parameter. Parameter names are case-sensitive.

Specified by:
containsParam in interface Form
Parameters:
sParamName - the name of the HTML form parameter
Returns:
true if the parameter is defined in the form, false otherwise
Throws:
FormException


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