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 a unit plugin 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
- 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 TypeMethodDescriptionintGet the action identifier.Get the address at which the action should take place.Get the precision associated with the target address.longGet 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.voidsetActionId(int actionId) Set the action identifier.voidsetAddress(String address) Set the target address.voidsetAddressPrecision(AddressConversionPrecision addressPrecision) Set the precision associated with the target address.voidsetItemId(long itemId) Set the target item identifier.voidsetUnit(IInteractiveUnit unit) Set the target 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- mandatory target unitactionId- mandatory action iditemId- optional item id (0 for none)address- optional address (nullfor none)
-
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 (nullfor 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
Set the target unit.- Parameters:
unit- target interactive unit
-
getActionId
public int getActionId()Get the action identifier.- Returns:
- the mandatory action identifier
-
setActionId
public void setActionId(int actionId) Set the action identifier.- Parameters:
actionId- action identifier
-
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) Set the target item identifier.- Parameters:
itemId- item identifier, or0if no item is selected
-
getAddress
Get the address at which the action should take place.- Returns:
- the optional address, null if none
-
setAddress
Set the target address.- Parameters:
address- address, ornullif the action is not address-based
-
getAddressPrecision
Get the precision associated with the target address.- Returns:
- the address precision
-
setAddressPrecision
Set the precision associated with the target address.- Parameters:
addressPrecision- address precision
-
toString
-