Class ActionContext

java.lang.Object
com.pnfsoftware.jeb.core.actions.ActionContext

public class ActionContext extends Object
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 place
  • prepare for execution: the client may provide pre-execution information, the engine will provide pre-execution information as well
  • execute 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 Details

    • ActionContext

      public ActionContext(IInteractiveUnit unit, int actionId, long itemId)
      Create an object, requesting action information for the provided item or provided address.
      Parameters:
      unit - mandatory target unit
      actionId - mandatory action id
      itemId - optional item id (0 for none)
    • ActionContext

      public ActionContext(IInteractiveUnit unit, int actionId, long itemId, String address)
      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 unit
      actionId - mandatory action id
      itemId - optional item id (0 for none)
      address - optional address (null fo none)
      precision - precision of the address
  • Method Details

    • getUnit

      public IInteractiveUnit getUnit()
      Get the unit on to which the action is to be executed.
      Returns:
      the unit
    • setUnit

      public void setUnit(IInteractiveUnit unit)
    • 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

      public String getAddress()
      Get the address at which the action should take place.
      Returns:
      the optional address, null if none
    • setAddress

      public void setAddress(String address)
    • getAddressPrecision

      public AddressConversionPrecision getAddressPrecision()
      Returns:
    • setAddressPrecision

      public void setAddressPrecision(AddressConversionPrecision addressPrecision)
    • toString

      public String toString()
      Overrides:
      toString in class Object