Interface PolicyEvaluator
- All Known Implementing Classes:
TrackableEntityPolicyEvaluator
public interface PolicyEvaluator
Validate security context required to execute a method annotated with
Policy
.- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionvalidate
(Map<Integer, Object> methodParams, PolicyInformation policy, ContextInfo contextInfo, OperationType operationType) Validate security context required to execute a method annotated withPolicy
.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 Details
-
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
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
-