Interface RecoveryModeService
- All Known Implementing Classes:
SystemPropertyRecoveryModeService
When recovery mode is activated
this service provides access to a special, in-memory
recovery directory
that contains a single user - host applications need to make
sure that this user has all the necessary permissions to recover from any malfunction or misconfiguration, should
one happen.
Interested parties (notably host applications) should subscribe to the
RecoveryModeActivatedEvent
to be notified of the recovery mode activation.
- Since:
- 2.7.2
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isRecoveryDirectory
(Directory directory) Checks if directory is RecoveryModeDirectoryboolean
-
Method Details
-
isRecoveryModeOn
boolean isRecoveryModeOn()- Returns:
true
, if recovery mode is currently activated. An appropriate event will be raised to notify about the recovery mode being activated in the system- See Also:
-
getRecoveryDirectory
Directory getRecoveryDirectory()- Returns:
- the recovery directory that contains the recovery user.
- Throws:
IllegalStateException
- if the recovery modeis off
-
getRecoveryUsername
String getRecoveryUsername()- Returns:
- the username of the recovery user
- Throws:
IllegalStateException
- if the recovery modeis off
-
isRecoveryDirectory
Checks if directory is RecoveryModeDirectory- Parameters:
directory
- to check- Returns:
- true when directory is recovery directory
-