Return to www.inductionframework.org

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.


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
 

Method Detail

getObject

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

getString

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

getInteger

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

getFloat

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

getLong

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

getBoolean

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

getFile

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

getParamNames

java.util.Set getParamNames()
                            throws java.io.IOException,
                                   org.apache.commons.fileupload.FileUploadException,
                                   com.acciente.commons.htmlform.ParserException
Returns a list of the parameter names in the HTML 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

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

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.