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 StaticRecoveryModedisabled()static StaticRecoveryModeio.atlassian.fugue.Option<String> Tells the caller the name of the 'recovery admin'.booleanTells the caller if JIRA is in recovery mode.booleanTells if the caller if the passedApplicationUseris the 'recovery admin'.booleanisRecoveryUsername(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:RecoveryModeTells the caller if JIRA is in recovery mode.- Specified by:
isRecoveryModeOnin interfaceRecoveryMode- Returns:
trueJIRA is in recovery mode or false otherwise.
-
isRecoveryUser
Description copied from interface:RecoveryModeTells if the caller if the passedApplicationUseris the 'recovery admin'.- Specified by:
isRecoveryUserin interfaceRecoveryMode- Returns:
trueif the passedApplicationUseris the 'recovery admin' and recovery mode is enabled.
-
isRecoveryUsername
Description copied from interface:RecoveryModeTells the caller if the passed username is associated with the 'recovery admin'.- Specified by:
isRecoveryUsernamein interfaceRecoveryMode- Parameters:
username- the username to check.- Returns:
trueif the passednameis the 'recovery admin' and recovery mode is enabled.
-
getRecoveryUsername
Description copied from interface:RecoveryModeTells the caller the name of the 'recovery admin'.- Specified by:
getRecoveryUsernamein 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
-