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 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.
-
-
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.
-
Field Summary
Fields Modifier and Type Field Description private AccountState.Error[]
accountErrors
account error.private AccountState.Warning[]
accountWarnings
account warning.
-
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.String
toString()
-
-
-
Field Detail
-
accountWarnings
private final AccountState.Warning[] accountWarnings
account warning.
-
accountErrors
private final AccountState.Error[] accountErrors
account error.
-
-
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
-
-