# ActionBeanInfo

Import: `import com.install4j.api.beaninfo.ActionBeanInfo;`

```java
public abstract class ActionBeanInfo extends Install4JBeanInfo
```

Base class for BeanInfos of action classes.

Using this class is not strictly required. In principle, you could also set values for the `ATTRIBUTE_*` constants in the bean descriptor
of an unrelated bean info class.

## Inherited from

- [Install4JBeanInfo](Install4JBeanInfo.md) — 28 methods, 23 fields

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`setAssociatedConfirmation(String, String)`](#setassociatedconfirmation-string-string) | `void` | Kept for backwards compatibility |
| [`setAssociatedConfirmation(String, String, String)`](#setassociatedconfirmation-string-string-string) | `void` | Configures an associated confirmation. |
| [`setAssociatedScreen(String)`](#setassociatedscreen-string) | `void` | Configures an associated screen. |
| [`setInstallerTargetScreen(String)`](#setinstallertargetscreen-string) | `void` | Configures a target screen for the installer. |
| [`setUninstallerTargetScreen(String)`](#setuninstallertargetscreen-string) | `void` | Configures a target screen for the uninstaller. |
| [`setDefaultMultiExec(boolean)`](#setdefaultmultiexec-boolean) | `void` | Configures the default value for the "Can be executed multiple times" property of the action. |
| [`setComplementaryStartupLink(boolean)`](#setcomplementarystartuplink-boolean) | `void` | Determines if a complementary startup link should be placed in the installer or uninstaller. |
| [`setAssociatedStartupAction(String)`](#setassociatedstartupaction-string) | `void` | Configures an associated startup action. |
| [`setUninstallerStartupAction(String)`](#setuninstallerstartupaction-string) | `void` | Determines if a complementary startup action should be placed in the uninstaller. |
| [`setDefaultFailureStrategy(FailureStrategy)`](#setdefaultfailurestrategy-failurestrategy) | `void` | Configures the default failure strategy for the action. |
| [`setAskUserFailureDefaults(AskUserFailureDefaults)`](#setaskuserfailuredefaults-askuserfailuredefaults) | `void` | Configures the questions that are selected by default if the [`FailureStrategy.ASK_USER`](FailureStrategy.md#ask-user) failure strategy is selected. |
| [`setDefaultErrorMessage(String)`](#setdefaulterrormessage-string) | `void` | Configures the default error message for the action. |
| [`setFullPrivilegesRequired(boolean)`](#setfullprivilegesrequired-boolean) | `void` | Configures if full privileges are required or not. |
| [`setDefaultActionElevationType(ActionElevationType)`](#setdefaultactionelevationtype-actionelevationtype) | `void` | Same as [`ActionBeanInfo.setDefaultActionElevationType`](ActionBeanInfo.md#setdefaultactionelevationtype-actionelevationtype-boolean) with `restrict` set to `false`. |
| [`setDefaultActionElevationType(ActionElevationType, boolean)`](#setdefaultactionelevationtype-actionelevationtype-boolean) | `void` | Configures in which elevation mode the action should run in elevated mode by default. |
| [`setWindowsOnly(boolean)`](#setwindowsonly-boolean) | `void` | Configures if this action is a Windows-only action. |
| [`setActionListInitializer(ActionListInitializer)`](#setactionlistinitializer-actionlistinitializer) | `void` | Configures an action list initializer. |
| [`setActionValidator(ActionValidator)`](#setactionvalidator-actionvalidator) | `void` | Configures an action validator. |

### setAssociatedConfirmation(String, String)

```java
@Deprecated public void setAssociatedConfirmation(String confirmationDescription, String initScript)
```

> **⚠ Deprecated.**

Kept for backwards compatibility


**See also:**

- [ActionBeanInfo.setAssociatedConfirmation](ActionBeanInfo.md#setassociatedconfirmation-string-string-string)

**Deprecated.**

### setAssociatedConfirmation(String, String, String)

```java
public void setAssociatedConfirmation(String confirmationDescription, String initScript, String visibilityScript)
```

Configures an associated confirmation. If the user adds the action, the install4j GUI will ask the user whether to add
a question to the current screen if the screen is a form screen or to the "Additional confirmations" screen
otherwise. The form screen will receive a checkbox form component with a variable name equal to the decapitalized simple
class name of the action. The condition expression of the action will be set to `context.getBooleanVariable("variableName")`
so that the confirmation and the execution of the action are automatically wired together.

If the `initScript` parameter is not `null` and the user accepts the addition of the confirmation,
the "Initialization script" property of the checkbox form component is set to `initScript`.


**Parameters:**

- `confirmationDescription` — the message of the confirmation
- `initScript` — the init script, may be `null`
- `visibilityScript` — the visibility script, may be `null`

**See also:**

- [ActionBeanInfo.ATTRIBUTE_ASSOCIATED_CONFIRMATION](ActionBeanInfo.md#attribute-associated-confirmation)
- [ActionBeanInfo.ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT](ActionBeanInfo.md#attribute-associated-confirmation-init-script)
- [ActionBeanInfo.ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT](ActionBeanInfo.md#attribute-associated-confirmation-visibility-script)

### setAssociatedScreen(String)

```java
public void setAssociatedScreen(String className)
```

Configures an associated screen. If set, and the user adds the action, the install4j GUI checks if
an instance of the specified class is present in the list of configured screens. If not, it will ask the user whether to add
such a screen.


**Parameters:**

- `className` — the class name of the associated screen

**See also:**

- [ActionBeanInfo.ATTRIBUTE_ASSOCIATED_SCREEN](ActionBeanInfo.md#attribute-associated-screen)

### setInstallerTargetScreen(String)

```java
public void setInstallerTargetScreen(String className)
```

Configures a target screen for the installer. If set, and the user adds the action, the install4j GUI checks
if the current screen is an instance of the specified class. If not, it will ask the user whether the action
should rather be added to the target screen, adding that screen if it is not present in the list of configured screens.


**Parameters:**

- `className` — the class name of the target screen or [`ActionBeanInfo.STARTUP_SEQUENCE`](ActionBeanInfo.md#startup-sequence) for the startup sequence

**See also:**

- [ActionBeanInfo.ATTRIBUTE_INSTALLER_TARGET_SCREEN](ActionBeanInfo.md#attribute-installer-target-screen)

### setUninstallerTargetScreen(String)

```java
public void setUninstallerTargetScreen(String className)
```

Configures a target screen for the uninstaller. If set, and the user adds the action, the install4j GUI checks
if the current screen is an instance of the specified class. If not, it will ask the user whether the action
should rather be added to the target screen, adding that screen if it is not present in the list of configured screens.


**Parameters:**

- `className` — the class name of the target screen or [`ActionBeanInfo.STARTUP_SEQUENCE`](ActionBeanInfo.md#startup-sequence) for the startup sequence

**See also:**

- [ActionBeanInfo.ATTRIBUTE_UNINSTALLER_TARGET_SCREEN](ActionBeanInfo.md#attribute-uninstaller-target-screen)

### setDefaultMultiExec(boolean)

```java
public void setDefaultMultiExec(boolean multiExec)
```

Configures the default value for the "Can be executed multiple times" property of the action.


**Parameters:**

- `multiExec` — the default value

**See also:**

- [ActionBeanInfo.ATTRIBUTE_DEFAULT_MULTI_EXEC](ActionBeanInfo.md#attribute-default-multi-exec)

### setComplementaryStartupLink(boolean)

```java
public void setComplementaryStartupLink(boolean complementaryStartupLink)
```

Determines if a complementary startup link should be placed in the installer or uninstaller.
If the action is added to the startup sequence of the installer, the user will be asked whether a link to the action
should be placed in the startup sequence of the uninstaller or vice versa. This setting has no effect if the action
is added to any other screen.


**Parameters:**

- `complementaryStartupLink` — the value

**See also:**

- [ActionBeanInfo.ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK](ActionBeanInfo.md#attribute-complementary-startup-link)

### setAssociatedStartupAction(String)

```java
public void setAssociatedStartupAction(String className)
```

Configures an associated startup action. If set, and the user adds the action, the install4j GUI checks
if the startup sequence contains an action of the specified class. If not, it will ask the user whether the action
of that class should be added to the startup sequence.


**Parameters:**

- `className` — the class name of the associated startup action

**See also:**

- [ActionBeanInfo.ATTRIBUTE_ASSOCIATED_STARTUP_ACTION](ActionBeanInfo.md#attribute-associated-startup-action)

### setUninstallerStartupAction(String)

```java
public void setUninstallerStartupAction(String className)
```

Determines if a complementary startup action should be placed in the uninstaller.
If the action is added to the startup sequence of the installer, the user will be asked whether an action
of the specified class should be added to the startup sequence of the uninstaller. This setting has no effect
if the action is added to any other screen.


**Parameters:**

- `className` — the class name of the complementary startup action

**See also:**

- [ActionBeanInfo.ATTRIBUTE_UNINSTALLER_STARTUP_ACTION](ActionBeanInfo.md#attribute-uninstaller-startup-action)

### setDefaultFailureStrategy(FailureStrategy)

```java
public void setDefaultFailureStrategy(FailureStrategy failureStrategy)
```

Configures the default failure strategy for the action.


**Parameters:**

- `failureStrategy` — the default failure strategy

**See also:**

- [ActionBeanInfo.ATTRIBUTE_DEFAULT_FAILURE_STRATEGY](ActionBeanInfo.md#attribute-default-failure-strategy)

### setAskUserFailureDefaults(AskUserFailureDefaults)

```java
public void setAskUserFailureDefaults(AskUserFailureDefaults askUserFailureDefaults)
```

Configures the questions that are selected by default if the [`FailureStrategy.ASK_USER`](FailureStrategy.md#ask-user) failure
strategy is selected.


**Parameters:**

- `askUserFailureDefaults` — the default questions that are selected

**See also:**

- [ActionBeanInfo.ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS](ActionBeanInfo.md#attribute-ask-user-failure-defaults)

### setDefaultErrorMessage(String)

```java
public void setDefaultErrorMessage(String errorMessage)
```

Configures the default error message for the action.


**Parameters:**

- `errorMessage` — the default error message

**See also:**

- [ActionBeanInfo.ATTRIBUTE_DEFAULT_ERROR_MESSAGE](ActionBeanInfo.md#attribute-default-error-message)

### setFullPrivilegesRequired(boolean)

```java
public void setFullPrivilegesRequired(boolean fullPrivilegesRequired)
```

Configures if full privileges are required or not. If this method is called with the argument
`true`, the install4j IDE will ask the user if all privilege properties of the "Request privileges"
action in the startup sequence should be selected. If that action does not exist, it will be created.

Note: Setting this property to `true` automatically implies [`ActionBeanInfo.setDefaultActionElevationType`](ActionBeanInfo.md#setdefaultactionelevationtype-actionelevationtype)
set to [`ActionElevationType.ELEVATE`](ActionElevationType.md#elevate).


**Parameters:**

- `fullPrivilegesRequired` — the value

### setDefaultActionElevationType(ActionElevationType)

```java
public void setDefaultActionElevationType(ActionElevationType actionElevationType)
```

Same as [`ActionBeanInfo.setDefaultActionElevationType`](ActionBeanInfo.md#setdefaultactionelevationtype-actionelevationtype-boolean) with `restrict` set to
`false`.


**Parameters:**

- `actionElevationType` — the elevation type

### setDefaultActionElevationType(ActionElevationType, boolean)

```java
public void setDefaultActionElevationType(ActionElevationType actionElevationType, boolean restrict)
```

Configures in which elevation mode the action should run in elevated mode by default. If not set,
the elevation mode will be inherited from the parent element. If the `restrict` parameter is set to
`false`, the user can always change the elevation type in the install4j IDE. Otherwise, the default
is fixed.


**Parameters:**

- `actionElevationType` — the elevation type
- `restrict` — whether the default setting should be the only allowed setting

### setWindowsOnly(boolean)

```java
public void setWindowsOnly(boolean windowsOnly)
```

Configures if this action is a Windows-only action. The install4j IDE will take this into account when changing
properties of the "Request privileges" action based on the value set with [`ActionBeanInfo.setFullPrivilegesRequired`](ActionBeanInfo.md#setfullprivilegesrequired-boolean).


**Parameters:**

- `windowsOnly` — the value

### setActionListInitializer(ActionListInitializer)

```java
public void setActionListInitializer(ActionListInitializer actionListInitializer)
```

Configures an action list initializer.


**Parameters:**

- `actionListInitializer` — the bean initializer.

**See also:**

- [ActionListInitializer](ActionListInitializer.md)
- [ActionBeanInfo.ATTRIBUTE_ACTION_LIST_INITIALIZER](ActionBeanInfo.md#attribute-action-list-initializer)

### setActionValidator(ActionValidator)

```java
public void setActionValidator(ActionValidator actionValidator)
```

Configures an action validator.


**Parameters:**

- `actionValidator` — the action validator.

**See also:**

- [ActionValidator](ActionValidator.md)
- [ActionBeanInfo.ATTRIBUTE_ACTION_VALIDATOR](ActionBeanInfo.md#attribute-action-validator)

## Constructors

| Signature | Description |
|---|---|
| [`protected ActionBeanInfo(String, String, String, boolean, boolean, Integer, Class<? extends Action>, Class)`](#actionbeaninfo-string-string-string-boolean-boolean-integer-class-extends-action-class) | Same as [`Install4JBeanInfo.Install4JBeanInfo`](Install4JBeanInfo.md#install4jbeaninfo-string-string-string-boolean-boolean-integer-class-extends-bean-class) |
| [`protected ActionBeanInfo(String, String, String, boolean, boolean, Integer, Class<? extends Action>)`](#actionbeaninfo-string-string-string-boolean-boolean-integer-class-extends-action) | Same as [`ActionBeanInfo.ActionBeanInfo`](ActionBeanInfo.md#actionbeaninfo-string-string-string-boolean-boolean-integer-class-extends-action-class) with a customizer class of `null`. |

### protected ActionBeanInfo(String, String, String, boolean, boolean, Integer, Class<? extends Action>, Class)

```java
protected ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass, Class customizerClass)
```

Same as [`Install4JBeanInfo.Install4JBeanInfo`](Install4JBeanInfo.md#install4jbeaninfo-string-string-string-boolean-boolean-integer-class-extends-bean-class)

### protected ActionBeanInfo(String, String, String, boolean, boolean, Integer, Class<? extends Action>)

```java
protected ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass)
```

Same as [`ActionBeanInfo.ActionBeanInfo`](ActionBeanInfo.md#actionbeaninfo-string-string-string-boolean-boolean-integer-class-extends-action-class) with a customizer class of `null`.

## Fields

| Field | Type | Description |
|---|---|---|
| [ATTRIBUTE_ASSOCIATED_CONFIRMATION](#attribute-associated-confirmation) | `String` |  |
| [ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT](#attribute-associated-confirmation-init-script) | `String` |  |
| [ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT](#attribute-associated-confirmation-visibility-script) | `String` |  |
| [ATTRIBUTE_ASSOCIATED_SCREEN](#attribute-associated-screen) | `String` |  |
| [ATTRIBUTE_INSTALLER_TARGET_SCREEN](#attribute-installer-target-screen) | `String` |  |
| [ATTRIBUTE_UNINSTALLER_TARGET_SCREEN](#attribute-uninstaller-target-screen) | `String` |  |
| [ATTRIBUTE_DEFAULT_MULTI_EXEC](#attribute-default-multi-exec) | `String` |  |
| [ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK](#attribute-complementary-startup-link) | `String` |  |
| [ATTRIBUTE_UNINSTALLER_STARTUP_ACTION](#attribute-uninstaller-startup-action) | `String` |  |
| [ATTRIBUTE_ASSOCIATED_STARTUP_ACTION](#attribute-associated-startup-action) | `String` |  |
| [ATTRIBUTE_DEFAULT_FAILURE_STRATEGY](#attribute-default-failure-strategy) | `String` |  |
| [ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS](#attribute-ask-user-failure-defaults) | `String` |  |
| [ATTRIBUTE_DEFAULT_ERROR_MESSAGE](#attribute-default-error-message) | `String` |  |
| [ATTRIBUTE_FULL_PRIVILEGES_REQUIRED](#attribute-full-privileges-required) | `String` |  |
| [ATTRIBUTE_WINDOWS_ONLY](#attribute-windows-only) | `String` |  |
| [ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE](#attribute-default-action-elevation-type) | `String` |  |
| [ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE](#attribute-restrict-action-elevation-type) | `String` |  |
| [STARTUP_SEQUENCE](#startup-sequence) | `String` | Special identifier for the startup sequence to be used as the `className` argument in [`ActionBeanInfo.setInstallerTargetScreen`](ActionBeanInfo.md#setinstallertargetscreen-string) and [`ActionBeanInfo.setUninstallerTargetScreen`](ActionBeanInfo.md#setuninstallertargetscreen-string). |
| [ATTRIBUTE_ACTION_LIST_INITIALIZER](#attribute-action-list-initializer) | `String` |  |
| [ATTRIBUTE_ACTION_VALIDATOR](#attribute-action-validator) | `String` |  |

### ATTRIBUTE_ASSOCIATED_CONFIRMATION

```java
public static final String ATTRIBUTE_ASSOCIATED_CONFIRMATION = "associatedConfirmation"
```

### ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT

```java
public static final String ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT = "associatedConfirmationInitScript"
```

### ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT

```java
public static final String ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT = "associatedConfirmationVisibilityScript"
```

### ATTRIBUTE_ASSOCIATED_SCREEN

```java
public static final String ATTRIBUTE_ASSOCIATED_SCREEN = "associatedScreen"
```

### ATTRIBUTE_INSTALLER_TARGET_SCREEN

```java
public static final String ATTRIBUTE_INSTALLER_TARGET_SCREEN = "preferredTargetInstallerScreen"
```

### ATTRIBUTE_UNINSTALLER_TARGET_SCREEN

```java
public static final String ATTRIBUTE_UNINSTALLER_TARGET_SCREEN = "preferredTargetUninstallerScreen"
```

### ATTRIBUTE_DEFAULT_MULTI_EXEC

```java
public static final String ATTRIBUTE_DEFAULT_MULTI_EXEC = "defaultMultiExec"
```

### ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK

```java
public static final String ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK = "complementaryStartupLink"
```

### ATTRIBUTE_UNINSTALLER_STARTUP_ACTION

```java
public static final String ATTRIBUTE_UNINSTALLER_STARTUP_ACTION = "complementaryStartupAction"
```

### ATTRIBUTE_ASSOCIATED_STARTUP_ACTION

```java
public static final String ATTRIBUTE_ASSOCIATED_STARTUP_ACTION = "associatedStartupAction"
```

### ATTRIBUTE_DEFAULT_FAILURE_STRATEGY

```java
public static final String ATTRIBUTE_DEFAULT_FAILURE_STRATEGY = "defaultFailureStrategy"
```

### ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS

```java
public static final String ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS = "askUserFailureDefaults"
```

### ATTRIBUTE_DEFAULT_ERROR_MESSAGE

```java
public static final String ATTRIBUTE_DEFAULT_ERROR_MESSAGE = "defaultErrorMessage"
```

### ATTRIBUTE_FULL_PRIVILEGES_REQUIRED

```java
public static final String ATTRIBUTE_FULL_PRIVILEGES_REQUIRED = "fullPrivilegesRequired"
```

### ATTRIBUTE_WINDOWS_ONLY

```java
public static final String ATTRIBUTE_WINDOWS_ONLY = "windowsOnly"
```

### ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE

```java
public static final String ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE = "defaultActionElevationType"
```

### ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE

```java
public static final String ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE = "restrictActionElevationType"
```

### STARTUP_SEQUENCE

```java
public static final String STARTUP_SEQUENCE = "#startup"
```

Special identifier for the startup sequence to be used as the `className` argument
in [`ActionBeanInfo.setInstallerTargetScreen`](ActionBeanInfo.md#setinstallertargetscreen-string) and [`ActionBeanInfo.setUninstallerTargetScreen`](ActionBeanInfo.md#setuninstallertargetscreen-string).

### ATTRIBUTE_ACTION_LIST_INITIALIZER

```java
public static final String ATTRIBUTE_ACTION_LIST_INITIALIZER = "actionListInitializer"
```

### ATTRIBUTE_ACTION_VALIDATOR

```java
public static final String ATTRIBUTE_ACTION_VALIDATOR = "actionValidator"
```

