|
|||||||||
| Home >> All >> com >> meterware >> [ httpunit overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.meterware.httpunit
Class FixedURLWebRequestSource

java.lang.Objectcom.meterware.httpunit.ParameterHolder
com.meterware.httpunit.WebRequestSource
com.meterware.httpunit.FixedURLWebRequestSource
- All Implemented Interfaces:
- HTMLElement
- abstract class FixedURLWebRequestSource
- extends WebRequestSource
An implementation of web request source whose URL does not change under user action.
| Field Summary | |
private java.lang.String |
_characterSet
|
private java.util.ArrayList |
_presetParameterList
|
private java.util.Map |
_presetParameterMap
|
private static java.lang.String[] |
NO_VALUES
|
| Fields inherited from class com.meterware.httpunit.WebRequestSource |
|
| Constructor Summary | |
FixedURLWebRequestSource(WebResponse response,
org.w3c.dom.Node node,
java.net.URL baseURL,
java.lang.String destination,
FrameSelector frame,
java.lang.String defaultTarget,
java.lang.String characterSet)
|
|
| Method Summary | |
protected void |
addPresetParameter(java.lang.String name,
java.lang.String value)
Records a parameter defined by including it in the destination URL. |
private boolean |
equals(java.lang.String[] left,
java.lang.String[] right)
|
(package private) java.lang.String |
getCharacterSet()
Returns the character set encoding for the request. |
protected java.lang.String |
getEmptyParameterValue()
|
java.lang.String[] |
getParameterNames()
Returns an array containing the names of any parameters defined as part of this link's URL. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the multiple default values of the named parameter. |
private java.util.ArrayList |
getPresetParameterList()
|
private java.util.Map |
getPresetParameterMap()
|
WebRequest |
getRequest()
Creates and returns a web request which will simulate clicking on this link. |
(package private) boolean |
isFileParameter(java.lang.String name)
Returns true if the specified parameter is a file field. |
(package private) boolean |
isSubmitAsMime()
|
private void |
loadPresetParameters()
|
(package private) void |
recordParameters(ParameterProcessor processor)
Iterates through the parameters in this holder, recording them in the supplied parameter processor. |
(package private) void |
recordPredefinedParameters(ParameterProcessor processor)
Iterates through the fixed, predefined parameters in this holder, recording them in the supplied parameter processor.\ These parameters always go on the URL, no matter what encoding method is used. |
(package private) void |
removeParameter(java.lang.String name)
Removes a parameter name from this collection. |
(package private) void |
selectImageButtonPosition(SubmitButton imageButton,
int x,
int y)
Specifies the position at which an image button (if any) was clicked. |
protected void |
setDestination(java.lang.String destination)
|
(package private) void |
setParameter(java.lang.String name,
java.lang.String value)
Sets the value of a parameter in a web request. |
(package private) void |
setParameter(java.lang.String name,
java.lang.String[] values)
Sets the multiple values of a parameter in a web request. |
(package private) void |
setParameter(java.lang.String name,
UploadFileSpec[] files)
Sets the multiple values of a file upload parameter in a web request. |
(package private) void |
setSubmitAsMime(boolean mimeEncoded)
|
| Methods inherited from class com.meterware.httpunit.WebRequestSource |
getAttribute, getAttribute, getBaseResponse, getBaseURL, getClassName, getCurrentFrameContents, getDestination, getDOMSubtree, getFragmentIdentifier, getFrame, getHTMLPage, getID, getName, getNode, getPageFrame, getRelativePage, getRelativeURL, getTarget, getText, getTitle, isSupportedAttribute, loadDestinationParameters, setTargetAttribute, submitRequest, submitRequest |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.meterware.httpunit.HTMLElement |
getScriptableDelegate |
| Field Detail |
NO_VALUES
private static final java.lang.String[] NO_VALUES
_presetParameterMap
private java.util.Map _presetParameterMap
_presetParameterList
private java.util.ArrayList _presetParameterList
_characterSet
private java.lang.String _characterSet
| Constructor Detail |
FixedURLWebRequestSource
public FixedURLWebRequestSource(WebResponse response, org.w3c.dom.Node node, java.net.URL baseURL, java.lang.String destination, FrameSelector frame, java.lang.String defaultTarget, java.lang.String characterSet)
| Method Detail |
getRequest
public WebRequest getRequest()
- Creates and returns a web request which will simulate clicking on this link.
- Specified by:
getRequestin classWebRequestSource
getParameterNames
public java.lang.String[] getParameterNames()
- Returns an array containing the names of any parameters defined as part of this link's URL.
- Specified by:
getParameterNamesin classWebRequestSource
getParameterValues
public java.lang.String[] getParameterValues(java.lang.String name)
- Returns the multiple default values of the named parameter.
- Specified by:
getParameterValuesin classWebRequestSource
addPresetParameter
protected void addPresetParameter(java.lang.String name, java.lang.String value)
- Description copied from class:
WebRequestSource - 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.
- Specified by:
addPresetParameterin classWebRequestSource
getEmptyParameterValue
protected java.lang.String getEmptyParameterValue()
- Specified by:
getEmptyParameterValuein classWebRequestSource
setDestination
protected void setDestination(java.lang.String destination)
- Overrides:
setDestinationin classWebRequestSource
selectImageButtonPosition
void selectImageButtonPosition(SubmitButton imageButton, int x, int y)
- Specifies the position at which an image button (if any) was clicked.
- Overrides:
selectImageButtonPositionin classParameterHolder
recordPredefinedParameters
void recordPredefinedParameters(ParameterProcessor processor) throws java.io.IOException
- Iterates through the fixed, predefined parameters in this holder, recording them in the supplied parameter processor.\
These parameters always go on the URL, no matter what encoding method is used.
- Specified by:
recordPredefinedParametersin classParameterHolder
recordParameters
void recordParameters(ParameterProcessor processor) throws java.io.IOException
- Iterates through the parameters in this holder, recording them in the supplied parameter processor.
- Specified by:
recordParametersin classParameterHolder
removeParameter
void removeParameter(java.lang.String name)
- Removes a parameter name from this collection.
- Specified by:
removeParameterin classParameterHolder
setParameter
void setParameter(java.lang.String name, java.lang.String value)
- Sets the value of a parameter in a web request.
- Specified by:
setParameterin classParameterHolder
setParameter
void setParameter(java.lang.String name, java.lang.String[] values)
- Sets the multiple values of a parameter in a web request.
- Specified by:
setParameterin classParameterHolder
getCharacterSet
java.lang.String getCharacterSet()
- Description copied from class:
ParameterHolder - Returns the character set encoding for the request.
- Overrides:
getCharacterSetin classParameterHolder
equals
private boolean equals(java.lang.String[] left, java.lang.String[] right)
setParameter
void setParameter(java.lang.String name, UploadFileSpec[] files)
- Sets the multiple values of a file upload parameter in a web request.
- Specified by:
setParameterin classParameterHolder
isFileParameter
boolean isFileParameter(java.lang.String name)
- Returns true if the specified parameter is a file field.
- Overrides:
isFileParameterin classParameterHolder
isSubmitAsMime
boolean isSubmitAsMime()
- Specified by:
isSubmitAsMimein classParameterHolder
setSubmitAsMime
void setSubmitAsMime(boolean mimeEncoded)
- Specified by:
setSubmitAsMimein classParameterHolder
getPresetParameterMap
private java.util.Map getPresetParameterMap()
getPresetParameterList
private java.util.ArrayList getPresetParameterList()
loadPresetParameters
private void loadPresetParameters()
|
|||||||||
| Home >> All >> com >> meterware >> [ httpunit overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC