ActionBeanInfo (install4j API)
Description: declaration: package: com.install4j.api.beaninfo, class: ActionBeanInfo

Package com.install4j.api.beaninfo

# Class ActionBeanInfo

java.lang.Object
java.beans.SimpleBeanInfo
com.install4j.api.beaninfo.Install4JBeanInfo
com.install4j.api.beaninfo.ActionBeanInfo

All Implemented Interfaces:
  `BeanInfo`

public abstract class ActionBeanInfo extends Install4JBeanInfo
Base class for BeanInfos of actions 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.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ATTRIBUTE_ACTION_LIST_INITIALIZER`
  `static final String`
  `ATTRIBUTE_ACTION_VALIDATOR`
  `static final String`
  `ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS`
  `static final String`
  `ATTRIBUTE_ASSOCIATED_CONFIRMATION`
  `static final String`
  `ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT`
  `static final String`
  `ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT`
  `static final String`
  `ATTRIBUTE_ASSOCIATED_SCREEN`
  `static final String`
  `ATTRIBUTE_ASSOCIATED_STARTUP_ACTION`
  `static final String`
  `ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK`
  `static final String`
  `ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE`
  `static final String`
  `ATTRIBUTE_DEFAULT_ERROR_MESSAGE`
  `static final String`
  `ATTRIBUTE_DEFAULT_FAILURE_STRATEGY`
  `static final String`
  `ATTRIBUTE_DEFAULT_MULTI_EXEC`
  `static final String`
  `ATTRIBUTE_FULL_PRIVILEGES_REQUIRED`
  `static final String`
  `ATTRIBUTE_INSTALLER_TARGET_SCREEN`
  `static final String`
  `ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE`
  `static final String`
  `ATTRIBUTE_UNINSTALLER_STARTUP_ACTION`
  `static final String`
  `ATTRIBUTE_UNINSTALLER_TARGET_SCREEN`
  `static final String`
  `ATTRIBUTE_WINDOWS_ONLY`
  `static final String`
  `STARTUP_SEQUENCE`
  Special identifier for the startup sequence to be used as the `className` argument in `setInstallerTargetScreen(String)` and `setUninstallerTargetScreen(String)`.

  ### Fields inherited from class com.install4j.api.beaninfo.Install4JBeanInfo

  `ATTRIBUTE_BEAN_CATEGORY, ATTRIBUTE_BEAN_INITIALIZER, ATTRIBUTE_BEAN_VALIDATOR, ATTRIBUTE_CATEGORY_SORT_ORDER, ATTRIBUTE_CATEGORY_SORT_ORDER_OTHER_AT_BOTTOM, ATTRIBUTE_COLLAPSED_PROPERTY_CATEGORIES, ATTRIBUTE_CUSTOMIZER_ICON, ATTRIBUTE_CUSTOMIZER_PLACEMENT, ATTRIBUTE_DEFAULT_CONDITION_EXPRESSION, ATTRIBUTE_DEFAULT_ROLLBACK_BARRIER, ATTRIBUTE_DEFAULT_ROLLBACK_BARRIER_EXIT_CODE, ATTRIBUTE_ENUMERATION_MAPPERS, ATTRIBUTE_ICON_16x16, ATTRIBUTE_ICON_24x24, ATTRIBUTE_INSTALLED_FILES_REQUIRED, ATTRIBUTE_MINIMUM_JAVA_VERSION, ATTRIBUTE_MULTIPLE_INSTANCES_SUPPORTED, ATTRIBUTE_NOTICE_PANEL, ATTRIBUTE_PERSISTENCE_DELEGATE_MAP, ATTRIBUTE_PROPERTY_CONVERTERS, ATTRIBUTE_REQUIRED_JPMS_MODULES, ATTRIBUTE_SEQUENCE_VALIDATOR, ATTRIBUTE_SORT_KEY`

  ### Fields inherited from interface java.beans.BeanInfo

  `ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass)`
  Same as `ActionBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)` with a customizer class of `null`.
  `protected`
  `ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass, Class customizerClass)`
  /** Same as `Install4JBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setActionListInitializer(ActionListInitializer actionListInitializer)`
  Configures an action list initializer.
  `void`
  `setActionValidator(ActionValidator actionValidator)`
  Configures an action validator.
  `void`
  `setAskUserFailureDefaults(AskUserFailureDefaults askUserFailureDefaults)`
  Configures the questions that are selected by default if the `FailureStrategy.ASK_USER` failure strategy is selected.
  `void`
  `setAssociatedConfirmation(String confirmationDescription, String initScript)`
  Deprecated.
  `void`
  `setAssociatedConfirmation(String confirmationDescription, String initScript, String visibilityScript)`
  Configures an associated confirmation.
  `void`
  `setAssociatedScreen(String className)`
  Configures an associated screen.
  `void`
  `setAssociatedStartupAction(String className)`
  Configures an associated startup action.
  `void`
  `setComplementaryStartupLink(boolean complementaryStartupLink)`
  Determines if a complementary startup link should be placed in the installer or uninstaller.
  `void`
  `setDefaultActionElevationType(ActionElevationType actionElevationType)`
  Same as `setDefaultActionElevationType(ActionElevationType, boolean)` with `restrict` set to `true`.
  `void`
  `setDefaultActionElevationType(ActionElevationType actionElevationType, boolean restrict)`
  Configures in which elevation mode the action should run in elevated mode by default.
  `void`
  `setDefaultErrorMessage(String errorMessage)`
  Configures the default error message for the action.
  `void`
  `setDefaultFailureStrategy(FailureStrategy failureStrategy)`
  Configures the default failure strategy for the action.
  `void`
  `setDefaultMultiExec(boolean multiExec)`
  Configures the default value for the "Can be executed multiple times" property of the action.
  `void`
  `setFullPrivilegesRequired(boolean fullPrivilegesRequired)`
  Configures if full privileges are required or not.
  `void`
  `setInstallerTargetScreen(String className)`
  Configures a target screen for the installer.
  `void`
  `setUninstallerStartupAction(String className)`
  Determines if a complementary startup action should be placed in the uninstaller.
  `void`
  `setUninstallerTargetScreen(String className)`
  Configures a target screen for the uninstaller.
  `void`
  `setWindowsOnly(boolean windowsOnly)`
  Configures if this action is a Windows-only action.

  ### Methods inherited from class com.install4j.api.beaninfo.Install4JBeanInfo

  `addPropertyDescriptor, checkNotEmpty, checkNotEmpty, findPropertyDescriptor, getBeanClass, getBeanDescriptor, getPropertyDescriptors, getPropertyValue, getPropertyValue, isEmpty, setBeanInitializer, setBeanValidator, setCategorySortOrder, setCategorySortOrderOtherAtBottom, setCollapsedPropertyCategories, setCustomizerIcon, setCustomizerPlacement, setDefaultConditionExpression, setDefaultRollbackBarrier, setDefaultRollbackBarrierExitCode, setEnumerationMappers, setIcons, setMinimumJavaVersion, setNoticePanel, setPersistenceDelegateMap, setPropertyConverters, setRequiredJpmsModules, setSequenceValidator`

  ### Methods inherited from class java.beans.SimpleBeanInfo

  `getAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, loadImage`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### ATTRIBUTE_ASSOCIATED_CONFIRMATION

    public static final String ATTRIBUTE_ASSOCIATED_CONFIRMATION
    See Also:
      - `setAssociatedConfirmation(String, String, String)`
      - Constant Field Values

  - ### ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT

    public static final String ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT
    See Also:
      - `setAssociatedConfirmation(String, String, String)`
      - Constant Field Values

  - ### ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT

    public static final String ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT
    See Also:
      - `setAssociatedConfirmation(String, String, String)`
      - Constant Field Values

  - ### ATTRIBUTE_ASSOCIATED_SCREEN

    public static final String ATTRIBUTE_ASSOCIATED_SCREEN
    See Also:
      - `setAssociatedScreen(String)`
      - Constant Field Values

  - ### ATTRIBUTE_INSTALLER_TARGET_SCREEN

    public static final String ATTRIBUTE_INSTALLER_TARGET_SCREEN
    See Also:
      - `setInstallerTargetScreen(String)`
      - Constant Field Values

  - ### ATTRIBUTE_UNINSTALLER_TARGET_SCREEN

    public static final String ATTRIBUTE_UNINSTALLER_TARGET_SCREEN
    See Also:
      - `setUninstallerTargetScreen(String)`
      - Constant Field Values

  - ### ATTRIBUTE_DEFAULT_MULTI_EXEC

    public static final String ATTRIBUTE_DEFAULT_MULTI_EXEC
    See Also:
      - `setDefaultMultiExec(boolean)`
      - Constant Field Values

  - ### ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK

    public static final String ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK
    See Also:
      - `setComplementaryStartupLink(boolean)`
      - Constant Field Values

  - ### ATTRIBUTE_UNINSTALLER_STARTUP_ACTION

    public static final String ATTRIBUTE_UNINSTALLER_STARTUP_ACTION
    See Also:
      - `setUninstallerStartupAction(java.lang.String)`
      - Constant Field Values

  - ### ATTRIBUTE_ASSOCIATED_STARTUP_ACTION

    public static final String ATTRIBUTE_ASSOCIATED_STARTUP_ACTION
    See Also:
      - `setAssociatedStartupAction(String)`
      - Constant Field Values

  - ### ATTRIBUTE_DEFAULT_FAILURE_STRATEGY

    public static final String ATTRIBUTE_DEFAULT_FAILURE_STRATEGY
    See Also:
      - `setDefaultFailureStrategy(FailureStrategy)`
      - Constant Field Values

  - ### ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS

    public static final String ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS
    See Also:
      - `setAskUserFailureDefaults(AskUserFailureDefaults)`
      - Constant Field Values

  - ### ATTRIBUTE_DEFAULT_ERROR_MESSAGE

    public static final String ATTRIBUTE_DEFAULT_ERROR_MESSAGE
    See Also:
      - `setDefaultErrorMessage(String)`
      - Constant Field Values

  - ### ATTRIBUTE_FULL_PRIVILEGES_REQUIRED

    public static final String ATTRIBUTE_FULL_PRIVILEGES_REQUIRED
    See Also:
      - `setFullPrivilegesRequired(boolean)`
      - Constant Field Values

  - ### ATTRIBUTE_WINDOWS_ONLY

    public static final String ATTRIBUTE_WINDOWS_ONLY
    See Also:
      - `setWindowsOnly(boolean)`
      - Constant Field Values

  - ### ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE

    public static final String ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE
    See Also:
      - `setDefaultActionElevationType(com.install4j.api.beaninfo.ActionElevationType)`
      - Constant Field Values

  - ### ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE

    public static final String ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE
    See Also:
      - `setDefaultActionElevationType(com.install4j.api.beaninfo.ActionElevationType)`
      - Constant Field Values

  - ### STARTUP_SEQUENCE

    public static final String STARTUP_SEQUENCE
    Special identifier for the startup sequence to be used as the `className` argument in `setInstallerTargetScreen(String)` and `setUninstallerTargetScreen(String)`.
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_ACTION_LIST_INITIALIZER

    public static final String ATTRIBUTE_ACTION_LIST_INITIALIZER
    See Also:
      - `setActionListInitializer(ActionListInitializer)`
      - Constant Field Values

  - ### ATTRIBUTE_ACTION_VALIDATOR

    public static final String ATTRIBUTE_ACTION_VALIDATOR
    See Also:
      - `setActionValidator(ActionValidator)`
      - Constant Field Values

- ## Constructor Details

  - ### ActionBeanInfo

    protected ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass, Class customizerClass)
    /** Same as `Install4JBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)`

  - ### ActionBeanInfo

    protected ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass)
    Same as `ActionBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)` with a customizer class of `null`.

- ## Method Details

  - ### setAssociatedConfirmation

    @Deprecated public void setAssociatedConfirmation(String confirmationDescription, String initScript)
    Deprecated.
    Kept for backwards compatibility
    See Also:
      - `setAssociatedConfirmation(String, String, String)`

  - ### setAssociatedConfirmation

    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 associated screen if the screen is a form screen or to the "Additional confirmation" screen otherwise. The form screen will receive a checkbox form component with a variable name equal to the 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` @see #ATTRIBUTE_ASSOCIATED_CONFIRMATION
      `visibilityScript` - the visibility script, may be `null` @see #ATTRIBUTE_ASSOCIATED_CONFIRMATION
    See Also:
      - `ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT`

  - ### setAssociatedScreen

    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:
      - `ATTRIBUTE_ASSOCIATED_SCREEN`

  - ### setInstallerTargetScreen

    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 `STARTUP_SEQUENCE` for the startup sequence
    See Also:
      - `ATTRIBUTE_INSTALLER_TARGET_SCREEN`

  - ### setUninstallerTargetScreen

    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 `STARTUP_SEQUENCE` for the startup sequence
    See Also:
      - `ATTRIBUTE_UNINSTALLER_TARGET_SCREEN`

  - ### setDefaultMultiExec

    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:
      - `ATTRIBUTE_DEFAULT_MULTI_EXEC`

  - ### setComplementaryStartupLink

    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:
      - `ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK`

  - ### setAssociatedStartupAction

    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:
      - `ATTRIBUTE_ASSOCIATED_STARTUP_ACTION`

  - ### setUninstallerStartupAction

    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 a link to the action should be placed in 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:
      - `ATTRIBUTE_UNINSTALLER_STARTUP_ACTION`

  - ### setDefaultFailureStrategy

    public void setDefaultFailureStrategy(FailureStrategy failureStrategy)
    Configures the default failure strategy for the action.
    Parameters:
      `failureStrategy` - the default failure strategy
    See Also:
      - `ATTRIBUTE_DEFAULT_FAILURE_STRATEGY`

  - ### setAskUserFailureDefaults

    public void setAskUserFailureDefaults(AskUserFailureDefaults askUserFailureDefaults)
    Configures the questions that are selected by default if the `FailureStrategy.ASK_USER` failure strategy is selected.
    Parameters:
      `askUserFailureDefaults` - the default questions that are selected
    See Also:
      - `ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS`

  - ### setDefaultErrorMessage

    public void setDefaultErrorMessage(String errorMessage)
    Configures the default error message for the action.
    Parameters:
      `errorMessage` - the default error message
    See Also:
      - `ATTRIBUTE_DEFAULT_ERROR_MESSAGE`

  - ### setFullPrivilegesRequired

    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 the failure 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 `setDefaultActionElevationType(com.install4j.api.beaninfo.ActionElevationType)`} set to `ActionElevationType.ELEVATE`.

    Parameters:
      `fullPrivilegesRequired` - the value

  - ### setDefaultActionElevationType

    public void setDefaultActionElevationType(ActionElevationType actionElevationType)
    Same as `setDefaultActionElevationType(ActionElevationType, boolean)` with `restrict` set to `true`.
    Parameters:
      `actionElevationType` - the elevation type

  - ### setDefaultActionElevationType

    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

    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 `setFullPrivilegesRequired(boolean)`.
    Parameters:
      `windowsOnly` - the value

  - ### setActionListInitializer

    public void setActionListInitializer(ActionListInitializer actionListInitializer)
    Configures an action list initializer.
    Parameters:
      `actionListInitializer` - the bean initializer.
    See Also:
      - `ActionListInitializer`
      - `ATTRIBUTE_ACTION_LIST_INITIALIZER`

  - ### setActionValidator

    public void setActionValidator(ActionValidator actionValidator)
    Configures an action validator.
    Parameters:
      `actionValidator` - the action validator.
    See Also:
      - `ActionValidator`
      - `ATTRIBUTE_ACTION_VALIDATOR`