Class AspectRule

  • All Implemented Interfaces:
    BeanReferenceable

    public class AspectRule
    extends java.lang.Object
    implements BeanReferenceable
    An aspect is a class that implements enterprise application concerns that cut across multiple classes, such as transaction management. Aspects can be a bean configured through Aspectran configuration.
     <aspect id="sampleAspect" order="0" isolated="true">
       <joinpoint target="translet">
         methods: [
           "GET"
           "POST"
           "PATCH"
           "PUT"
           "DELETE"
         ]
         headers: [
           "Origin"
         ]
         pointcut: {
           type: "wildcard"
           +: "/a/[email protected]^method1"
           +: "/x/[email protected]^method1"
           -: "/a/b/[email protected]^method1"
           -: "/x/y/[email protected]^method1"
         }
         pointcut: {
           type: "regexp"
           include: {
             translet: "/a/b"
             bean: "sample.bean1"
             method: "method1"
           }
           exclude: {
             translet: "/a/b/c"
             bean: "sample.bean3"
             method: "method1"
           }
         }
       </joinpoint>
       <settings>
       </settings>
       <advice>
       </advice>
       <exception>
       </exception>
     <aspect>
     
    • Constructor Detail

      • AspectRule

        public AspectRule()
    • Method Detail

      • getId

        public java.lang.String getId()
      • setId

        public void setId​(java.lang.String id)
      • getOrder

        public int getOrder()
      • setOrder

        public void setOrder​(int order)
      • getIsolated

        public java.lang.Boolean getIsolated()
      • isIsolated

        public boolean isIsolated()
      • setIsolated

        public void setIsolated​(java.lang.Boolean isolated)
      • getDisabled

        public java.lang.Boolean getDisabled()
      • isDisabled

        public boolean isDisabled()
      • setDisabled

        public void setDisabled​(java.lang.Boolean disabled)
      • setJoinpointRule

        public void setJoinpointRule​(JoinpointRule joinpointRule)
      • getHeaders

        public java.lang.String[] getHeaders()
      • getPointcut

        public Pointcut getPointcut()
      • setPointcut

        public void setPointcut​(Pointcut pointcut)
      • getAdviceBeanId

        public java.lang.String getAdviceBeanId()
      • setAdviceBeanId

        public void setAdviceBeanId​(java.lang.String adviceBeanId)
      • getAdviceBeanClass

        public java.lang.Class<?> getAdviceBeanClass()
      • setAdviceBeanClass

        public void setAdviceBeanClass​(java.lang.Class<?> adviceBeanClass)
      • setSettingsAdviceRule

        public void setSettingsAdviceRule​(SettingsAdviceRule settingsAdviceRule)
      • getAspectAdviceRuleList

        public java.util.List<AspectAdviceRule> getAspectAdviceRuleList()
      • setAspectAdviceRuleList

        public void setAspectAdviceRuleList​(java.util.List<AspectAdviceRule> aspectAdviceRuleList)
      • setExceptionRule

        public void setExceptionRule​(ExceptionRule exceptionRule)
      • putExceptionThrownRule

        public void putExceptionThrownRule​(ExceptionThrownRule exceptionThrownRule)
      • isBeanRelevant

        public boolean isBeanRelevant()
      • setBeanRelevant

        public void setBeanRelevant​(boolean beanRelevant)
      • getDescription

        public java.lang.String getDescription()
        Gets the description.
        Returns:
        the description
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description.
        Parameters:
        description - the new description
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object