Class ContextRuleAssistant
- java.lang.Object
-
- com.aspectran.core.context.rule.assistant.ContextRuleAssistant
-
- Direct Known Subclasses:
ShallowContextRuleAssistant
public class ContextRuleAssistant extends java.lang.ObjectThe Class ContextRuleAssistant.Created: 2008. 04. 01 PM 10:25:35
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedContextRuleAssistant()ContextRuleAssistant(ApplicationAdapter applicationAdapter, ContextEnvironment contextEnvironment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAspectRule(AspectRule aspectRule)Adds the aspect rule.voidaddBeanRule(BeanRule beanRule)Adds the bean rule.voidaddEnvironmentRule(EnvironmentRule environmentRule)Adds the environment rule.voidaddInnerBeanRule(BeanRule beanRule)voidaddScheduleRule(ScheduleRule scheduleRule)Adds the schedule rule.voidaddTemplateRule(TemplateRule templateRule)Add the template rule.voidaddTransletRule(TransletRule transletRule)Add the translet rule.voidaddTypeAlias(java.lang.String alias, java.lang.String type)Adds a type alias to use for simplifying complex type signatures.voidapplySettings()Apply settings.java.lang.StringapplyTransletNamePattern(java.lang.String transletName)Returns the translet name of the prefix and suffix are combined.AssistantLocalbackupAssistantLocal()Backup the assistant local.voidclearCurrentRuleAppender()Removes the last rule appender after rule parsing is complete.java.lang.StringgetAliasedType(java.lang.String alias)Returns a type of an aliased type that is defined by assigning the type to the alias.ApplicationAdaptergetApplicationAdapter()AspectRuleRegistrygetAspectRuleRegistry()Gets the aspect rule registry.java.util.Collection<AspectRule>getAspectRules()Returns all Aspect rules.AssistantLocalgetAssistantLocal()Gets the assistant local.java.lang.StringgetBasePath()BeanReferenceInspectorgetBeanReferenceInspector()Returns the bean reference inspector.BeanRuleRegistrygetBeanRuleRegistry()Returns the bean rule registry.java.util.Collection<BeanRule>getBeanRules()Returns all bean rules.java.lang.ClassLoadergetClassLoader()ContextEnvironmentgetContextEnvironment()java.util.List<EnvironmentRule>getEnvironmentRules()Gets the environment rules.RuleAppendHandlergetRuleAppendHandler()Returns the rule append handler.ScheduleRuleRegistrygetScheduleRuleRegistry()Returns the schedule rule registry.java.util.Collection<ScheduleRule>getScheduleRules()Returns all schedule rules.java.lang.ObjectgetSetting(DefaultSettingType settingType)Gets the setting value.java.util.Map<DefaultSettingType,java.lang.String>getSettings()Gets the settings.TemplateRuleRegistrygetTemplateRuleRegistry()Returns the template rule registry.java.util.Collection<TemplateRule>getTemplateRules()Returns all template rules.TransletRuleRegistrygetTransletRuleRegistry()Returns the translet rule registry.java.util.Collection<TransletRule>getTransletRules()Returns all translet rules.java.util.Map<java.lang.String,java.lang.String>getTypeAliases()Gets the type aliases.booleanisPointcutPatternVerifiable()Returns whether the pointcut pattern validation is required.ItemRuleMapprofiling(ItemRuleMap newIrm, ItemRuleMap oldIrm)voidputSetting(java.lang.String name, java.lang.String value)Puts the setting value.voidready()voidrelease()voidreserveBeanReference(java.lang.Class<?> beanClass, BeanReferenceable referenceable)voidreserveBeanReference(java.lang.String beanId, BeanReferenceable referenceable)voidreserveBeanReference(java.lang.String beanId, java.lang.Class<?> beanClass, BeanReferenceable referenceable)voidresolveActionBeanClass(InvokeActionRule invokeActionRule)Resolve bean class for bean method action rule.voidresolveAdviceBeanClass(AspectRule aspectRule)Resolve bean class for the aspect rule.java.lang.StringresolveAliasType(java.lang.String alias)Returns a type of an aliased type that is defined by assigning the type to the alias.voidresolveBeanClass(Token token)Resolve bean class for token.voidresolveBeanClass(Token[] tokens)Resolve bean class for token.voidresolveBeanClass(AutowireRule autowireRule)Resolve bean class for the autowire rule.voidresolveBeanClass(BeanRule beanRule)voidresolveBeanClass(ItemRule itemRule)Resolve bean class.voidresolveBeanClass(ScheduleRule scheduleRule)Resolve bean class for the schedule rule.voidresolveBeanClass(TemplateRule templateRule)Resolve bean class for the template rule.voidresolveFactoryBeanClass(BeanRule beanRule)Resolve bean class for factory bean rule.voidrestoreAssistantLocal(AssistantLocal oldAssistantLocal)Restore the assistant local.voidsetRuleAppendHandler(RuleAppendHandler ruleAppendHandler)Sets the rule append handler.
-
-
-
Constructor Detail
-
ContextRuleAssistant
protected ContextRuleAssistant()
-
ContextRuleAssistant
public ContextRuleAssistant(ApplicationAdapter applicationAdapter, ContextEnvironment contextEnvironment)
-
-
Method Detail
-
ready
public void ready()
-
release
public void release()
-
getApplicationAdapter
public ApplicationAdapter getApplicationAdapter()
-
getBasePath
public java.lang.String getBasePath()
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
-
getContextEnvironment
public ContextEnvironment getContextEnvironment()
-
getSettings
public java.util.Map<DefaultSettingType,java.lang.String> getSettings()
Gets the settings.- Returns:
- the settings
-
getSetting
public java.lang.Object getSetting(DefaultSettingType settingType)
Gets the setting value.- Parameters:
settingType- the setting type- Returns:
- the setting
-
putSetting
public void putSetting(java.lang.String name, java.lang.String value) throws IllegalRuleExceptionPuts the setting value.- Parameters:
name- the namevalue- the value- Throws:
IllegalRuleException- if an unknown setting name is found
-
applySettings
public void applySettings()
Apply settings.
-
getEnvironmentRules
public java.util.List<EnvironmentRule> getEnvironmentRules()
Gets the environment rules.- Returns:
- the environment rules
-
addEnvironmentRule
public void addEnvironmentRule(EnvironmentRule environmentRule)
Adds the environment rule.- Parameters:
environmentRule- the environment rule
-
getTypeAliases
public java.util.Map<java.lang.String,java.lang.String> getTypeAliases()
Gets the type aliases.- Returns:
- the type aliases
-
addTypeAlias
public void addTypeAlias(java.lang.String alias, java.lang.String type)Adds a type alias to use for simplifying complex type signatures. A type alias is defined by assigning the type to the alias.- Parameters:
alias- the name of the aliastype- the type identifier that you are creating an alias for
-
getAliasedType
public java.lang.String getAliasedType(java.lang.String alias)
Returns a type of an aliased type that is defined by assigning the type to the alias.- Parameters:
alias- the name of the alias- Returns:
- the aliased type
-
resolveAliasType
public java.lang.String resolveAliasType(java.lang.String alias)
Returns a type of an aliased type that is defined by assigning the type to the alias. If aliased type is not found, it returns alias.- Parameters:
alias- the name of the alias- Returns:
- the aliased type
-
applyTransletNamePattern
public java.lang.String applyTransletNamePattern(java.lang.String transletName)
Returns the translet name of the prefix and suffix are combined.- Parameters:
transletName- the translet name- Returns:
- the string
-
getAssistantLocal
public AssistantLocal getAssistantLocal()
Gets the assistant local.- Returns:
- the assistant local
-
backupAssistantLocal
public AssistantLocal backupAssistantLocal()
Backup the assistant local.- Returns:
- the assistant local
-
restoreAssistantLocal
public void restoreAssistantLocal(AssistantLocal oldAssistantLocal)
Restore the assistant local.- Parameters:
oldAssistantLocal- the old assistant local
-
isPointcutPatternVerifiable
public boolean isPointcutPatternVerifiable()
Returns whether the pointcut pattern validation is required.- Returns:
- true if pointcut pattern validation is required
-
resolveBeanClass
public void resolveBeanClass(BeanRule beanRule) throws IllegalRuleException
- Throws:
IllegalRuleException
-
resolveFactoryBeanClass
public void resolveFactoryBeanClass(BeanRule beanRule) throws IllegalRuleException
Resolve bean class for factory bean rule.- Parameters:
beanRule- the bean rule- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveAdviceBeanClass
public void resolveAdviceBeanClass(AspectRule aspectRule) throws IllegalRuleException
Resolve bean class for the aspect rule.- Parameters:
aspectRule- the aspect rule- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveActionBeanClass
public void resolveActionBeanClass(InvokeActionRule invokeActionRule) throws IllegalRuleException
Resolve bean class for bean method action rule.- Parameters:
invokeActionRule- the invoke action rule- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveBeanClass
public void resolveBeanClass(ItemRule itemRule) throws IllegalRuleException
Resolve bean class.- Parameters:
itemRule- the item rule- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveBeanClass
public void resolveBeanClass(Token[] tokens) throws IllegalRuleException
Resolve bean class for token.- Parameters:
tokens- an array of tokens- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveBeanClass
public void resolveBeanClass(Token token) throws IllegalRuleException
Resolve bean class for token.- Parameters:
token- the token- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveBeanClass
public void resolveBeanClass(AutowireRule autowireRule) throws IllegalRuleException
Resolve bean class for the autowire rule.- Parameters:
autowireRule- the autowire rule- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveBeanClass
public void resolveBeanClass(ScheduleRule scheduleRule) throws IllegalRuleException
Resolve bean class for the schedule rule.- Parameters:
scheduleRule- the schedule rule- Throws:
IllegalRuleException- if an illegal rule is found
-
resolveBeanClass
public void resolveBeanClass(TemplateRule templateRule) throws IllegalRuleException
Resolve bean class for the template rule.- Parameters:
templateRule- the template rule- Throws:
IllegalRuleException- if an illegal rule is found
-
reserveBeanReference
public void reserveBeanReference(java.lang.String beanId, BeanReferenceable referenceable)
-
reserveBeanReference
public void reserveBeanReference(java.lang.Class<?> beanClass, BeanReferenceable referenceable)
-
reserveBeanReference
public void reserveBeanReference(java.lang.String beanId, java.lang.Class<?> beanClass, BeanReferenceable referenceable)
-
getBeanReferenceInspector
public BeanReferenceInspector getBeanReferenceInspector()
Returns the bean reference inspector.- Returns:
- the bean reference inspector
-
addAspectRule
public void addAspectRule(AspectRule aspectRule) throws IllegalRuleException
Adds the aspect rule.- Parameters:
aspectRule- the aspect rule to add- Throws:
IllegalRuleException- if an illegal rule is found
-
addBeanRule
public void addBeanRule(BeanRule beanRule) throws IllegalRuleException
Adds the bean rule.- Parameters:
beanRule- the bean rule to add- Throws:
IllegalRuleException- if an error occurs while adding a bean rule
-
addInnerBeanRule
public void addInnerBeanRule(BeanRule beanRule) throws IllegalRuleException
- Throws:
IllegalRuleException
-
addScheduleRule
public void addScheduleRule(ScheduleRule scheduleRule) throws IllegalRuleException
Adds the schedule rule.- Parameters:
scheduleRule- the schedule rule to add- Throws:
IllegalRuleException- if an illegal rule is found
-
addTransletRule
public void addTransletRule(TransletRule transletRule) throws IllegalRuleException
Add the translet rule.- Parameters:
transletRule- the translet rule to add- Throws:
IllegalRuleException- if an illegal rule is found
-
addTemplateRule
public void addTemplateRule(TemplateRule templateRule) throws IllegalRuleException
Add the template rule.- Parameters:
templateRule- the template rule to add- Throws:
IllegalRuleException- if an illegal rule is found
-
getAspectRuleRegistry
public AspectRuleRegistry getAspectRuleRegistry()
Gets the aspect rule registry.- Returns:
- the aspect rule registry
-
getBeanRuleRegistry
public BeanRuleRegistry getBeanRuleRegistry()
Returns the bean rule registry.- Returns:
- the bean rule registry
-
getScheduleRuleRegistry
public ScheduleRuleRegistry getScheduleRuleRegistry()
Returns the schedule rule registry.- Returns:
- the template rule registry
-
getTransletRuleRegistry
public TransletRuleRegistry getTransletRuleRegistry()
Returns the translet rule registry.- Returns:
- the translet rule registry
-
getTemplateRuleRegistry
public TemplateRuleRegistry getTemplateRuleRegistry()
Returns the template rule registry.- Returns:
- the template rule registry
-
getAspectRules
public java.util.Collection<AspectRule> getAspectRules()
Returns all Aspect rules.- Returns:
- the aspect rules
-
getBeanRules
public java.util.Collection<BeanRule> getBeanRules()
Returns all bean rules.- Returns:
- the bean rules
-
getScheduleRules
public java.util.Collection<ScheduleRule> getScheduleRules()
Returns all schedule rules.- Returns:
- the schedule rules
-
getTransletRules
public java.util.Collection<TransletRule> getTransletRules()
Returns all translet rules.- Returns:
- the translet rules
-
getTemplateRules
public java.util.Collection<TemplateRule> getTemplateRules()
Returns all template rules.- Returns:
- the template rules
-
getRuleAppendHandler
public RuleAppendHandler getRuleAppendHandler()
Returns the rule append handler.- Returns:
- the rule append handler
-
setRuleAppendHandler
public void setRuleAppendHandler(RuleAppendHandler ruleAppendHandler)
Sets the rule append handler.- Parameters:
ruleAppendHandler- the new rule append handler
-
clearCurrentRuleAppender
public void clearCurrentRuleAppender()
Removes the last rule appender after rule parsing is complete.
-
profiling
public ItemRuleMap profiling(ItemRuleMap newIrm, ItemRuleMap oldIrm)
-
-