# Class: com.pnfsoftware.jeb.core.actions.ActionContext

Context of pre\-execution and execution for an [action](Actions). These objects are provided by a client \(front\-end\) to the plugin \(engines\) when trying to: 
 
- [verify execution](IInteractiveUnit#canExecuteAction(ActionContext)): the client checks if an action execution can take place
-  
- [prepare for execution](IInteractiveUnit#prepareExecution(ActionContext, IActionData)): the client may provide pre\-execution information, the engine will provide pre\-execution information as well
-  
- [execute an action](IInteractiveUnit#executeAction(ActionContext, IActionData)): the client provides input data required by the plugin to perform the action
-  

 [IInteractiveUnit](IInteractiveUnit) process these objects in two ways.

## Constructor: ActionContext
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IInteractiveUnit`
- parameter: `actionId`, type: `int`
- parameter: `itemId`, type: `long`

Description: Create an object, requesting action information for the provided item or provided address.
parameter: unit: mandatory target unit
parameter: actionId: mandatory action id
parameter: itemId: optional item id \(0 for none\)

## Constructor: ActionContext
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IInteractiveUnit`
- parameter: `actionId`, type: `int`
- parameter: `itemId`, type: `long`
- parameter: `address`, type: `java.lang.String`

Description: Create an object, requesting action information for the provided item or provided address.
parameter: unit: 
parameter: actionId: 
parameter: itemId: 
parameter: address: 

## Constructor: ActionContext
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IInteractiveUnit`
- parameter: `actionId`, type: `int`
- parameter: `itemId`, type: `long`
- parameter: `address`, type: `java.lang.String`
- parameter: `precision`, type: `com.pnfsoftware.jeb.core.output.AddressConversionPrecision`

Description: Create an object, requesting action information for the provided item or provided address.
parameter: unit: mandatory target unit
parameter: actionId: mandatory action id
parameter: itemId: optional item id \(0 for none\)
parameter: address: optional address \(null fo none\)
parameter: precision: precision of the address

## Method: getActionId
- return type: `int`

Description: Get the action identifier.
return: the mandatory action identifier

## Method: getAddress
- return type: `java.lang.String`

Description: Get the address at which the action should take place.
return: the optional address, null if none

## Method: getAddressPrecision
- return type: `com.pnfsoftware.jeb.core.output.AddressConversionPrecision`

Description: 
return: 

## Method: getItemId
- return type: `long`

Description: Get the item id of the object onto which the action should take place.
return: the optional item id, 0 if none

## Method: getUnit
- return type: `com.pnfsoftware.jeb.core.units.IInteractiveUnit`

Description: Get the unit on to which the action is to be executed.
return: the unit

## Method: setActionId
- parameter: `actionId`, type: `int`


## Method: setAddress
- parameter: `address`, type: `java.lang.String`


## Method: setAddressPrecision
- parameter: `addressPrecision`, type: `com.pnfsoftware.jeb.core.output.AddressConversionPrecision`


## Method: setItemId
- parameter: `itemId`, type: `long`


## Method: setUnit
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IInteractiveUnit`


## Method: toString
- return type: `java.lang.String`


