# Class: com.pnfsoftware.jeb.core.units.AbstractInteractiveBinaryUnit

Skeleton of an interactive binary unit. Usage of this abstract class is encouraged. This unit provides a default metadata manager. 

 Implementors must implement their own constructor; the default constructor is used for deserialization only. Example of a typical interactive binary unit constructor: 

```

 public DerivedClass(String name, IInput input, IUnitProcessor unitProcessor, IUnitCreator parent,
         IPropertyDefinitionManager pdm) {
     super(..., input, ..., name, unitProcessor, parent, pdm);
     ...
 }
 
```

## Protected Constructor: AbstractInteractiveBinaryUnit
- parameter: `mimeType`, type: `java.lang.String`
- parameter: `input`, type: `com.pnfsoftware.jeb.core.input.IInput`
- parameter: `formatType`, type: `java.lang.String`
- parameter: `name`, type: `java.lang.String`
- parameter: `parent`, type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: Create an interactive binary unit using the parent unit's processor and property definitions.
parameter: mimeType: MIME type
parameter: input: mandatory binary input
parameter: formatType: unit format type
parameter: name: unit name
parameter: parent: parent unit

## Protected Constructor: AbstractInteractiveBinaryUnit
- parameter: `mimeType`, type: `java.lang.String`
- parameter: `input`, type: `com.pnfsoftware.jeb.core.input.IInput`
- parameter: `formatType`, type: `java.lang.String`
- parameter: `name`, type: `java.lang.String`
- parameter: `unitProcessor`, type: `com.pnfsoftware.jeb.core.units.IUnitProcessor`
- parameter: `parent`, type: `com.pnfsoftware.jeb.core.IUnitCreator`
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Constructor.
parameter: mimeType: MIME type
parameter: input: mandatory binary input
parameter: formatType: unit format type
parameter: name: unit name
parameter: unitProcessor: unit processor
parameter: parent: parent unit or artifact
parameter: pdm: property definition manager

## Method: canExecuteAction
- parameter: `actionContext`, type: `com.pnfsoftware.jeb.core.actions.ActionContext`
- return type: `boolean`

Description: The skeleton implementation returns false.

## Method: executeAction
- parameter: `actionContext`, type: `com.pnfsoftware.jeb.core.actions.ActionContext`
- parameter: `actionData`, type: `com.pnfsoftware.jeb.core.actions.IActionData`
- return type: `boolean`

Description: The skeleton implementation returns [executeAction\(actionContext, actionData, true\)](#executeAction(ActionContext, IActionData, boolean)).

## Method: executeAction
- parameter: `actionContext`, type: `com.pnfsoftware.jeb.core.actions.ActionContext`
- parameter: `actionData`, type: `com.pnfsoftware.jeb.core.actions.IActionData`
- parameter: `notify`, type: `boolean`
- return type: `boolean`

Description: The skeleton implementation returns false.

## Method: getAddressActions
- parameter: `address`, type: `java.lang.String`
- return type: `java.util.List<java.lang.Integer>`

Description: The skeleton implementation returns an empty list.

## Method: getAddressOfItem
- parameter: `id`, type: `long`
- return type: `java.lang.String`

Description: The skeleton implementation returns null.

## Method: getGlobalActions
- return type: `java.util.List<java.lang.Integer>`

Description: The skeleton implementation returns an empty list.

## Method: getItemActions
- parameter: `id`, type: `long`
- return type: `java.util.List<java.lang.Integer>`

Description: The skeleton implementation returns an empty list.

## Method: getItemAtAddress
- parameter: `address`, type: `java.lang.String`
- return type: `long`

Description: The skeleton implementation returns 0.

## Method: getItemObject
- parameter: `id`, type: `long`
- return type: `java.lang.Object`

Description: The skeleton implementation returns null.

## Method: getMetadataManager
- return type: `com.pnfsoftware.jeb.core.units.IMetadataManager`

Description: The skeleton implementation returns an empty metadata manager.

## Method: getRelatedItems
- parameter: `id`, type: `long`
- return type: `java.util.List<java.lang.Long>`

Description: The skeleton implementation returns an empty list.

## Method: isValidAddress
- parameter: `address`, type: `java.lang.String`
- return type: `boolean`

Description: The default implementation returns true IFF the address can be converted to a valid \(non\-zero\) item id.

## Method: prepareExecution
- parameter: `actionContext`, type: `com.pnfsoftware.jeb.core.actions.ActionContext`
- parameter: `actionData`, type: `com.pnfsoftware.jeb.core.actions.IActionData`
- return type: `boolean`

Description: The skeleton implementation returns false.

