public interface PolicyAspectProcessor
Policy
annotated methods and running those
requests through a PolicyEvaluator
before allowing the call to proceed. The around advice
will throw different classes of exceptions based on policy violations discovered. This exceptions
should generally be handled and converted to expected HTTP status responses. This is generally
done through an ExceptionHandler
annotated method in a ControllerAdvice
annotated
class.
Further customizations of Policy
configuration can be achieved via PolicyOverride
beans configured in Spring application context. PolicyOverride can also be used to introduce
policy configuration in the absence of Policy annotation. PolicyOverride can also be used to
remove existing Policy annotated configuration altogether.
Modifier and Type | Method and Description |
---|---|
Object |
validate(org.aspectj.lang.ProceedingJoinPoint joinPoint,
Object aspect)
Validate the
Policy annotated method call |
Object validate(org.aspectj.lang.ProceedingJoinPoint joinPoint, Object aspect) throws Throwable
Policy
annotated method calljoinPoint
- metadata about the method callaspect
- the instance of the Aspect
annotate class driving this callThrowable
- any exceptionCopyright © 2021. All rights reserved.