Class DefaultSafeModeManager

java.lang.Object
com.atlassian.plugin.manager.DefaultSafeModeManager
All Implemented Interfaces:
SafeModeManager

@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public class DefaultSafeModeManager extends Object implements SafeModeManager
Default implementation of SafeModeManager NB: The safe mode applies only in single node environment! The end application (e.g. JIRA) must implement ClusterEnvironmentProvider to trigger the safe mode manager logic
  • Constructor Details

  • Method Details

    • pluginShouldBeStarted

      public boolean pluginShouldBeStarted(Plugin plugin, Iterable<ModuleDescriptor> descriptors)
      Description copied from interface: SafeModeManager
      This checks if a plugin should be started when safe-mode is on
      Specified by:
      pluginShouldBeStarted in interface SafeModeManager
      Parameters:
      plugin - to be checked if it should be started
      descriptors - list of module descriptors to find the plugin references that must be started in safe mode (this is kinda tricky way to do such search, but the only available at the startup phase)
      Returns:
      true if plugin should be started when the product starts up or false otherwise
    • isInSafeMode

      public boolean isInSafeMode()
      Specified by:
      isInSafeMode in interface SafeModeManager
    • isRequiredPlugin

      public boolean isRequiredPlugin(Plugin plugin)
      Checks if the plugin is a required one
      Specified by:
      isRequiredPlugin in interface SafeModeManager
      Parameters:
      plugin - plugin to be checked
      Returns:
      true if the plugin is a system one