Package org.ldaptive.auth
Class AccountState
- java.lang.Object
-
- org.ldaptive.auth.AccountState
-
- Direct Known Subclasses:
ActiveDirectoryAccountState
,EDirectoryAccountState
,FreeIPAAccountState
,PasswordExpirationAccountState
,PasswordPolicyAccountState
public class AccountState extends java.lang.Object
Represents the state of an LDAP account based on account policies for that LDAP. Note that only warning(s) or error(s) may be set, not both.- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccountState.DefaultWarning
Default warning implementation.static interface
AccountState.Error
Contains error information for an account state.static interface
AccountState.Warning
Contains warning information for an account state.
-
Constructor Summary
Constructors Constructor Description AccountState(AccountState.Error... errors)
Creates a new account state.AccountState(AccountState.Warning... warnings)
Creates a new account state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountState.Error
getError()
Returns the first account state error or null if no errors exist.AccountState.Error[]
getErrors()
Returns the account state errors.AccountState.Warning
getWarning()
Returns the first account state warning or null if no warnings exist.AccountState.Warning[]
getWarnings()
Returns the account state warnings.java.lang.String
toString()
-
-
-
Constructor Detail
-
AccountState
public AccountState(AccountState.Warning... warnings)
Creates a new account state.- Parameters:
warnings
- associated with the account
-
AccountState
public AccountState(AccountState.Error... errors)
Creates a new account state.- Parameters:
errors
- associated with the account
-
-
Method Detail
-
getWarnings
public AccountState.Warning[] getWarnings()
Returns the account state warnings.- Returns:
- account state warnings
-
getWarning
public AccountState.Warning getWarning()
Returns the first account state warning or null if no warnings exist.- Returns:
- first account state warning
-
getErrors
public AccountState.Error[] getErrors()
Returns the account state errors.- Returns:
- account state errors
-
getError
public AccountState.Error getError()
Returns the first account state error or null if no errors exist.- Returns:
- first account state error
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-