org.springmodules.validation.bean.conf.loader.xml.handler
Class DateInFutureRuleElementHandler

java.lang.Object
  extended by org.springmodules.validation.bean.conf.loader.xml.handler.AbstractPropertyValidationElementHandler
      extended by org.springmodules.validation.bean.conf.loader.xml.handler.DateInFutureRuleElementHandler
All Implemented Interfaces:
PropertyValidationElementHandler, ConditionExpressionBased, FunctionExpressionBased

public class DateInFutureRuleElementHandler
extends AbstractPropertyValidationElementHandler

An AbstractPropertyValidationElementHandler implementation that can handle an element that represents a "date in the future" validation rule - a rule that validates that a given date occured in the future.

Author:
Uri Boness

Constructor Summary
DateInFutureRuleElementHandler(java.lang.String namespaceUri)
          Constructs a new DateInFutureRuleElementHandler.
 
Method Summary
protected  AbstractValidationRule createValidationRule(org.w3c.dom.Element element)
          Creates the validation rule represented and initialized by and with the given element.
 boolean supports(org.w3c.dom.Element element, java.lang.Class clazz, java.beans.PropertyDescriptor descriptor)
          In addition to the element name and namespace check, this handler only support properties of types Date and Calendar.
 
Methods inherited from class org.springmodules.validation.bean.conf.loader.xml.handler.AbstractPropertyValidationElementHandler
extractApplicabilityCondition, extractArgumentsResolver, extractErrorCode, extractMessage, getConditionExpressionParser, getFunctionExpressionParser, handle, isConditionGloballyScoped, setConditionExpressionParser, setFunctionExpressionParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateInFutureRuleElementHandler

public DateInFutureRuleElementHandler(java.lang.String namespaceUri)
Constructs a new DateInFutureRuleElementHandler.

Method Detail

supports

public boolean supports(org.w3c.dom.Element element,
                        java.lang.Class clazz,
                        java.beans.PropertyDescriptor descriptor)
In addition to the element name and namespace check, this handler only support properties of types Date and Calendar.

Specified by:
supports in interface PropertyValidationElementHandler
Overrides:
supports in class AbstractPropertyValidationElementHandler
Parameters:
element - The element to be handled.
clazz - The validated clazz.
descriptor - The property descriptor of the validated property.
Returns:
true if this handler can handle the given element, false otherwise.
See Also:
PropertyValidationElementHandler.supports(org.w3c.dom.Element, Class, java.beans.PropertyDescriptor)

createValidationRule

protected AbstractValidationRule createValidationRule(org.w3c.dom.Element element)
Description copied from class: AbstractPropertyValidationElementHandler
Creates the validation rule represented and initialized by and with the given element.

Specified by:
createValidationRule in class AbstractPropertyValidationElementHandler
Parameters:
element - The element that represents the validation rule.
Returns:
The newly created validation rule.


Copyright © 2005. All Rights Reserved.