com.meterware.httpunit
Class WebRequestSource

java.lang.Object
  |
  +--com.meterware.httpunit.ParameterHolder
        |
        +--com.meterware.httpunit.WebRequestSource
Direct Known Subclasses:
WebForm, WebLink

public abstract class WebRequestSource
extends ParameterHolder


Method Summary
protected abstract  void addPresetParameter(String name, String value)
          Records a parameter defined by including it in the destination URL.
protected  URL getBaseURL()
           
protected  String getDestination()
           
 Node getDOMSubtree()
          Returns a copy of the domain object model subtree associated with this entity.
 String getID()
          Returns the ID associated with this request source.
 String getName()
          Returns the name associated with this request source.
protected  Node getNode()
          Returns the actual DOM for this request source, not a copy.
abstract  String[] getParameterNames()
          Returns an array containing the names of any parameters to be sent on a request based on this request source.
abstract  String[] getParameterValues(String name)
          Returns the values of the named parameter.
abstract  WebRequest getRequest()
          Creates and returns a web request from this request source.
 String getTarget()
          Returns the target for this request source.
protected  void loadDestinationParameters()
          Extracts any parameters specified as part of the destination URL, calling addPresetParameter for each one in the order in which they are found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getID

public String getID()
Returns the ID associated with this request source.

getName

public String getName()
Returns the name associated with this request source.

getTarget

public String getTarget()
Returns the target for this request source.

getDOMSubtree

public Node getDOMSubtree()
Returns a copy of the domain object model subtree associated with this entity.

getRequest

public abstract WebRequest getRequest()
Creates and returns a web request from this request source.

getParameterNames

public abstract String[] getParameterNames()
Returns an array containing the names of any parameters to be sent on a request based on this request source.

getParameterValues

public abstract String[] getParameterValues(String name)
Returns the values of the named parameter.

getBaseURL

protected URL getBaseURL()

getDestination

protected String getDestination()

getNode

protected Node getNode()
Returns the actual DOM for this request source, not a copy.

loadDestinationParameters

protected final void loadDestinationParameters()
Extracts any parameters specified as part of the destination URL, calling addPresetParameter for each one in the order in which they are found.

addPresetParameter

protected abstract void addPresetParameter(String name,
                                           String value)
Records a parameter defined by including it in the destination URL. The value can be null, if the parameter name was not specified with an equals sign.