public class MethodSecurityInterceptor extends AbstractSecurityInterceptor implements org.aopalliance.intercept.MethodInterceptor
The SecurityMetadataSource
required by this security interceptor is of
type MethodSecurityMetadataSource
. This is shared with the AspectJ based
security interceptor (AspectJSecurityInterceptor
), since both work with
Java Method
s.
Refer to AbstractSecurityInterceptor
for details on the workflow.
logger, messages
Constructor and Description |
---|
MethodSecurityInterceptor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getSecureObjectClass()
Indicates the type of secure objects the subclass will be presenting to the
abstract parent for processing.
|
MethodSecurityMetadataSource |
getSecurityMetadataSource() |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation mi)
This method should be used to enforce security on a
MethodInvocation . |
SecurityMetadataSource |
obtainSecurityMetadataSource() |
void |
setSecurityMetadataSource(MethodSecurityMetadataSource newSource) |
afterInvocation, afterPropertiesSet, beforeInvocation, finallyInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setPublishAuthorizationSuccess, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
public java.lang.Class<?> getSecureObjectClass()
AbstractSecurityInterceptor
AbstractSecurityInterceptor
all support the indicated secure object class.getSecureObjectClass
in class AbstractSecurityInterceptor
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws java.lang.Throwable
MethodInvocation
.invoke
in interface org.aopalliance.intercept.MethodInterceptor
mi
- The method being invoked which requires a security decisionAfterInvocationManager
).java.lang.Throwable
- if any error occurspublic MethodSecurityMetadataSource getSecurityMetadataSource()
public SecurityMetadataSource obtainSecurityMetadataSource()
obtainSecurityMetadataSource
in class AbstractSecurityInterceptor
public void setSecurityMetadataSource(MethodSecurityMetadataSource newSource)