Package com.pnfsoftware.jeb.core.actions
Class ActionContext
java.lang.Object
com.pnfsoftware.jeb.core.actions.ActionContext
Context of pre-execution and execution for an
action
. These objects are provided
by a client (front-end) to the plugin (engines) when trying to:
verify execution
: the client checks if an action execution can take placeprepare for execution
: the client may provide pre-execution information, the engine will provide pre-execution information as wellexecute an action
: the client provides input data required by the plugin to perform the action
IInteractiveUnit
process these objects in two ways.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionActionContext
(IInteractiveUnit unit, int actionId, long itemId) Create an object, requesting action information for the provided item or provided address.ActionContext
(IInteractiveUnit unit, int actionId, long itemId, String address) Create an object, requesting action information for the provided item or provided address.ActionContext
(IInteractiveUnit unit, int actionId, long itemId, String address, AddressConversionPrecision precision) Create an object, requesting action information for the provided item or provided address. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the action identifier.Get the address at which the action should take place.long
Get the item id of the object onto which the action should take place.getUnit()
Get the unit on to which the action is to be executed.void
setActionId
(int actionId) void
setAddress
(String address) void
setAddressPrecision
(AddressConversionPrecision addressPrecision) void
setItemId
(long itemId) void
setUnit
(IInteractiveUnit unit) toString()
-
Constructor Details
-
ActionContext
Create an object, requesting action information for the provided item or provided address.- Parameters:
unit
- mandatory target unitactionId
- mandatory action iditemId
- optional item id (0 for none)
-
ActionContext
Create an object, requesting action information for the provided item or provided address.- Parameters:
unit
-actionId
-itemId
-address
-
-
ActionContext
public ActionContext(IInteractiveUnit unit, int actionId, long itemId, String address, AddressConversionPrecision precision) Create an object, requesting action information for the provided item or provided address.- Parameters:
unit
- mandatory target unitactionId
- mandatory action iditemId
- optional item id (0 for none)address
- optional address (null fo none)precision
- precision of the address
-
-
Method Details
-
getUnit
Get the unit on to which the action is to be executed.- Returns:
- the unit
-
setUnit
-
getActionId
public int getActionId()Get the action identifier.- Returns:
- the mandatory action identifier
-
setActionId
public void setActionId(int actionId) -
getItemId
public long getItemId()Get the item id of the object onto which the action should take place.- Returns:
- the optional item id, 0 if none
-
setItemId
public void setItemId(long itemId) -
getAddress
Get the address at which the action should take place.- Returns:
- the optional address, null if none
-
setAddress
-
getAddressPrecision
- Returns:
-
setAddressPrecision
-
toString
-