Class AuthorizationAttributeSourceAdvisor

  • All Implemented Interfaces:
    Serializable, org.springframework.aop.Advisor, org.springframework.aop.MethodMatcher, org.springframework.aop.Pointcut, org.springframework.aop.PointcutAdvisor, org.springframework.core.Ordered

    public class AuthorizationAttributeSourceAdvisor
    extends org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
    TODO - complete JavaDoc
    Since:
    0.1
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.shiro.mgt.SecurityManager securityManager  
      • Fields inherited from interface org.springframework.aop.Advisor

        EMPTY_ADVICE
      • Fields inherited from interface org.springframework.aop.MethodMatcher

        TRUE
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
      • Fields inherited from interface org.springframework.aop.Pointcut

        TRUE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.shiro.mgt.SecurityManager getSecurityManager()  
      boolean matches​(Method method, Class targetClass)
      Returns true if the method or the class has any Shiro annotations, false otherwise.
      void setSecurityManager​(org.apache.shiro.mgt.SecurityManager securityManager)  
      • Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor

        getAdvice, getOrder, getPointcut, isPerInstance, setAdvice, setOrder
      • Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut

        getClassFilter, getMethodMatcher, setClassFilter
      • Methods inherited from class org.springframework.aop.support.StaticMethodMatcher

        isRuntime, matches
    • Field Detail

      • securityManager

        protected org.apache.shiro.mgt.SecurityManager securityManager
    • Constructor Detail

      • AuthorizationAttributeSourceAdvisor

        public AuthorizationAttributeSourceAdvisor()
        Create a new AuthorizationAttributeSourceAdvisor.
    • Method Detail

      • getSecurityManager

        public org.apache.shiro.mgt.SecurityManager getSecurityManager()
      • setSecurityManager

        public void setSecurityManager​(org.apache.shiro.mgt.SecurityManager securityManager)
      • matches

        public boolean matches​(Method method,
                               Class targetClass)
        Returns true if the method or the class has any Shiro annotations, false otherwise. The annotations inspected are:
        • RequiresAuthentication
        • RequiresUser
        • RequiresGuest
        • RequiresRoles
        • RequiresPermissions
        Parameters:
        method - the method to check for a Shiro annotation
        targetClass - the class potentially declaring Shiro annotations
        Returns:
        true if the method has a Shiro annotation, false otherwise.
        See Also:
        MethodMatcher.matches(java.lang.reflect.Method, Class)