AutoUninstallAction (install4j API)
Description: declaration: package: com.install4j.api.actions, interface: AutoUninstallAction

Package com.install4j.api.actions

# Interface AutoUninstallAction

All Superinterfaces:
  `Action`, `Bean`, `Serializable`, `UninstallAction`

public interface AutoUninstallAction extends UninstallAction
If you write an installation action that wants to be automatically invoked in the uninstaller to revert its changes, you can additionally implement this interface. The additional methods of this interface give you access to a persistent store that can be used at installation time to save information about any performed changes. At uninstallation time, you can use the persistent store to load this information again. Each instance of an action has a separate persistent store.

Auto-uninstall actions have their `uninstall` method invoked by the "Uninstall files" action before any files are uninstalled and in the reverse order in which they were invoked in the installer. If no "Uninstall files" action is present in the uninstaller, the `uninstall` method will not be called.

Note: If you add an auto-uninstall action to the uninstaller, its `AutoUninstallAction` interface will be ignored.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Properties`
  `getPersistentProperties()`
  The framework invokes this method in the installer just before the installer exits to get the persistent properties of the installation action.
  `void`
  `setPersistentProperties(Properties properties)`
  The framework invokes this method in the uninstaller at the beginning of the "Uninstall files" action to restore the persistent properties that were saved in the installer.

  ### Methods inherited from interface com.install4j.api.actions.Action

  `init`

  ### Methods inherited from interface com.install4j.api.actions.UninstallAction

  `uninstall`

- ## Method Details

  - ### getPersistentProperties

    Properties getPersistentProperties()
    The framework invokes this method in the installer just before the installer exits to get the persistent properties of the installation action.
    Returns:
      the persistent properties

  - ### setPersistentProperties

    void setPersistentProperties(Properties properties)
    The framework invokes this method in the uninstaller at the beginning of the "Uninstall files" action to restore the persistent properties that were saved in the installer.
    Parameters:
      `properties` - the persistent properties