Package com.atlassian.jira.user.util
Class StaticRecoveryMode
java.lang.Object
com.atlassian.jira.user.util.StaticRecoveryMode
- All Implemented Interfaces:
RecoveryMode
Simple implementation of
RecoveryMode
that uses a static user.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticRecoveryMode
disabled()
static StaticRecoveryMode
io.atlassian.fugue.Option
<String> Tells the caller the name of the 'recovery admin'.boolean
Tells the caller if JIRA is in recovery mode.boolean
Tells if the caller if the passedApplicationUser
is the 'recovery admin'.boolean
isRecoveryUsername
(String username) Tells the caller if the passed username is associated with the 'recovery admin'.
-
Constructor Details
-
StaticRecoveryMode
-
-
Method Details
-
isRecoveryModeOn
public boolean isRecoveryModeOn()Description copied from interface:RecoveryMode
Tells the caller if JIRA is in recovery mode.- Specified by:
isRecoveryModeOn
in interfaceRecoveryMode
- Returns:
true
JIRA is in recovery mode or false otherwise.
-
isRecoveryUser
Description copied from interface:RecoveryMode
Tells if the caller if the passedApplicationUser
is the 'recovery admin'.- Specified by:
isRecoveryUser
in interfaceRecoveryMode
- Returns:
true
if the passedApplicationUser
is the 'recovery admin' and recovery mode is enabled.
-
isRecoveryUsername
Description copied from interface:RecoveryMode
Tells the caller if the passed username is associated with the 'recovery admin'.- Specified by:
isRecoveryUsername
in interfaceRecoveryMode
- Parameters:
username
- the username to check.- Returns:
true
if the passedname
is the 'recovery admin' and recovery mode is enabled.
-
getRecoveryUsername
Description copied from interface:RecoveryMode
Tells the caller the name of the 'recovery admin'.- Specified by:
getRecoveryUsername
in interfaceRecoveryMode
- 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
-
disabled
-