Class ActionBeanInfo

  • All Implemented Interfaces:
    java.beans.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.

    • Method Detail

      • setAssociatedConfirmation

        @Deprecated
        public void setAssociatedConfirmation​(java.lang.String confirmationDescription,
                                              java.lang.String initScript)
        Deprecated.
        Kept for backwards compatibility
        See Also:
        setAssociatedConfirmation(String, String, String)
      • setAssociatedConfirmation

        public void setAssociatedConfirmation​(java.lang.String confirmationDescription,
                                              java.lang.String initScript,
                                              java.lang.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 check box 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 check box 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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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
      • setDefaultErrorMessage

        public void setDefaultErrorMessage​(java.lang.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,
                                                  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