Enum Class PermissionProcessor

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

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 Details

    • 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 Details

    • values

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

      public static PermissionProcessor valueOf(String name)
      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 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