Class ActivityRuleAssistant
- java.lang.Object
-
- com.aspectran.core.context.rule.assistant.ActivityRuleAssistant
-
- Direct Known Subclasses:
ShallowContextRuleAssistant
public class ActivityRuleAssistant extends java.lang.Object
The Class ActivityRuleAssistant.Created: 2008. 04. 01 PM 10:25:35
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ActivityRuleAssistant()
ActivityRuleAssistant(ApplicationAdapter applicationAdapter, EnvironmentProfiles environmentProfiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAspectRule(AspectRule aspectRule)
Adds the aspect rule.void
addBeanRule(BeanRule beanRule)
Adds the bean rule.void
addEnvironmentRule(EnvironmentRule environmentRule)
Adds the environment rule.void
addInnerBeanRule(BeanRule beanRule)
void
addScheduleRule(ScheduleRule scheduleRule)
Adds the schedule rule.void
addTemplateRule(TemplateRule templateRule)
Add the template rule.void
addTransletRule(TransletRule transletRule)
Add the translet rule.void
addTypeAlias(java.lang.String alias, java.lang.String type)
Adds a type alias to use for simplifying complex type signatures.void
applySettings()
Apply settings.java.lang.String
applyTransletNamePattern(java.lang.String transletName)
Returns the translet name of the prefix and suffix are combined.AssistantLocal
backupAssistantLocal()
Backup the assistant local.void
clearCurrentRuleAppender()
Removes the last rule appender after rule parsing is complete.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.ApplicationAdapter
getApplicationAdapter()
AspectRuleRegistry
getAspectRuleRegistry()
Gets the aspect rule registry.java.util.Collection<AspectRule>
getAspectRules()
Returns all Aspect rules.AssistantLocal
getAssistantLocal()
Gets the assistant local.java.lang.String
getBasePath()
BeanReferenceInspector
getBeanReferenceInspector()
Returns the bean reference inspector.BeanRuleRegistry
getBeanRuleRegistry()
Returns the bean rule registry.java.util.Collection<BeanRule>
getBeanRules()
Returns all bean rules.java.lang.ClassLoader
getClassLoader()
EnvironmentProfiles
getEnvironmentProfiles()
java.util.List<EnvironmentRule>
getEnvironmentRules()
Gets the environment rules.RuleAppendHandler
getRuleAppendHandler()
Returns the rule append handler.ScheduleRuleRegistry
getScheduleRuleRegistry()
Returns the schedule rule registry.java.util.Collection<ScheduleRule>
getScheduleRules()
Returns all schedule rules.java.lang.Object
getSetting(DefaultSettingType settingType)
Gets the setting value.java.util.Map<DefaultSettingType,java.lang.String>
getSettings()
Gets the settings.TemplateRuleRegistry
getTemplateRuleRegistry()
Returns the template rule registry.java.util.Collection<TemplateRule>
getTemplateRules()
Returns all template rules.TransletRuleRegistry
getTransletRuleRegistry()
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.boolean
isPointcutPatternVerifiable()
Returns whether the pointcut pattern validation is required.DescriptionRule
profiling(DescriptionRule newDescriptionRule, DescriptionRule oldDescriptionRule)
ItemRuleMap
profiling(ItemRuleMap newIrm, ItemRuleMap oldIrm)
void
putSetting(java.lang.String name, java.lang.String value)
Puts the setting value.void
ready()
void
release()
void
reserveBeanReference(java.lang.Class<?> beanClass, BeanReferenceable referenceable)
void
reserveBeanReference(java.lang.String beanId, BeanReferenceable referenceable)
void
reserveBeanReference(java.lang.String beanId, java.lang.Class<?> beanClass, BeanReferenceable referenceable)
void
resolveActionBeanClass(InvokeActionRule invokeActionRule)
Resolve bean class for bean method action rule.void
resolveAdviceBeanClass(AspectRule aspectRule)
Resolve bean class for the aspect rule.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.void
resolveBeanClass(Token token)
Resolve bean class for token.void
resolveBeanClass(Token[] tokens)
Resolve bean class for token.void
resolveBeanClass(AutowireRule autowireRule)
Resolve bean class for the autowire rule.void
resolveBeanClass(BeanRule beanRule)
void
resolveBeanClass(ItemRule itemRule)
Resolve bean class.void
resolveBeanClass(ScheduleRule scheduleRule)
Resolve bean class for the schedule rule.void
resolveBeanClass(TemplateRule templateRule)
Resolve bean class for the template rule.void
resolveFactoryBeanClass(BeanRule beanRule)
Resolve bean class for factory bean rule.void
restoreAssistantLocal(AssistantLocal oldAssistantLocal)
Restore the assistant local.void
setRuleAppendHandler(RuleAppendHandler ruleAppendHandler)
Sets the rule append handler.
-
-
-
Constructor Detail
-
ActivityRuleAssistant
protected ActivityRuleAssistant()
-
ActivityRuleAssistant
public ActivityRuleAssistant(ApplicationAdapter applicationAdapter, EnvironmentProfiles environmentProfiles)
-
-
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()
-
getEnvironmentProfiles
public EnvironmentProfiles getEnvironmentProfiles()
-
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 IllegalRuleException
Puts 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 DescriptionRule profiling(DescriptionRule newDescriptionRule, DescriptionRule oldDescriptionRule)
-
profiling
public ItemRuleMap profiling(ItemRuleMap newIrm, ItemRuleMap oldIrm)
-
-