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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccountState.DefaultWarningDefault warning implementation.static interfaceAccountState.ErrorContains error information for an account state.static interfaceAccountState.WarningContains warning information for an account state.
-
Field Summary
Fields Modifier and Type Field Description private AccountState.Error[]accountErrorsaccount error.private AccountState.Warning[]accountWarningsaccount warning.
-
Constructor Summary
Constructors Constructor Description AccountState(AccountState.Error... errors)Creates a new account state.AccountState(AccountState.Warning... warnings)Creates a new account state.AccountState(AccountState.Warning[] warnings, AccountState.Error[] errors)Creates a new account state.AccountState(AccountState.Warning warning, AccountState.Error error)Creates a new account state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountState.ErrorgetError()Returns the first account state error or null if no errors exist.AccountState.Error[]getErrors()Returns the account state errors.AccountState.WarninggetWarning()Returns the first account state warning or null if no warnings exist.AccountState.Warning[]getWarnings()Returns the account state warnings.StringtoString()
-
-
-
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 warning, AccountState.Error error)
Creates a new account state.- Parameters:
warning- associated with the accounterror- associated with the account
-
AccountState
public AccountState(AccountState.Warning[] warnings, AccountState.Error[] errors)
Creates a new account state.- Parameters:
warnings- associated with the accounterrors- associated with the account
-
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
-
-