Class PermissionLimitElLogic
java.lang.Object
edu.internet2.middleware.grouper.permissions.limits.PermissionLimitBase
edu.internet2.middleware.grouper.permissions.limits.impl.PermissionLimitElLogic
- All Implemented Interfaces:
PermissionLimitInterface
logic for the built in EL limit
-
Field Summary
Modifier and TypeFieldDescriptionstatic Integer
if you are testing this, set it, otherwise, it will defaultstatic int
count how many times called logic for testing the cache -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allowPermission
(PermissionEntry permissionEntry, AttributeAssign limitAssignment, Set<AttributeAssignValue> limitAssignmentValues, Map<String, Object> limitEnvVars, Set<PermissionLimitBean> permissionLimitBeans) if the limit allowed the permission to be allowedint
if we can cache the result for a some minutes.return a UI key to documentation about the limit.validateLimitAssignValue
(AttributeAssign limitAssign, Set<AttributeAssignValue> limitAssignmentValues) validate a user entered value(s) on the limit assignment
-
Field Details
-
testingCacheMinutesInt
if you are testing this, set it, otherwise, it will default -
testingTimesCalledLogic
public static int testingTimesCalledLogiccount how many times called logic for testing the cache
-
-
Constructor Details
-
PermissionLimitElLogic
public PermissionLimitElLogic()
-
-
Method Details
-
cacheLimitValueResultMinutes
public int cacheLimitValueResultMinutes()Description copied from interface:PermissionLimitInterface
if we can cache the result for a some minutes. i.e. for the same attribute assignment and value and input map, is the result the same... e.g. ip address math can be cached, amount limits, etc. If there are conditions about the permission names, then dont cache- Specified by:
cacheLimitValueResultMinutes
in interfacePermissionLimitInterface
- Overrides:
cacheLimitValueResultMinutes
in classPermissionLimitBase
- Returns:
- the number of minutes to cache
- See Also:
-
allowPermission
public boolean allowPermission(PermissionEntry permissionEntry, AttributeAssign limitAssignment, Set<AttributeAssignValue> limitAssignmentValues, Map<String, Object> limitEnvVars, Set<PermissionLimitBean> permissionLimitBeans) Description copied from interface:PermissionLimitInterface
if the limit allowed the permission to be allowed- Parameters:
permissionEntry
- to checklimitAssignment
- the assignment of the limit (e.g. to the permission assignment a parent assignment, or the role, etc)limitEnvVars
- value could be String, Long, or DoublepermissionLimitBeans
- all limits for this permission (in case the limit logic needs it... note, dont use built in caching if this is the case)- Returns:
- true if allowed, false if not
- See Also:
-
documentation
Description copied from interface:PermissionLimitInterface
return a UI key to documentation about the limit. for Grouper, put in nav.properties- Returns:
- a UI key
- See Also:
-
validateLimitAssignValue
public PermissionLimitDocumentation validateLimitAssignValue(AttributeAssign limitAssign, Set<AttributeAssignValue> limitAssignmentValues) Description copied from interface:PermissionLimitInterface
validate a user entered value(s) on the limit assignment- Returns:
- the UI key and args for the error code (arbitrary, in Grouper should put in nav.properties) or null for ok
- See Also:
-