edu.internet2.middleware.grouper.permissions
Enum PermissionProcessor

java.lang.Object
  extended by java.lang.Enum<PermissionProcessor>
      extended by edu.internet2.middleware.grouper.permissions.PermissionProcessor
All Implemented Interfaces:
Serializable, Comparable<PermissionProcessor>

public enum PermissionProcessor
extends Enum<PermissionProcessor>

if processing permissions, you can filter out either redundant permissions (find best in set), or do that and filter out redundant roles (if flattening roles) (find best in set)


Enum Constant Summary
FILTER_REDUNDANT_PERMISSIONS
          this will see if there are two rows with the same role/subject/permissionName/action, pick the best one, and remove the others
FILTER_REDUNDANT_PERMISSIONS_AND_PROCESS_LIMITS
          this will see if there are two rows with the same role/subject/permissionName/action, pick the best one, and remove the others
FILTER_REDUNDANT_PERMISSIONS_AND_ROLES
          if there are two entries for the same subject/permissionName/action in different roles, it will pick the best one, and remove the others
FILTER_REDUNDANT_PERMISSIONS_AND_ROLES_AND_PROCESS_LIMITS
          if there are two entries for the same subject/permissionName/action in different roles, it will pick the best one, and remove the others
PROCESS_LIMITS
          this will look at the permissions and see if there are limits assigned and see if the limits will rule out any of the entries
 
Method Summary
abstract  boolean isLimitProcessor()
          if this is a limit processor
abstract  PermissionProcessor nonLimitPermissionProcesssor()
          if this is a limit processor, get the equivalent which isnt
static void processLimits(Collection<PermissionEntry> permissionEntrySet, Map<String,Object> limitEnvVarsString, Map<PermissionEntry,Set<PermissionLimitBean>> permissionLimitBeanMap)
          process limits on some permission entries
abstract  void processPermissions(Collection<PermissionEntry> permissionEntrySet, Map<String,Object> limitEnvVars)
          filer permissions out which can be pruned based on the type of processor
static PermissionProcessor valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PermissionProcessor valueOfIgnoreCase(String theString, boolean exceptionOnNull)
          do a case-insensitive matching
static PermissionProcessor[] 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

FILTER_REDUNDANT_PERMISSIONS

public static final PermissionProcessor FILTER_REDUNDANT_PERMISSIONS
this will see if there are two rows with the same role/subject/permissionName/action, pick the best one, and remove the others


FILTER_REDUNDANT_PERMISSIONS_AND_ROLES

public static final PermissionProcessor FILTER_REDUNDANT_PERMISSIONS_AND_ROLES
if there are two entries for the same subject/permissionName/action in different roles, it will pick the best one, and remove the others


FILTER_REDUNDANT_PERMISSIONS_AND_PROCESS_LIMITS

public static final PermissionProcessor FILTER_REDUNDANT_PERMISSIONS_AND_PROCESS_LIMITS
this will see if there are two rows with the same role/subject/permissionName/action, pick the best one, and remove the others


FILTER_REDUNDANT_PERMISSIONS_AND_ROLES_AND_PROCESS_LIMITS

public static final PermissionProcessor FILTER_REDUNDANT_PERMISSIONS_AND_ROLES_AND_PROCESS_LIMITS
if there are two entries for the same subject/permissionName/action in different roles, it will pick the best one, and remove the others


PROCESS_LIMITS

public static final PermissionProcessor PROCESS_LIMITS
this will look at the permissions and see if there are limits assigned and see if the limits will rule out any of the entries

Method Detail

values

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

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

valueOf

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

processPermissions

public abstract void processPermissions(Collection<PermissionEntry> permissionEntrySet,
                                        Map<String,Object> limitEnvVars)
filer permissions out which can be pruned based on the type of processor

Parameters:
permissionEntrySet -
limitEnvVars - if processing limits, pass in a map of limits. The name is the name of the variable, and the value is the value. Note, you can typecast the values by putting a valid type in parens in front of the param name. e.g. name: (int)amount, value: 50

processLimits

public static void processLimits(Collection<PermissionEntry> permissionEntrySet,
                                 Map<String,Object> limitEnvVarsString,
                                 Map<PermissionEntry,Set<PermissionLimitBean>> permissionLimitBeanMap)
process limits on some permission entries

Parameters:
permissionEntrySet -
limitEnvVarsString - can have types in there or not
permissionLimitBeanMap - the map of permission entry to its associated limits you can get that with PermissionLimitBean.findPermissionLimits()

nonLimitPermissionProcesssor

public abstract PermissionProcessor nonLimitPermissionProcesssor()
if this is a limit processor, get the equivalent which isnt

Returns:
permission processor

isLimitProcessor

public abstract boolean isLimitProcessor()
if this is a limit processor

Returns:
if this is a limit processor

valueOfIgnoreCase

public static PermissionProcessor valueOfIgnoreCase(String theString,
                                                    boolean exceptionOnNull)
do a case-insensitive matching

Parameters:
theString -
exceptionOnNull - will not allow null or blank entries
Returns:
the enum or null or exception if not found