Class ActionBeanInfo
java.lang.Object
java.beans.SimpleBeanInfo
com.install4j.api.beaninfo.Install4JBeanInfo
com.install4j.api.beaninfo.ActionBeanInfo
- All Implemented Interfaces:
BeanInfo
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringSpecial identifier for the startup sequence to be used as theclassNameargument insetInstallerTargetScreen(String)andsetUninstallerTargetScreen(String).Fields inherited from class 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_KEYModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass) Same asActionBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)with a customizer class ofnull.protected -
Method Summary
Modifier and TypeMethodDescriptionvoidsetActionListInitializer(ActionListInitializer actionListInitializer) Configures an action list initializer.voidsetActionValidator(ActionValidator actionValidator) Configures an action validator.voidsetAskUserFailureDefaults(AskUserFailureDefaults askUserFailureDefaults) Configures the questions that are selected by default if theFailureStrategy.ASK_USERfailure strategy is selected.voidsetAssociatedConfirmation(String confirmationDescription, String initScript) Deprecated.voidsetAssociatedConfirmation(String confirmationDescription, String initScript, String visibilityScript) Configures an associated confirmation.voidsetAssociatedScreen(String className) Configures an associated screen.voidsetAssociatedStartupAction(String className) Configures an associated startup action.voidsetComplementaryStartupLink(boolean complementaryStartupLink) Determines if a complementary startup link should be placed in the installer or uninstaller.voidsetDefaultActionElevationType(ActionElevationType actionElevationType) voidsetDefaultActionElevationType(ActionElevationType actionElevationType, boolean restrict) Configures in which elevation mode the action should run in elevated mode by default.voidsetDefaultErrorMessage(String errorMessage) Configures the default error message for the action.voidsetDefaultFailureStrategy(FailureStrategy failureStrategy) Configures the default failure strategy for the action.voidsetDefaultMultiExec(boolean multiExec) Configures the default value for the "Can be executed multiple times" property of the action.voidsetFullPrivilegesRequired(boolean fullPrivilegesRequired) Configures if full privileges are required or not.voidsetInstallerTargetScreen(String className) Configures a target screen for the installer.voidsetUninstallerStartupAction(String className) Determines if a complementary startup action should be placed in the uninstaller.voidsetUninstallerTargetScreen(String className) Configures a target screen for the uninstaller.voidsetWindowsOnly(boolean windowsOnly) Configures if this action is a Windows-only action.Methods inherited from class 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, setSequenceValidatorModifier and TypeMethodDescriptionvoidaddPropertyDescriptor(Install4JPropertyDescriptor propertyDescriptor) Add a property descriptor to be returned bygetPropertyDescriptors.voidcheckNotEmpty(String propertyName, Bean bean) Convenience method for bean validators to assert that a property is not empty.voidcheckNotEmpty(String propertyName, String errorMessage, Bean bean) Convenience method for bean validators to assert that a property is not empty.findPropertyDescriptor(String propertyName) Convenience method for bean validators to find the property descriptor for a named property.Class<?> Convenience method to retrieve the bean class specified in the constructor.getPropertyValue(PropertyDescriptor propertyDescriptor, Bean bean) Convenience method for bean validators to get the property value for a property descriptor.getPropertyValue(String propertyName, Bean bean) Convenience method for bean validators to get the property value for a named property.booleanConvenience method for bean validators to check if a property is empty.voidsetBeanInitializer(BeanInitializer beanInitializer) Configures a bean initializer.voidsetBeanValidator(BeanValidator beanValidator) Configures a bean validator.voidsetCategorySortOrder(String... categories) Sets a sort order for property categories of this bean.voidsetCategorySortOrderOtherAtBottom(boolean categorySortOrderOtherAtBottom) If set to true, categories that are not present in those passed toInstall4JBeanInfo.setCategorySortOrder(String...)are displayed at the bottom of the property table.voidsetCollapsedPropertyCategories(String[] collapsedCategories) Specifies property categories that should be collapsed by default.voidsetCustomizerIcon(Icon customizerIcon) Configures the icon of the customizer tab.voidsetCustomizerPlacement(CustomizerPlacement customizerPlacement) Configures the placement of the customizer.voidsetDefaultConditionExpression(String defaultConditionExpression) Configures the default value for the "Condition expression" property of the bean.voidsetDefaultRollbackBarrier(boolean defaultRollbackBarrier) Configures if the action is a rollback barrier by default.voidsetDefaultRollbackBarrierExitCode(int defaultRollbackBarrierExitCode) Configures the default rollback barrier exit code.voidsetEnumerationMappers(EnumerationMapper[] enumerationMappers) Specifies enumeration mappers for properties of this bean.voidConfigures custom icons for the bean.voidsetMinimumJavaVersion(String minimumJavaVersion) Sets the minimum Java version that this bean will work with.voidsetNoticePanel(JComponent noticePanel) Sets a panel that is displayed as a notice at the top of the configuration panel.voidsetPersistenceDelegateMap(Map<? extends Class, ? extends PersistenceDelegate> persistenceDelegates) Specifies persistence delegates for this bean.voidsetPropertyConverters(PropertyConverter[] propertyConverters) Specifies property converters for properties of this bean.voidsetRequiredJpmsModules(String[] requiredJpmsModules) Sets a list of JPMS modules that this bean requires.voidsetSequenceValidator(SequenceValidator sequenceValidator) Configures a sequence validator.Methods inherited from class SimpleBeanInfo
getAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, loadImage
-
Field Details
-
ATTRIBUTE_ASSOCIATED_CONFIRMATION
- See Also:
-
ATTRIBUTE_ASSOCIATED_CONFIRMATION_INIT_SCRIPT
- See Also:
-
ATTRIBUTE_ASSOCIATED_CONFIRMATION_VISIBILITY_SCRIPT
- See Also:
-
ATTRIBUTE_ASSOCIATED_SCREEN
- See Also:
-
ATTRIBUTE_INSTALLER_TARGET_SCREEN
- See Also:
-
ATTRIBUTE_UNINSTALLER_TARGET_SCREEN
- See Also:
-
ATTRIBUTE_DEFAULT_MULTI_EXEC
- See Also:
-
ATTRIBUTE_COMPLEMENTARY_STARTUP_LINK
- See Also:
-
ATTRIBUTE_UNINSTALLER_STARTUP_ACTION
- See Also:
-
ATTRIBUTE_ASSOCIATED_STARTUP_ACTION
- See Also:
-
ATTRIBUTE_DEFAULT_FAILURE_STRATEGY
- See Also:
-
ATTRIBUTE_ASK_USER_FAILURE_DEFAULTS
- See Also:
-
ATTRIBUTE_DEFAULT_ERROR_MESSAGE
- See Also:
-
ATTRIBUTE_FULL_PRIVILEGES_REQUIRED
- See Also:
-
ATTRIBUTE_WINDOWS_ONLY
- See Also:
-
ATTRIBUTE_DEFAULT_ACTION_ELEVATION_TYPE
- See Also:
-
ATTRIBUTE_RESTRICT_ACTION_ELEVATION_TYPE
- See Also:
-
STARTUP_SEQUENCE
Special identifier for the startup sequence to be used as theclassNameargument insetInstallerTargetScreen(String)andsetUninstallerTargetScreen(String).- See Also:
-
ATTRIBUTE_ACTION_LIST_INITIALIZER
- See Also:
-
ATTRIBUTE_ACTION_VALIDATOR
- See Also:
-
-
Constructor Details
-
ActionBeanInfo
-
ActionBeanInfo
protected ActionBeanInfo(String displayName, String shortDescription, String category, boolean multipleInstancesSupported, boolean installedFilesRequired, Integer sortKey, Class<? extends Action> beanClass) Same asActionBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)with a customizer class ofnull.
-
-
Method Details
-
setAssociatedConfirmation
@Deprecated public void setAssociatedConfirmation(String confirmationDescription, String initScript) Deprecated.Kept for backwards compatibility- See Also:
-
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 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 tocontext.getBooleanVariable("variableName")so that the confirmation and the execution of the action are automatically wired together.If the
initScriptparameter is notnulland the user accepts the addition of the confirmation, the "Initialization script" property of the checkbox form component is set toinitScript.- Parameters:
confirmationDescription- the message of the confirmationinitScript- the init script, may benullvisibilityScript- the visibility script, may benull- See Also:
-
setAssociatedScreen
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:
-
setInstallerTargetScreen
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 orSTARTUP_SEQUENCEfor the startup sequence- See Also:
-
setUninstallerTargetScreen
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 orSTARTUP_SEQUENCEfor the startup sequence- See Also:
-
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:
-
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:
-
setAssociatedStartupAction
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:
-
setUninstallerStartupAction
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:
-
setDefaultFailureStrategy
Configures the default failure strategy for the action.- Parameters:
failureStrategy- the default failure strategy- See Also:
-
setAskUserFailureDefaults
Configures the questions that are selected by default if theFailureStrategy.ASK_USERfailure strategy is selected.- Parameters:
askUserFailureDefaults- the default questions that are selected- See Also:
-
setDefaultErrorMessage
Configures the default error message for the action.- Parameters:
errorMessage- the default error message- See Also:
-
setFullPrivilegesRequired
public void setFullPrivilegesRequired(boolean fullPrivilegesRequired) Configures if full privileges are required or not. If this method is called with the argumenttrue, 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
trueautomatically impliessetDefaultActionElevationType(ActionElevationType)set toActionElevationType.ELEVATE.- Parameters:
fullPrivilegesRequired- the value
-
setDefaultActionElevationType
- 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 therestrictparameter is set tofalse, the user can always change the elevation type in the install4j IDE. Otherwise, the default is fixed.- Parameters:
actionElevationType- the elevation typerestrict- 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 withsetFullPrivilegesRequired(boolean).- Parameters:
windowsOnly- the value
-
setActionListInitializer
Configures an action list initializer.- Parameters:
actionListInitializer- the bean initializer.- See Also:
-
setActionValidator
Configures an action validator.- Parameters:
actionValidator- the action validator.- See Also:
-