Package org.appng.testsupport
Class TestBase.ActionCall
- java.lang.Object
-
- org.appng.xml.BaseObject
-
- org.appng.xml.platform.ActionRef
-
- org.appng.testsupport.TestBase.ActionCall
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- TestBase
protected class TestBase.ActionCall extends ActionRef
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.appng.xml.platform.ActionRef
async, clientValidation, condition, eventId, forceForward, id, mode, onSuccess, pageMessages, params, permissions
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestBase.ActionCall
clearParams()
CallableAction
getCallableAction(Object form)
Returns theCallableAction
.<T> T
getForm()
Returns the initial form for the action, i.e.Params
getParams()
Gets the value of the params property.Action
initialize()
Returns theAction
in it's initial state, meaning the action is initialized with the original data coming fromDataProvider
, but not performed.TestBase.ActionCall
withParam(String name, String value)
-
Methods inherited from class org.appng.xml.platform.ActionRef
getAsync, getClientValidation, getCondition, getEventId, getId, getMode, getOnSuccess, getPermissions, isForceForward, isPageMessages, setAsync, setClientValidation, setCondition, setEventId, setForceForward, setId, setMode, setOnSuccess, setPageMessages, setParams, setPermissions
-
-
-
-
Method Detail
-
getParams
public Params getParams()
Description copied from class:ActionRef
Gets the value of the params property.
-
clearParams
public TestBase.ActionCall clearParams()
-
withParam
public TestBase.ActionCall withParam(String name, String value)
- Parameters:
name
- the name of theParam
value
- the value- Returns:
-
getCallableAction
public CallableAction getCallableAction(Object form) throws ProcessingException
Returns theCallableAction
.- Parameters:
form
- an instance of the bind-object used by theAction
. The type must be compatible withMetaData.getBindClass()
of theDatasource
that is used by theAction
.- Returns:
- the
CallableAction
- Throws:
ProcessingException
- if an error occurs while assembling the CallableAction
-
initialize
public Action initialize() throws ProcessingException
Returns theAction
in it's initial state, meaning the action is initialized with the original data coming fromDataProvider
, but not performed.- Returns:
- the
Action
- Throws:
ProcessingException
- if an error occurs while assembling the Action
-
getForm
public <T> T getForm() throws ProcessingException
Returns the initial form for the action, i.e. of the underlyingDatasource
, if any. This is done by directly callingDataProvider.getData(Site, Application, Environment, org.appng.api.Options, Request, FieldProcessor)
and then returning the result ofDataContainer.getItem()
.- Returns:
- the initial form, may be
null
- Throws:
ProcessingException
- if an error occurs while retrieving the data
-
-