Class DefaultLockOutProvider
- java.lang.Object
-
- org.jivesoftware.openfire.lockout.DefaultLockOutProvider
-
- All Implemented Interfaces:
LockOutProvider
public class DefaultLockOutProvider extends Object implements LockOutProvider
The DefaultLockOutProvider works with the ofUserFlag table to maintain a list of disabled/locked out accounts., and as the name implies, is the default LockOutProvider implementation.- Author:
- Daniel Henninger
-
-
Constructor Summary
Constructors Constructor Description DefaultLockOutProvider()
Constructs a new DefaultLockOutProvider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockOutFlag
getDisabledStatus(String username)
Default provider retrieves disabled status from ofUserFlag table.boolean
isDelayedStartSupported()
Default provider allows delayed start to disabled status.boolean
isReadOnly()
Default provider allows editing of disabled status.boolean
isTimeoutSupported()
Default provider allows timeout of disabled status.void
setDisabledStatus(LockOutFlag flag)
Default provider deletes existing flag, if it exists, and adds new described flag in ofUserFlag table.boolean
shouldNotBeCached()
Default provider should be cached.void
unsetDisabledStatus(String username)
Default provider deletes existing flag from ofUserFlag table.
-
-
-
Method Detail
-
getDisabledStatus
public LockOutFlag getDisabledStatus(String username)
Default provider retrieves disabled status from ofUserFlag table.- Specified by:
getDisabledStatus
in interfaceLockOutProvider
- 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).
- See Also:
LockOutProvider.getDisabledStatus(String)
-
setDisabledStatus
public void setDisabledStatus(LockOutFlag flag)
Default provider deletes existing flag, if it exists, and adds new described flag in ofUserFlag table.- Specified by:
setDisabledStatus
in interfaceLockOutProvider
- Parameters:
flag
- A LockOutFlag instance to describe the disabled status of a user.- See Also:
LockOutProvider.setDisabledStatus(LockOutFlag)
-
unsetDisabledStatus
public void unsetDisabledStatus(String username)
Default provider deletes existing flag from ofUserFlag table.- Specified by:
unsetDisabledStatus
in interfaceLockOutProvider
- Parameters:
username
- User to enable.- See Also:
LockOutProvider.unsetDisabledStatus(String)
-
isReadOnly
public boolean isReadOnly()
Default provider allows editing of disabled status.- Specified by:
isReadOnly
in interfaceLockOutProvider
- Returns:
- true if the lock out provider is read-only.
- See Also:
LockOutProvider.isReadOnly()
-
isDelayedStartSupported
public boolean isDelayedStartSupported()
Default provider allows delayed start to disabled status.- Specified by:
isDelayedStartSupported
in interfaceLockOutProvider
- Returns:
- true if the lock out provider provides this feature.
- See Also:
LockOutProvider.isDelayedStartSupported()
-
isTimeoutSupported
public boolean isTimeoutSupported()
Default provider allows timeout of disabled status.- Specified by:
isTimeoutSupported
in interfaceLockOutProvider
- Returns:
- true if the lcok out provider provides this feature.
- See Also:
LockOutProvider.isTimeoutSupported()
-
shouldNotBeCached
public boolean shouldNotBeCached()
Default provider should be cached.- Specified by:
shouldNotBeCached
in interfaceLockOutProvider
- Returns:
- true if disabled status should not be cached.
- See Also:
LockOutProvider.shouldNotBeCached()
-
-