Interface PolicyEvaluator
-
- All Known Implementing Classes:
TrackableEntityPolicyEvaluator
public interface PolicyEvaluator
Validate security context required to execute a method annotated withPolicy
.- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PolicyResponse
validate(Map<Integer,Object> methodParams, PolicyInformation policy, ContextInfo contextInfo, OperationType operationType)
Validate security context required to execute a method annotated withPolicy
.PolicyResponse
validateReadOutput(Object output, PolicyInformation policy)
Validate the output of a read method for methods annotated with a Policy of theIdentityType.OWNER
type and a matching user of the owner type (seeTrackablePolicyUtils#isOwnerUser()
).
-
-
-
Method Detail
-
validate
PolicyResponse validate(Map<Integer,Object> methodParams, PolicyInformation policy, ContextInfo contextInfo, OperationType operationType)
Validate security context required to execute a method annotated withPolicy
.- Parameters:
methodParams
- The method parameters in the method call being validatedpolicy
- ThePolicy
annotation on the method- Returns:
- The result of the validation
-
validateReadOutput
PolicyResponse validateReadOutput(Object output, PolicyInformation policy)
Validate the output of a read method for methods annotated with a Policy of theIdentityType.OWNER
type and a matching user of the owner type (seeTrackablePolicyUtils#isOwnerUser()
).- Parameters:
output
- The results of the read operationpolicy
- ThePolicy
annotation on the method- Returns:
- The result of the validation
-
-