com.pushtotest.tool.parser.html
Class HTML4Form

java.lang.Object
  extended by com.pushtotest.tool.parser.html.HTML4Form
All Implemented Interfaces:
HTMLForm

public class HTML4Form
extends java.lang.Object
implements HTMLForm


Field Summary
 
Fields inherited from interface com.pushtotest.tool.parser.html.HTMLForm
GET, POST
 
Constructor Summary
HTML4Form()
           
 
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.
 java.lang.String toString()
          Gets a string representation of the form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTML4Form

public HTML4Form()
Method Detail

setAction

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

Specified by:
setAction in interface HTMLForm
Parameters:
action - The action parameter.

getAction

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

Specified by:
getAction in interface HTMLForm
Returns:
The action parameter of this form or null if none is set.

getMethod

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

Specified by:
getMethod in interface HTMLForm
Returns:
The method that this form will use.

setMethod

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

Specified by:
setMethod in interface HTMLForm
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

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

Specified by:
getEncoding in interface HTMLForm
Returns:
Value of property encoding.

setEncoding

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

Specified by:
setEncoding in interface HTMLForm
Parameters:
encoding - New value of property encoding.

getAccept

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

Specified by:
getAccept in interface HTMLForm
Returns:
Value of property accept.

setAccept

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

Specified by:
setAccept in interface HTMLForm
Parameters:
accept - New value of property accept.

getName

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

Specified by:
getName in interface HTMLForm
Returns:
Value of property name.

setName

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

Specified by:
setName in interface HTMLForm
Parameters:
name - New value of property name.

addElement

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

Specified by:
addElement in interface HTMLForm
Parameters:
element - The {#link com.pushtotest.tool.protocolhandler.html.FormElement FormElement} to add to this Form.

getElements

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

Specified by:
getElements in interface HTMLForm
Returns:
All of the top level elements contained in this form.

toString

public java.lang.String toString()
Gets a string representation of the form.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this entire form.