Package com.aspectran.core.context.rule
Class AspectRule
java.lang.Object
com.aspectran.core.context.rule.AspectRule
- All Implemented Interfaces:
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> 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Returns the Bean Referrer Type.String[]
getId()
int
getOrder()
boolean
boolean
boolean
newAspectAdviceRule
(AspectAdviceType aspectAdviceType) static AspectRule
newInstance
(String id, String order, Boolean isolated, Boolean disabled) void
putExceptionThrownRule
(ExceptionThrownRule exceptionThrownRule) void
setAdviceBeanClass
(Class<?> adviceBeanClass) void
setAdviceBeanId
(String adviceBeanId) void
setAspectAdviceRuleList
(List<AspectAdviceRule> aspectAdviceRuleList) void
setBeanRelevant
(boolean beanRelevant) void
setDescriptionRule
(DescriptionRule descriptionRule) void
setDisabled
(Boolean disabled) void
setExceptionRule
(ExceptionRule exceptionRule) void
void
setIsolated
(Boolean isolated) void
setJoinpointRule
(JoinpointRule joinpointRule) void
setOrder
(int order) void
setPointcut
(Pointcut pointcut) void
setSettingsAdviceRule
(SettingsAdviceRule settingsAdviceRule) toString()
static void
updateJoinpoint
(AspectRule aspectRule, JoinpointParameters joinpointParameters) static void
updateJoinpoint
(AspectRule aspectRule, String target, String apon)
-
Constructor Details
-
AspectRule
public AspectRule()
-
-
Method Details
-
getId
-
setId
-
getOrder
public int getOrder() -
setOrder
public void setOrder(int order) -
getIsolated
-
isIsolated
public boolean isIsolated() -
setIsolated
-
getDisabled
-
isDisabled
public boolean isDisabled() -
setDisabled
-
getJoinpointRule
-
setJoinpointRule
-
getJoinpointTargetType
-
getMethods
-
getHeaders
-
getPointcutRule
-
getPointcut
-
setPointcut
-
getAdviceBeanId
-
setAdviceBeanId
-
getAdviceBeanClass
-
setAdviceBeanClass
-
getSettingsAdviceRule
-
setSettingsAdviceRule
-
touchSettingsAdviceRule
-
getAspectAdviceRuleList
-
setAspectAdviceRuleList
-
newAspectAdviceRule
-
getExceptionRule
-
setExceptionRule
-
putExceptionThrownRule
-
isBeanRelevant
public boolean isBeanRelevant() -
setBeanRelevant
public void setBeanRelevant(boolean beanRelevant) -
getDescriptionRule
-
setDescriptionRule
-
getBeanRefererType
Description copied from interface:BeanReferenceable
Returns the Bean Referrer Type.- Specified by:
getBeanRefererType
in interfaceBeanReferenceable
- Returns:
- the Bean Referrer Type
-
toString
-
newInstance
@NonNull public static AspectRule newInstance(String id, String order, Boolean isolated, Boolean disabled) throws IllegalRuleException - Throws:
IllegalRuleException
-
updateJoinpoint
public static void updateJoinpoint(@NonNull AspectRule aspectRule, String target, String apon) throws IllegalRuleException - Throws:
IllegalRuleException
-
updateJoinpoint
public static void updateJoinpoint(@NonNull AspectRule aspectRule, @NonNull JoinpointParameters joinpointParameters) throws IllegalRuleException - Throws:
IllegalRuleException
-