public abstract class AuthorizingAnnotationMethodInterceptor extends AnnotationMethodInterceptor
|Constructor and Description|
Constructor that ensures the internal
|Modifier and Type||Method and Description|
Ensures the calling Subject is authorized to execute the specified
getAnnotation, getHandler, getResolver, setHandler, setResolver, supports
public AuthorizingAnnotationMethodInterceptor(AuthorizingAnnotationHandler handler)
handleris set which will be used to perform the authorization assertion checks when a supported annotation is encountered.
handler- the internal
handlerused to perform authorization assertion checks when a supported annotation is encountered.
public Object invoke(MethodInvocation methodInvocation) throws Throwable
methodInvocationis allowed to execute first before proceeding by calling the
methodInvocation- the method invocation to check for authorization prior to allowing it to proceed/execute.
AuthorizationException- if the
MethodInvocationis not allowed to proceed.
Throwable- if any other error occurs.
public void assertAuthorized(MethodInvocation mi) throws AuthorizationException
MethodInvocation. As this is an AnnotationMethodInterceptor, this implementation merely delegates to the internal
AuthorizingAnnotationHandlerby first acquiring the annotation by calling
getAnnotation(methodInvocation)and then calls
MethodInvocationto check to see if it is allowed to proceed/execute.
AuthorizationException- if the method invocation is not allowed to continue/execute.
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.