Class AbstractInstallAction
java.lang.Object
com.install4j.api.beans.AbstractBean
com.install4j.api.actions.AbstractInstallAction
- All Implemented Interfaces:
Action, InstallAction, Bean, Serializable
Abstract base class for install actions.
The
rollback method does nothing by default. Override it in your action to perform an actual rollback.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called after the properties have been setbooleanThis method is called by the framework to determine if the action supports a rollback.voidrollback(InstallerContext context) This method is called by the framework to perform a rollback of theinstallmethod.Methods inherited from class AbstractBean
executeActionListAsync, executeActionListSync, getTextOverrideValue, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, rollbackActionListModifier and TypeMethodDescriptionstatic voidexecuteActionListAsync(ActionList actionList, Object... extraScriptParameters) Asynchronously execute an action list.static booleanexecuteActionListSync(ActionList actionList, Object... extraScriptParameters) Synchronously execute an action list.static <T> TgetTextOverrideValue(Bean bean, String propertyName, Class<T> resultType) Get the value for a property for which a text replacement has been configured in the IDE.static FilereplaceVariables(File file) Replace all installer variables and localization keys in a file name.static File[]replaceVariables(File[] files) Replace all installer variables and localization keys in a file array.static StringreplaceVariables(String value) Same asAbstractBean.replaceVariables(String, ReplacementMode, VariableErrorHandlingDescriptor), withReplacementMode.PLAINas the replacement mode andVariableErrorHandlingDescriptor.DEFAULTas the error handling descriptor.static String[]replaceVariables(String[] values) Same asAbstractBean.replaceVariables(String[], VariableErrorHandlingDescriptor), withVariableErrorHandlingDescriptor.DEFAULTas the error handling descriptor.static String[]replaceVariables(String[] values, VariableErrorHandlingDescriptor errorHandlingDescriptor) Replace all installer variables and localization keys in a string array.static StringreplaceVariables(String value, ReplacementMode replacementMode) Same asAbstractBean.replaceVariables(String, ReplacementMode, VariableErrorHandlingDescriptor), withVariableErrorHandlingDescriptor.DEFAULTas the error handling descriptor.static StringreplaceVariables(String value, ReplacementMode replacementMode, VariableErrorHandlingDescriptor errorHandlingDescriptor) Replace all installer variables and localization keys in a string.static StringreplaceVariables(String value, VariableErrorHandlingDescriptor errorHandlingDescriptor) Same asAbstractBean.replaceVariables(String, ReplacementMode, VariableErrorHandlingDescriptor), withReplacementMode.PLAINas the replacement mode.static <T> TreplaceWithTextOverride(Bean bean, String propertyName, T defaultValue, Class resultType) A convenience method forAbstractBean.getTextOverrideValue(Bean, String, Class)that returns a default value if no replacement has been configured.protected booleanreplaceWithTextOverride(String propertyName, boolean defaultValue) protected bytereplaceWithTextOverride(String propertyName, byte defaultValue) protected charreplaceWithTextOverride(String propertyName, char defaultValue) protected doublereplaceWithTextOverride(String propertyName, double defaultValue) protected floatreplaceWithTextOverride(String propertyName, float defaultValue) protected intreplaceWithTextOverride(String propertyName, int defaultValue) protected longreplaceWithTextOverride(String propertyName, long defaultValue) protected shortreplaceWithTextOverride(String propertyName, short defaultValue) protected <T> TreplaceWithTextOverride(String propertyName, T defaultValue, Class resultType) static voidrollbackActionList(ActionList actionList) Roll back an action list.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InstallAction
installModifier and TypeMethodDescriptionbooleaninstall(InstallerContext context) This method is called by the framework to perform the action during installation.
-
Constructor Details
-
AbstractInstallAction
public AbstractInstallAction()
-
-
Method Details
-
rollback
Description copied from interface:InstallActionThis method is called by the framework to perform a rollback of theinstallmethod. This method is only called if theinstallmethod has already been called and the installation is canceled by the user or if the installation fails. If this action is executed before a rollback barrier that has already been passed successfully, the rollback will not be performed for this action. The "Installation screen" is the only default rollback barrier in install4j.- Specified by:
rollbackin interfaceInstallAction- Parameters:
context- the context of the installation.
-
init
-
isRollbackSupported
public boolean isRollbackSupported()Description copied from interface:InstallActionThis method is called by the framework to determine if the action supports a rollback.- Specified by:
isRollbackSupportedin interfaceInstallAction- Returns:
trueif a rollback is supported.
-