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.


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
 long getLong(java.lang.String sParamName)
          Return the value of the specified HTML form parameter as a long value
 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
equals, 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 java.io.IOException,
                                  org.apache.commons.fileupload.FileUploadException,
                                  com.acciente.commons.htmlform.ParserException,
                                  HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getString

public java.lang.String getString(java.lang.String sParamName)
                           throws java.io.IOException,
                                  org.apache.commons.fileupload.FileUploadException,
                                  com.acciente.commons.htmlform.ParserException,
                                  HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getInteger

public int getInteger(java.lang.String sParamName)
               throws java.io.IOException,
                      org.apache.commons.fileupload.FileUploadException,
                      com.acciente.commons.htmlform.ParserException,
                      HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getFloat

public float getFloat(java.lang.String sParamName)
               throws java.io.IOException,
                      org.apache.commons.fileupload.FileUploadException,
                      com.acciente.commons.htmlform.ParserException,
                      HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getLong

public long getLong(java.lang.String sParamName)
             throws java.io.IOException,
                    org.apache.commons.fileupload.FileUploadException,
                    com.acciente.commons.htmlform.ParserException,
                    HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getBoolean

public boolean getBoolean(java.lang.String sParamName)
                   throws java.io.IOException,
                          org.apache.commons.fileupload.FileUploadException,
                          com.acciente.commons.htmlform.ParserException,
                          HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getFile

public com.acciente.commons.htmlform.FileHandle getFile(java.lang.String sParamName)
                                                 throws java.io.IOException,
                                                        org.apache.commons.fileupload.FileUploadException,
                                                        com.acciente.commons.htmlform.ParserException,
                                                        HTMLFormException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

getParamNames

public java.util.Set getParamNames()
                            throws java.io.IOException,
                                   org.apache.commons.fileupload.FileUploadException,
                                   com.acciente.commons.htmlform.ParserException
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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException

containsParam

public boolean containsParam(java.lang.String sParamName)
                      throws java.io.IOException,
                             org.apache.commons.fileupload.FileUploadException,
                             com.acciente.commons.htmlform.ParserException,
                             HTMLFormException
Description copied from interface: Form
Used to check if the specified HTML form has the specified parameter

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:
java.io.IOException
org.apache.commons.fileupload.FileUploadException
com.acciente.commons.htmlform.ParserException
HTMLFormException

Return to www.inductionframework.org

Copyright (c) 2008 Acciente, LLC. All rights reserved.