public interface InstallAction extends Action
Modifier and Type | Method and Description |
---|---|
boolean |
install(InstallerContext context)
This method is called by the framework to perform the action during installation.
|
boolean |
isRollbackSupported()
This method is called by the framework to determine if the action supports a rollback.
|
void |
rollback(InstallerContext context)
This method is called by the framework to perform a rollback of the
install method. |
boolean install(InstallerContext context) throws UserCanceledException
ProgressInterface
available from context.getProgressInterface()
in order to display messages to the user or ask simple questions.
For long-running actions, make sure to check context.isCancelling()
frequently to comply
with a cancel request from the user.context
- the context of the installation.true
if successful. If it returns false
, the error message and the
failure strategy for the action configured in the install4j GUI will be used by the installer.UserCanceledException
- thrown for example by file installation methods. You can let
these exceptions pass through, they will be handled by the framework.void rollback(InstallerContext context)
install
method.
This method is only called if the install
method 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.context
- the context of the installation.boolean isRollbackSupported()
true
if a rollback is supported.