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      /**
16       * Reverts a plugin artifact that was installed to its original state.  If the artifact had already existed
17       * before it was upgraded, the old artifact should be returned to its place.  If the artifact hadn't existed previously,
18       * then the installed plugin artifact should just be deleted.  Calling this method after multiple installs or
19       * upgrades for a given plugin key during an instance will simple restore the original artifact, if any.
20       *
21       * @param pluginKey The plugin key to revert
22       *
23       */
24      void revertInstalledPlugin(String pluginKey);
25  
26      /**
27       * Clears any backed up artifacts from the previous run.
28       */
29      void clearBackups();
30  }