Class AuthorizingMethodInterceptor

    • Constructor Detail

      • AuthorizingMethodInterceptor

        public AuthorizingMethodInterceptor()
    • Method Detail

      • invoke

        public  invoke​(MethodInvocation methodInvocation)
                      throws 
        Invokes the specified method (methodInvocation.proceed() if authorization is allowed by first calling assertAuthorized.
        Parameters:
        methodInvocation - the MethodInvocation to execute.
        Returns:
        the result of the invocation
        Throws:
        - if the method invocation throws a Throwable or if an error occurs in pre/post/finally advice.
      • assertAuthorized

        protected abstract void assertAuthorized​(MethodInvocation methodInvocation)
                                          throws AuthorizationException
        Asserts that the specified MethodInvocation is allowed to continue by performing any necessary authorization (access control) checks first.
        Parameters:
        methodInvocation - the MethodInvocation to invoke.
        Throws:
        AuthorizationException - if the methodInvocation should not be allowed to continue/execute.