View Javadoc
1   package com.atlassian.plugin.event.events;
2   
3   import com.atlassian.annotations.PublicApi;
4   import com.atlassian.plugin.ModuleDescriptor;
5   
6   /**
7    * Base class for events with persistent flag in addition to ModuleDescriptor context.
8    *
9    * @see com.atlassian.plugin.event.events
10   * @since 4.0.0
11   */
12  @PublicApi
13  public class PluginModulePersistentEvent extends PluginModuleEvent {
14      private final boolean persistent;
15  
16      public PluginModulePersistentEvent(final ModuleDescriptor<?> module, final boolean persistent) {
17          super(module);
18          this.persistent = persistent;
19      }
20  
21      /**
22       * @return <code>true</code> if this disabling will be persistent, i.e. it is not a transient, such as for an
23       * upgrade.
24       * @since 2.8.0 (originally in PluginModuleDisabledEvent); moved here in 4.0.0
25       */
26      public boolean isPersistent() {
27          return persistent;
28      }
29  }