public class

StaticRecoveryMode

extends Object
implements RecoveryMode
java.lang.Object
   ↳ com.atlassian.jira.user.util.StaticRecoveryMode

Class Overview

Simple implementation of RecoveryMode that uses a static user.

Summary

Public Constructors
StaticRecoveryMode(String recoveryUsername)
Public Methods
static StaticRecoveryMode disabled()
static StaticRecoveryMode enabled(String user)
Option<String> getRecoveryUsername()
Tells the caller the name of the 'recovery admin'.
boolean isRecoveryModeOn()
Tells the caller if JIRA is in recovery mode.
boolean isRecoveryUser(ApplicationUser user)
Tells if the caller if the passed ApplicationUser is the 'recovery admin'.
boolean isRecoveryUsername(String username)
Tells the caller if the passed username is associated with the 'recovery admin'.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.user.util.RecoveryMode

Public Constructors

public StaticRecoveryMode (String recoveryUsername)

Public Methods

public static StaticRecoveryMode disabled ()

public static StaticRecoveryMode enabled (String user)

public Option<String> getRecoveryUsername ()

Tells the caller the name of the 'recovery admin'.

Returns
  • the name of the user who is considered to be the 'recovery admin' or none() if there is no 'recovery admin' active.

public boolean isRecoveryModeOn ()

Tells the caller if JIRA is in recovery mode.

Returns
  • true JIRA is in recovery mode or false otherwise.

public boolean isRecoveryUser (ApplicationUser user)

Tells if the caller if the passed ApplicationUser is the 'recovery admin'.

Returns
  • true if the passed ApplicationUser is the 'recovery admin' and recovery mode is enabled.

public boolean isRecoveryUsername (String username)

Tells the caller if the passed username is associated with the 'recovery admin'.

Parameters
username the username to check.
Returns
  • true if the passed name is the 'recovery admin' and recovery mode is enabled.