Return to www.inductionframework.org

com.acciente.induction.controller
Class HTMLForm

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

public class HTMLForm
extends java.lang.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(java.lang.String sParamName)
          Used to check if the specified HTML form has the specified parameter.
 boolean getBoolean(java.lang.String sParamName)
          Return the value of the specified HTML form parameter as a boolean value
 com.acciente.commons.htmlform.FileHandle getFile(java.lang.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(java.lang.String sParamName)
          Return the value of the specified HTML form parameter as a float value
 int getInteger(java.lang.String sParamName)
          Return the value of the specified HTML form parameter as an integer value
 java.util.List getList(java.lang.String sParamName)
          Return the value of the specified list HTML form parameter
 long getLong(java.lang.String sParamName)
          Return the value of the specified HTML form parameter as a long value
 java.util.Map getMap(java.lang.String sParamName)
          Return the value of the specified map HTML form parameter
 java.lang.Object getObject(java.lang.String sParamName)
          Return the value of the specified HTML form parameter as an object value
 java.util.Set getParamNames()
          Returns a list of the parameter names in the HTML form
 java.lang.String getString(java.lang.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 java.lang.Object getObject(java.lang.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 java.util.List getList(java.lang.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 java.util.Map getMap(java.lang.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 java.lang.String getString(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.util.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(java.lang.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

Return to www.inductionframework.org

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