|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.anteater.test.BaseTask | +--org.apache.anteater.test.ActionTask
Common class used to represent the common functionality of running multiple matchers on:
Field Summary | |
protected Boolean |
haltonerror
|
protected CompositeLogger |
logger
|
protected MatcherSet |
matcherSet
|
protected List |
reqFeatures
|
protected boolean |
result
|
protected Session |
session
|
protected String |
successProp
Property to set if this action task succeeds. |
protected String |
successVal
Value to set successProp to if this action task succeeds. |
Fields inherited from class org.apache.anteater.test.BaseTask |
debug, debugWasSet |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
ActionTask()
|
Method Summary | |
void |
addConfiguredLogger(LoggerFactory loggerFactory)
|
void |
addConfiguredSession(Session session)
|
void |
addConfiguredUses(Uses uses)
|
void |
addMatch(Matcher matcher)
|
void |
addNamespace(Namespace ns)
|
protected abstract Object |
createMatchObject()
This lifecycle method is called during execute() , and should be
used to create the object on which Matchers should match on. |
void |
execute()
Main lifecycle method. |
abstract String |
getId()
Return a String identification of this HTTP action suitable for reporting. |
protected Map |
getObjectModel()
Return the live object model. |
Map |
getProperties()
Retrieves all Properties set for this task (from the group), plus a few 'virtual' properties, namely 'task.description', 'target.description' and 'project.description'. |
protected String |
getProperty(String key)
Retrieve the value of a specific property (set from a group). |
protected int |
getPropertyAsInt(String key)
Retrieve the value of a specific property (set from a group) as an int |
boolean |
getResult()
|
abstract String |
getURL()
Return the URL associated with this task (that it implements or tests). |
void |
setAssign(String propName)
Set the name of a property which will be set in the project if this action task succeeds. |
void |
setDebug(int debug)
Set the debug level. |
void |
setHaltonerror(Boolean haltonerror)
|
void |
setValue(String propVal)
Set the value to which the setAssign(java.lang.String) property will be set if this
action task succeeds. |
Methods inherited from class org.apache.anteater.test.BaseTask |
debug, getDebug, getGroup, print, println, resolveContentURL, setGroup, setGroup |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CompositeLogger logger
protected MatcherSet matcherSet
protected boolean result
protected Boolean haltonerror
protected Session session
protected List reqFeatures
protected String successProp
protected String successVal
successProp
to if this action task succeeds.
Constructor Detail |
public ActionTask()
Method Detail |
protected Map getObjectModel()
public Map getProperties()
protected String getProperty(String key)
key
- Name of the property, eg 'debug', 'host', 'task.description'
null
if it didn't
exist.protected int getPropertyAsInt(String key)
key
- Name of the property, eg 'debug', 'maxredirects'
null
if it didn't
exist.public void addMatch(Matcher matcher)
public void addConfiguredSession(Session session)
public void addNamespace(Namespace ns)
public void addConfiguredUses(Uses uses)
public void setAssign(String propName)
public void setValue(String propVal)
setAssign(java.lang.String)
property will be set if this
action task succeeds.
public void setDebug(int debug)
BaseTask
setDebug
in class BaseTask
debug
- an int
valuepublic void setHaltonerror(Boolean haltonerror)
public void addConfiguredLogger(LoggerFactory loggerFactory)
public abstract String getId()
public abstract String getURL()
protected abstract Object createMatchObject() throws Exception
execute()
, and should be
used to create the object on which Matchers should match on. Typically,
this will be a HttpMessage
of some sort.
As this method is called from execute(), it can rely on the
setXxx
methods having been called.
Exception
public void execute()
Usually, subclasses can get away with not touching this method, but
instead overriding the createMatchObject()
method, which is called
from this method.
execute
in class org.apache.tools.ant.Task
public boolean getResult()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |