org.codehaus.groovy.grails.plugins.springsecurity
Class QuietMethodSecurityInterceptor

java.lang.Object
  extended by org.springframework.security.intercept.AbstractSecurityInterceptor
      extended by org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor
          extended by org.codehaus.groovy.grails.plugins.springsecurity.QuietMethodSecurityInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.MessageSourceAware

public class QuietMethodSecurityInterceptor
extends org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor

MethodSecurityInterceptor that doesn't throw exceptions if Method Access is denied, returns null instead.

Author:
T.Yamamoto

Field Summary
 
Fields inherited from class org.springframework.security.intercept.AbstractSecurityInterceptor
logger, messages
 
Constructor Summary
QuietMethodSecurityInterceptor()
           
 
Method Summary
 Object invoke(org.aopalliance.intercept.MethodInvocation mi)
          
 void setThrowException(boolean throwException)
          Dependency injection for throw exception flag.
 
Methods inherited from class org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor
getObjectDefinitionSource, getSecureObjectClass, obtainObjectDefinitionSource, setObjectDefinitionSource
 
Methods inherited from class org.springframework.security.intercept.AbstractSecurityInterceptor
afterInvocation, afterPropertiesSet, beforeInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuietMethodSecurityInterceptor

public QuietMethodSecurityInterceptor()
Method Detail

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation mi)
              throws Throwable

Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Overrides:
invoke in class org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor
Throws:
Throwable
See Also:
MethodSecurityInterceptor.invoke( org.aopalliance.intercept.MethodInvocation)

setThrowException

public void setThrowException(boolean throwException)
Dependency injection for throw exception flag.

Parameters:
throwException - if true throw exceptions, otherwise just log