Interface AutoUninstallAction

  • All Superinterfaces:
    Action, Bean, java.io.Serializable, UninstallAction

    public interface AutoUninstallAction
    extends UninstallAction
    If you write an install 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 install time to save information about any performed changes. At uninstall 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Properties getPersistentProperties()
      The framework invokes this method in the installer just before the installer exits in order to get the persistent properties of the install action.
      void setPersistentProperties​(java.util.Properties properties)
      The framework invokes this method in the uninstaller at the beginning of the "Uninstall files" action in order to restore the persistent properties that were saved in the installer.
      • Methods inherited from interface com.install4j.api.actions.Action

        init
    • Method Detail

      • getPersistentProperties

        java.util.Properties getPersistentProperties()
        The framework invokes this method in the installer just before the installer exits in order to get the persistent properties of the install action.
        Returns:
        the persistent properties
      • setPersistentProperties

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