org.ldaptive.auth.ext
Enum FreeIPAAccountState.Error

java.lang.Object
  extended by java.lang.Enum<FreeIPAAccountState.Error>
      extended by org.ldaptive.auth.ext.FreeIPAAccountState.Error
All Implemented Interfaces:
Serializable, Comparable<FreeIPAAccountState.Error>, AccountState.Error
Enclosing class:
FreeIPAAccountState

public static enum FreeIPAAccountState.Error
extends Enum<FreeIPAAccountState.Error>
implements AccountState.Error

Enum to define FreeIPA errors.


Enum Constant Summary
ACCOUNT_DISABLED
          account disabled.
ACCOUNT_EXPIRED
          account expired.
ACCOUNT_NOT_FOUND
          account not found.
CREDENTIAL_NOT_FOUND
          credential not found.
FAILED_AUTHENTICATION
          failed authentication.
LOGIN_LOCKOUT
          login lockout.
LOGIN_TIME_LIMITED
          login time limited.
MAXIMUM_LOGINS_EXCEEDED
          maximum logins exceeded.
PASSWORD_EXPIRED
          password expired.
UNKNOWN
          unknown state.
 
Method Summary
 int getCode()
          Returns the error code.
 String getMessage()
          Returns the error message.
static FreeIPAAccountState.Error parse(ResultCode rc, String message)
          Parses the supplied error messages and returns the corresponding error enum.
 void throwSecurityException()
          Throws the LoginException that best maps to this error.
static FreeIPAAccountState.Error valueOf(int code)
          Returns the error for the supplied integer constant.
static FreeIPAAccountState.Error valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FreeIPAAccountState.Error[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final FreeIPAAccountState.Error UNKNOWN
unknown state.


FAILED_AUTHENTICATION

public static final FreeIPAAccountState.Error FAILED_AUTHENTICATION
failed authentication.


PASSWORD_EXPIRED

public static final FreeIPAAccountState.Error PASSWORD_EXPIRED
password expired.


ACCOUNT_EXPIRED

public static final FreeIPAAccountState.Error ACCOUNT_EXPIRED
account expired.


MAXIMUM_LOGINS_EXCEEDED

public static final FreeIPAAccountState.Error MAXIMUM_LOGINS_EXCEEDED
maximum logins exceeded.


LOGIN_TIME_LIMITED

public static final FreeIPAAccountState.Error LOGIN_TIME_LIMITED
login time limited.


LOGIN_LOCKOUT

public static final FreeIPAAccountState.Error LOGIN_LOCKOUT
login lockout.


ACCOUNT_NOT_FOUND

public static final FreeIPAAccountState.Error ACCOUNT_NOT_FOUND
account not found.


CREDENTIAL_NOT_FOUND

public static final FreeIPAAccountState.Error CREDENTIAL_NOT_FOUND
credential not found.


ACCOUNT_DISABLED

public static final FreeIPAAccountState.Error ACCOUNT_DISABLED
account disabled.

Method Detail

values

public static FreeIPAAccountState.Error[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FreeIPAAccountState.Error c : FreeIPAAccountState.Error.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FreeIPAAccountState.Error valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public int getCode()
Description copied from interface: AccountState.Error
Returns the error code.

Specified by:
getCode in interface AccountState.Error
Returns:
error code

getMessage

public String getMessage()
Description copied from interface: AccountState.Error
Returns the error message.

Specified by:
getMessage in interface AccountState.Error
Returns:
error message

throwSecurityException

public void throwSecurityException()
                            throws LoginException
Description copied from interface: AccountState.Error
Throws the LoginException that best maps to this error.

Specified by:
throwSecurityException in interface AccountState.Error
Throws:
LoginException - for this account state error

valueOf

public static FreeIPAAccountState.Error valueOf(int code)
Returns the error for the supplied integer constant.

Parameters:
code - to find error for
Returns:
error

parse

public static FreeIPAAccountState.Error parse(ResultCode rc,
                                              String message)
Parses the supplied error messages and returns the corresponding error enum.

Parameters:
rc - result code
message - to parse
Returns:
freeipa error


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.