public class DefaultPolicyAspectProcessor extends Object implements PolicyAspectProcessor
Constructor and Description |
---|
DefaultPolicyAspectProcessor(PolicyEvaluator policyEvaluator) |
Modifier and Type | Method and Description |
---|---|
protected PolicyInformation |
buildPolicyInformation(IdentityType[] identityTypes,
String[] permissionRoots,
OperationType[] operationTypes,
PermissionMatchingStrategy multipleRootsMatchingStrategy,
String ownerIdentifier,
int param,
int ownerIdentifierParam)
|
protected OperationType |
narrowType(PolicyInformation policy,
ContextInfo contextInfo)
Figure out the OperationType to use, given the policy and contextInfo.
|
protected void |
notify(PolicyResponse policyResponse)
Raise an exception for a failed
PolicyResponse |
void |
setOverrides(List<PolicyOverride> injected) |
Object |
validate(org.aspectj.lang.ProceedingJoinPoint joinPoint,
Object aspect)
Validate the
Policy annotated method call |
public DefaultPolicyAspectProcessor(PolicyEvaluator policyEvaluator)
@Autowired public void setOverrides(@Nullable List<PolicyOverride> injected)
public Object validate(org.aspectj.lang.ProceedingJoinPoint joinPoint, Object aspect) throws Throwable
PolicyAspectProcessor
Policy
annotated method callvalidate
in interface PolicyAspectProcessor
joinPoint
- metadata about the method callaspect
- the instance of the Aspect
annotate class driving this callThrowable
- any exceptionprotected PolicyInformation buildPolicyInformation(IdentityType[] identityTypes, String[] permissionRoots, OperationType[] operationTypes, PermissionMatchingStrategy multipleRootsMatchingStrategy, String ownerIdentifier, int param, int ownerIdentifierParam)
identityTypes
- see Policy.identityTypes()
permissionRoots
- see Policy.permissionRoots()
operationTypes
- see Policy.operationTypes()
multipleRootsMatchingStrategy
- see Policy.permissionMatchingStrategy()
ownerIdentifier
- see Policy.ownerIdentifier()
param
- see Policy.param()
ownerIdentifierParam
- protected OperationType narrowType(PolicyInformation policy, ContextInfo contextInfo)
policy
- The policy annotation on the method that optionally defines one or more
OperationTypescontextInfo
- The optional contextInfo that describes an overall operationType for the
context of the requestprotected void notify(PolicyResponse policyResponse)
PolicyResponse
policyResponse
- Failed responseCopyright © 2021. All rights reserved.