Class PreFilterAuthorizationMethodInterceptor
java.lang.Object
org.springframework.security.authorization.method.PreFilterAuthorizationMethodInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor,org.springframework.aop.Advisor,org.springframework.aop.framework.AopInfrastructureBean,org.springframework.aop.PointcutAdvisor,org.springframework.core.Ordered
public final class PreFilterAuthorizationMethodInterceptor
extends Object
implements org.springframework.core.Ordered, org.aopalliance.intercept.MethodInterceptor, org.springframework.aop.PointcutAdvisor, org.springframework.aop.framework.AopInfrastructureBean
A
MethodInterceptor which filters a method argument by evaluating an expression
from the PreFilter annotation.- Since:
- 5.6
-
Field Summary
Fields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreates aPreFilterAuthorizationMethodInterceptorusing the provided parameters -
Method Summary
Modifier and TypeMethodDescriptionorg.aopalliance.aop.AdviceintgetOrder()org.springframework.aop.Pointcutinvoke(org.aopalliance.intercept.MethodInvocation mi) Filter the method argument specified in thePreFilterannotation thatMethodInvocationspecifies.booleanvoidsetExpressionHandler(MethodSecurityExpressionHandler expressionHandler) Use thisMethodSecurityExpressionHandlervoidsetOrder(int order) voidSets theSecurityContextHolderStrategyto use.
-
Constructor Details
-
PreFilterAuthorizationMethodInterceptor
public PreFilterAuthorizationMethodInterceptor()Creates aPreFilterAuthorizationMethodInterceptorusing the provided parameters
-
-
Method Details
-
setExpressionHandler
Use thisMethodSecurityExpressionHandler- Parameters:
expressionHandler- theMethodSecurityExpressionHandlerto use
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) -
getPointcut
public org.springframework.aop.Pointcut getPointcut()- Specified by:
getPointcutin interfaceorg.springframework.aop.PointcutAdvisor
-
getAdvice
public org.aopalliance.aop.Advice getAdvice()- Specified by:
getAdvicein interfaceorg.springframework.aop.Advisor
-
isPerInstance
public boolean isPerInstance()- Specified by:
isPerInstancein interfaceorg.springframework.aop.Advisor
-
setSecurityContextHolderStrategy
Sets theSecurityContextHolderStrategyto use. The default action is to use theSecurityContextHolderStrategystored inSecurityContextHolder.- Since:
- 5.8
-
invoke
Filter the method argument specified in thePreFilterannotation thatMethodInvocationspecifies.- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Parameters:
mi- theMethodInvocationto check- Throws:
Throwable
-