com.pushtotest.tool.parser.html
Interface HTMLForm

All Known Implementing Classes:
HTML4Form, XHTMLForm

public interface HTMLForm

This is an interface to implement a specific HTMLForm type. This object allows for the programatic building of HTML Forms.


Field Summary
static java.lang.String GET
           
static java.lang.String POST
           
 
Method Summary
 void addElement(FormElement element)
          Adds a FormElement to this form.
 java.lang.String getAccept()
          Getter for property accept.
 java.lang.String getAction()
          Gets the action parameter that this method has.
 java.util.List getElements()
          Get a list of all of the top level elements contained in this form.
 java.lang.String getEncoding()
          Getter for property encoding.
 java.lang.String getMethod()
          Gets the method that this form will use to submit its data.
 java.lang.String getName()
          Getter for property name.
 void setAccept(java.lang.String accept)
          Setter for property accept.
 void setAction(java.lang.String action)
          Sets the action parameter of this form.
 void setEncoding(java.lang.String encoding)
          Setter for property encoding.
 void setMethod(java.lang.String method)
          Sets the http method that this form should use to submit its data.
 void setName(java.lang.String name)
          Setter for property name.
 

Field Detail

POST

static final java.lang.String POST
See Also:
Constant Field Values

GET

static final java.lang.String GET
See Also:
Constant Field Values
Method Detail

setAction

void setAction(java.lang.String action)
Sets the action parameter of this form.

Parameters:
action - The action parameter.

getAction

java.lang.String getAction()
Gets the action parameter that this method has.

Returns:
The action parameter of this form or null if none is set.

getMethod

java.lang.String getMethod()
Gets the method that this form will use to submit its data.

Returns:
The method that this form will use.

setMethod

void setMethod(java.lang.String method)
               throws java.lang.IllegalArgumentException
Sets the http method that this form should use to submit its data.

Parameters:
method - The method parameter of this form. Generally either POST or GET
Throws:
java.lang.IllegalArgumentException - If the method is not supported by this form.

getEncoding

java.lang.String getEncoding()
Getter for property encoding.

Returns:
Value of property encoding.

setEncoding

void setEncoding(java.lang.String encoding)
Setter for property encoding.

Parameters:
encoding - New value of property encoding.

getAccept

java.lang.String getAccept()
Getter for property accept.

Returns:
Value of property accept.

setAccept

void setAccept(java.lang.String accept)
Setter for property accept.

Parameters:
accept - New value of property accept.

getName

java.lang.String getName()
Getter for property name.

Returns:
Value of property name.

setName

void setName(java.lang.String name)
Setter for property name.

Parameters:
name - New value of property name.

addElement

void addElement(FormElement element)
Adds a FormElement to this form.

Parameters:
element - The {#link com.pushtotest.tool.protocolhandler.html.FormElement FormElement} to add to this Form.

getElements

java.util.List getElements()
Get a list of all of the top level elements contained in this form.

Returns:
All of the top level elements contained in this form.