Enum Class PermissionProcessor
java.lang.Object
java.lang.Enum<PermissionProcessor>
edu.internet2.middleware.grouper.permissions.PermissionProcessor
- All Implemented Interfaces:
Serializable
,Comparable<PermissionProcessor>
,Constable
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)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionthis will see if there are two rows with the same role/subject/permissionName/action, pick the best one, and remove the othersthis will see if there are two rows with the same role/subject/permissionName/action, pick the best one, and remove the othersif there are two entries for the same subject/permissionName/action in different roles, it will pick the best one, and remove the othersif there are two entries for the same subject/permissionName/action in different roles, it will pick the best one, and remove the othersthis 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
Modifier and TypeMethodDescriptionabstract boolean
if this is a limit processorabstract PermissionProcessor
if this is a limit processor, get the equivalent which isntstatic void
processLimits
(Collection<PermissionEntry> permissionEntrySet, Map<String, Object> limitEnvVarsString, Map<PermissionEntry, Set<PermissionLimitBean>> permissionLimitBeanMap) process limits on some permission entriesabstract void
processPermissions
(Collection<PermissionEntry> permissionEntrySet, Map<String, Object> limitEnvVars) filer permissions out which can be pruned based on the type of processorstatic PermissionProcessor
Returns the enum constant of this class with the specified name.static PermissionProcessor
valueOfIgnoreCase
(String theString, boolean exceptionOnNull) do a case-insensitive matchingstatic PermissionProcessor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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 Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- 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 notpermissionLimitBeanMap
- the map of permission entry to its associated limits you can get that with PermissionLimitBean.findPermissionLimits()
-
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
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
-