View Javadoc
1   package com.atlassian.plugin;
2   
3   /**
4    * A type of PluginInstaller that supports reverting plugin artifacts installed during the current running. Specifically,
5    * it is used during upgrades of plugins that use modules that require a restart, and therefore, is of no use to environments
6    * that have no such descriptors.
7    *
8    * Only plugins that were installed while the current instance has existed are eligible to be reverted. In
9    * other words, no state is persisted across restarts.
10   *
11   * @since 2.5.0
12   */
13  public interface RevertablePluginInstaller extends PluginInstaller {
14      /**
15       * Reverts a plugin artifact that was installed to its original state. If the artifact had already existed
16       * before it was upgraded, the old artifact should be returned to its place. If the artifact hadn't existed previously,
17       * then the installed plugin artifact should just be deleted. Calling this method after multiple installs or
18       * upgrades for a given plugin key during an instance will simple restore the original artifact, if any.
19       *
20       * @param pluginKey The plugin key to revert
21       */
22      void revertInstalledPlugin(String pluginKey);
23  
24      /**
25       * Clears any backed up artifacts from the previous run.
26       */
27      void clearBackups();
28  }