|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springmodules.validation.util.context.BasicContextAware
org.springmodules.validation.bean.conf.loader.xml.SimpleValidationRuleElementHandlerRegistry
public class SimpleValidationRuleElementHandlerRegistry
A simple implementation of ValidationRuleElementHandlerRegistry that enables registration of element
handlers.
| Field Summary |
|---|
| Fields inherited from class org.springmodules.validation.util.context.BasicContextAware |
|---|
applicationContext, applicationEventPublisher, beanFactory, messageSource, resourceLoader |
| Constructor Summary | |
|---|---|
SimpleValidationRuleElementHandlerRegistry()
Constructs a new DefaultValidationRuleElementHandlerRegistry with the default handlers. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
ClassValidationElementHandler |
findClassHandler(Element element,
Class clazz)
Returns the class validation element handler that can handle the given element. |
protected void |
findConditionExpressionParserInApplicationContext()
|
protected void |
findFunctionExpressionParserInApplicationContext()
|
protected Object |
findObjectInApplicationContext(Class clazz)
|
PropertyValidationElementHandler |
findPropertyHandler(Element element,
Class clazz,
PropertyDescriptor descriptor)
Returns the property validation element handler that can handle the given element. |
ClassValidationElementHandler[] |
getClassHandlers()
Return all class handlers that are registered with this registry. |
PropertyValidationElementHandler[] |
getPropertyHandlers()
Return all property handlers that are registered with this registry. |
void |
registerClassHandler(ClassValidationElementHandler handler)
Registers the given class handler with this registry. |
void |
registerPropertyHandler(PropertyValidationElementHandler handler)
Registers the given property handler with this registry. |
void |
setClassHandlers(ClassValidationElementHandler[] handlers)
Resets the class handlers in this registry with the given ones. |
void |
setConditionExpressionParser(ConditionExpressionParser conditionExpressionParser)
Sets the condition expression parser to be used when parsing the condition expression. |
protected void |
setExpressionParsers(Object object)
|
void |
setExtraClassHandlers(ClassValidationElementHandler[] handlers)
Registeres the given class handlers with this registry. |
void |
setExtraPropertyHandlers(PropertyValidationElementHandler[] handlers)
Registeres the given property handlers with this registry. |
void |
setFunctionExpressionParser(FunctionExpressionParser functionExpressionParser)
Sets the function expression parser to be used when parsing the function expressions. |
void |
setPropertyHandlers(PropertyValidationElementHandler[] handlers)
Resets the property handlers in this registry to the given ones (overriding the existing ones). |
| Methods inherited from class org.springmodules.validation.util.context.BasicContextAware |
|---|
initLifecycle, initLifecycle, setApplicationContext, setApplicationEventPublisher, setBeanFactory, setMessageSource, setResourceLoader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleValidationRuleElementHandlerRegistry()
| Method Detail |
|---|
public void registerClassHandler(ClassValidationElementHandler handler)
public ClassValidationElementHandler findClassHandler(Element element,
Class clazz)
ValidationRuleElementHandlerRegistry
findClassHandler in interface ValidationRuleElementHandlerRegistryelement - The element to be handled.clazz - The validated class.
ValidationRuleElementHandlerRegistry.findClassHandler(org.w3c.dom.Element, Class)public void registerPropertyHandler(PropertyValidationElementHandler handler)
public PropertyValidationElementHandler findPropertyHandler(Element element,
Class clazz,
PropertyDescriptor descriptor)
ValidationRuleElementHandlerRegistry
findPropertyHandler in interface ValidationRuleElementHandlerRegistryelement - The element be handled.clazz - The validated class.descriptor - The property descriptor of the validated property.
ValidationRuleElementHandlerRegistry.findPropertyHandler(org.w3c.dom.Element, Class, java.beans.PropertyDescriptor)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic void setExtraClassHandlers(ClassValidationElementHandler[] handlers)
handlers - The handlers to register with this registry.public void setClassHandlers(ClassValidationElementHandler[] handlers)
handlers - The class handlers to be registered with this registry.public void setExtraPropertyHandlers(PropertyValidationElementHandler[] handlers)
handlers - The handlers to register with this registry.public void setPropertyHandlers(PropertyValidationElementHandler[] handlers)
handlers - The property handlers to register with this registry.public ClassValidationElementHandler[] getClassHandlers()
public PropertyValidationElementHandler[] getPropertyHandlers()
public void setFunctionExpressionParser(FunctionExpressionParser functionExpressionParser)
FunctionExpressionBased
setFunctionExpressionParser in interface FunctionExpressionBasedfunctionExpressionParser - The function expression parser to be used.FunctionExpressionBased.setFunctionExpressionParser(org.springmodules.validation.util.fel.FunctionExpressionParser)public void setConditionExpressionParser(ConditionExpressionParser conditionExpressionParser)
ConditionExpressionBased
setConditionExpressionParser in interface ConditionExpressionBasedconditionExpressionParser - The condition expression parser to be used.ConditionExpressionBased.setConditionExpressionParser(org.springmodules.validation.util.cel.ConditionExpressionParser)protected void setExpressionParsers(Object object)
protected void findConditionExpressionParserInApplicationContext()
protected void findFunctionExpressionParserInApplicationContext()
protected Object findObjectInApplicationContext(Class clazz)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||