net.bryansaunders.jee6divelog.security.enumerator
Enum Permission

java.lang.Object
  extended by java.lang.Enum<Permission>
      extended by net.bryansaunders.jee6divelog.security.enumerator.Permission
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Permission>

public enum Permission
extends java.lang.Enum<Permission>

Account Permissions.

Author:
Bryan Saunders

Enum Constant Summary
DELETE_SELF
          Delete Self.
EDIT_SELF
          Edit Self.
 
Method Summary
 java.util.Map<Role,java.lang.Boolean> getDefaultPermission()
          Get the defaultPermission.
static java.util.Set<Permission> getDefaults(Role role)
          Get Default Permissions for the Given Role.
static Permission valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Permission[] 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

EDIT_SELF

public static final Permission EDIT_SELF
Edit Self.


DELETE_SELF

public static final Permission DELETE_SELF
Delete Self.

Method Detail

values

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

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

valueOf

public static Permission valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getDefaultPermission

public java.util.Map<Role,java.lang.Boolean> getDefaultPermission()
Get the defaultPermission.

Returns:
the defaultPermission

getDefaults

public static java.util.Set<Permission> getDefaults(Role role)
Get Default Permissions for the Given Role.

Parameters:
role - Role to check Permissions for
Returns:
List of Permission Objects


Copyright © 2012 Bryan Saunders. All Rights Reserved.