org.weborganic.bastille.security
Enum AuthorizationResult

java.lang.Object
  extended by java.lang.Enum<AuthorizationResult>
      extended by org.weborganic.bastille.security.AuthorizationResult
All Implemented Interfaces:
Serializable, Comparable<AuthorizationResult>

public enum AuthorizationResult
extends Enum<AuthorizationResult>

An enumeration for the results of authorization functions.

Since:
0.6.2

Enum Constant Summary
AUTHORIZED
          The user is authorised to access the resource.
FORBIDDEN
          The user is not authorised to access the resource due to lack of credentials.
UNAUTHORIZED
          The user is not authorised to access the resource due to lack of credentials.
 
Method Summary
static AuthorizationResult valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AuthorizationResult[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTHORIZED

public static final AuthorizationResult AUTHORIZED
The user is authorised to access the resource.


UNAUTHORIZED

public static final AuthorizationResult UNAUTHORIZED
The user is not authorised to access the resource due to lack of credentials. (for example, if the user is not logged in).


FORBIDDEN

public static final AuthorizationResult FORBIDDEN
The user is not authorised to access the resource due to lack of credentials. (The user is logged in, but he is not allowed to access the resource)

Method Detail

values

public static AuthorizationResult[] 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 (AuthorizationResult c : AuthorizationResult.values())
    System.out.println(c);

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

valueOf

public static AuthorizationResult 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