Class StaticRecoveryMode

java.lang.Object
com.atlassian.jira.user.util.StaticRecoveryMode
All Implemented Interfaces:
RecoveryMode

public class StaticRecoveryMode extends Object implements RecoveryMode
Simple implementation of RecoveryMode that uses a static user.
  • Constructor Details

    • StaticRecoveryMode

      public StaticRecoveryMode(String recoveryUsername)
  • Method Details

    • isRecoveryModeOn

      public boolean isRecoveryModeOn()
      Description copied from interface: RecoveryMode
      Tells the caller if JIRA is in recovery mode.
      Specified by:
      isRecoveryModeOn in interface RecoveryMode
      Returns:
      true JIRA is in recovery mode or false otherwise.
    • isRecoveryUser

      public boolean isRecoveryUser(ApplicationUser user)
      Description copied from interface: RecoveryMode
      Tells if the caller if the passed ApplicationUser is the 'recovery admin'.
      Specified by:
      isRecoveryUser in interface RecoveryMode
      Returns:
      true if the passed ApplicationUser is the 'recovery admin' and recovery mode is enabled.
    • isRecoveryUsername

      public boolean isRecoveryUsername(String username)
      Description copied from interface: RecoveryMode
      Tells the caller if the passed username is associated with the 'recovery admin'.
      Specified by:
      isRecoveryUsername in interface RecoveryMode
      Parameters:
      username - the username to check.
      Returns:
      true if the passed name is the 'recovery admin' and recovery mode is enabled.
    • getRecoveryUsername

      public io.atlassian.fugue.Option<String> getRecoveryUsername()
      Description copied from interface: RecoveryMode
      Tells the caller the name of the 'recovery admin'.
      Specified by:
      getRecoveryUsername in interface RecoveryMode
      Returns:
      the name of the user who is considered to be the 'recovery admin' or Option.none() if there is no 'recovery admin' active.
    • enabled

      public static StaticRecoveryMode enabled(String user)
    • disabled

      public static StaticRecoveryMode disabled()