Interface RecoveryModeService

All Known Implementing Classes:
SystemPropertyRecoveryModeService

public interface RecoveryModeService
Internal service that provides access point to Crowd's recovery mode.

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 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 mode is off
    • getRecoveryUsername

      String getRecoveryUsername()
      Returns:
      the username of the recovery user
      Throws:
      IllegalStateException - if the recovery mode is off
    • isRecoveryDirectory

      boolean isRecoveryDirectory(Directory directory)
      Checks if directory is RecoveryModeDirectory
      Parameters:
      directory - to check
      Returns:
      true when directory is recovery directory