Interface LockOutProvider

  • All Known Implementing Classes:
    DefaultLockOutProvider

    public interface LockOutProvider
    A LockOutProvider handles storage of information about disabled accounts, and requests for whether an account is currently disabled. If set read-only, only requests for disabled status are expected to work.
    Author:
    Daniel Henninger
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      LockOutFlag getDisabledStatus​(String username)
      Returns a LockOutFlag for a given username, which contains information about the time period that the specified account is going to be disabled or null if user can log in just fine.
      boolean isDelayedStartSupported()
      Returns true if the LockOutProvider allows for a delayed start to the lockout.
      boolean isReadOnly()
      Returns true if this LockOutProvider is read-only.
      boolean isTimeoutSupported()
      Returns true if the LockOutProvider allows for a timeout after which the lock out will expire.
      void setDisabledStatus​(LockOutFlag flag)
      Sets the locked out (disabled) status of an account according to a LockOutFlag.
      boolean shouldNotBeCached()
      Returns true if the lock out flags should not be cached, meaning every status lookup will go straight to the source.
      void unsetDisabledStatus​(String username)
      Unsets the locked out (disabled) status of an account, thereby enabling it/cancelling the disable.
    • Method Detail

      • getDisabledStatus

        LockOutFlag getDisabledStatus​(String username)
        Returns a LockOutFlag for a given username, which contains information about the time period that the specified account is going to be disabled or null if user can log in just fine.
        Parameters:
        username - Username of account to request status of.
        Returns:
        The LockOutFlag instance describing the accounts disabled status or null if user account specified is not currently locked out (disabled).
      • setDisabledStatus

        void setDisabledStatus​(LockOutFlag flag)
        Sets the locked out (disabled) status of an account according to a LockOutFlag.
        Parameters:
        flag - A LockOutFlag instance to describe the disabled status of a user.
      • unsetDisabledStatus

        void unsetDisabledStatus​(String username)
        Unsets the locked out (disabled) status of an account, thereby enabling it/cancelling the disable.
        Parameters:
        username - User to enable.
      • isReadOnly

        boolean isReadOnly()
        Returns true if this LockOutProvider is read-only. When read-only, disabled status of accounts can not be changed via Openfire.
        Returns:
        true if the lock out provider is read-only.
      • isDelayedStartSupported

        boolean isDelayedStartSupported()
        Returns true if the LockOutProvider allows for a delayed start to the lockout. e.g. you can set the lockout to start in one hour. This is really only used for UI in the admin interface. It's up to the provider implementation to ignore the start time.
        Returns:
        true if the lock out provider provides this feature.
      • isTimeoutSupported

        boolean isTimeoutSupported()
        Returns true if the LockOutProvider allows for a timeout after which the lock out will expire. e.g. you can set the lockout to only last for one day. This is really only used for UI in the admin interface. It's up to the provider implementation to ignore the end time.
        Returns:
        true if the lcok out provider provides this feature.
      • shouldNotBeCached

        boolean shouldNotBeCached()
        Returns true if the lock out flags should not be cached, meaning every status lookup will go straight to the source. This is typically set if the status can change on the provider target without Openfire knowing about it.
        Returns:
        true if disabled status should not be cached.