|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springjutsu.validation.executors.RuleExecutorContainer
public class RuleExecutorContainer
Stores all discovered named rule executors, and makes them available as validation rule types. Will discover both rule executors which are provided through the customRuleExecutors property, as well as those which are annotated with @ConfiguredRuleExecutor
| Nested Class Summary | |
|---|---|
static class |
RuleExecutorContainer.RuleExecutorBeanRegistrant
Used by @see{ValidationConfigurationParser} to register executors wired in the XML config. |
| Field Summary | |
|---|---|
protected boolean |
addDefaultRuleExecutors
Can configure this to false if user doesn't want the default executors. |
protected org.springframework.beans.factory.BeanFactory |
beanFactory
Use the bean factory to look up annotated rule executors. |
protected List<RuleExecutorContainer.RuleExecutorBeanRegistrant> |
beanRegistrants
A list of rule executors registered as beans by @see{} |
protected Map<String,RuleExecutor> |
ruleExecutors
A map of rule name to the executor. |
| Constructor Summary | |
|---|---|
RuleExecutorContainer()
|
|
| Method Summary | |
|---|---|
protected void |
addDefaultRuleExecutors()
Instantiates and adds some basic default rules. |
void |
discoverAnnotatedRuleExecutors()
Finds the annotated rule executors by searching the bean factory. |
RuleExecutor |
getRuleExecutorByName(String executorName)
Gets a rule executor by rule name. |
void |
setAddDefaultRuleExecutors(boolean addDefaultRuleExecutors)
Set to false if user does not want the default rule executors. |
void |
setCustomRuleExecutor(String executorName,
RuleExecutor ruleExecutor)
Set custom rule executor with a specific name. |
void |
setCustomRuleExecutors(Map<String,RuleExecutor> customRuleExecutors)
Set custom rule executors with specific names. |
void |
setRuleExecutorBeanRegistrants(List<RuleExecutorContainer.RuleExecutorBeanRegistrant> registrants)
Hook by which @see{ValidationConfigurationParser} registers XML defined rule executors |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,RuleExecutor> ruleExecutors
protected List<RuleExecutorContainer.RuleExecutorBeanRegistrant> beanRegistrants
protected boolean addDefaultRuleExecutors
@Autowired protected org.springframework.beans.factory.BeanFactory beanFactory
| Constructor Detail |
|---|
public RuleExecutorContainer()
| Method Detail |
|---|
@PostConstruct
public void discoverAnnotatedRuleExecutors()
throws org.springframework.beans.BeansException
org.springframework.beans.BeansException - on a bad.public void setCustomRuleExecutors(Map<String,RuleExecutor> customRuleExecutors)
customRuleExecutors - the rules to set.
public void setCustomRuleExecutor(String executorName,
RuleExecutor ruleExecutor)
executorName - Name of the rule to setruleExecutor - The rule executor to set.public RuleExecutor getRuleExecutorByName(String executorName)
executorName - Name of the rule executor.
protected void addDefaultRuleExecutors()
public void setAddDefaultRuleExecutors(boolean addDefaultRuleExecutors)
addDefaultRuleExecutors - public void setRuleExecutorBeanRegistrants(List<RuleExecutorContainer.RuleExecutorBeanRegistrant> registrants)
registrants - @see{ValidationConfigurationParser} RuleExecutorBeanRegistrants to register.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||