org.springmodules.validation.bean.conf.loader.xml.handler.jodatime
Class InstantInFutureRuleElementHandler

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

public class InstantInFutureRuleElementHandler
extends AbstractPropertyValidationElementHandler

An AbstractPropertyValidationElementHandler implementation that can handle an element that represents an "in the future" joda-time instant validation rule.

Author:
Uri Boness

Constructor Summary
InstantInFutureRuleElementHandler(java.lang.String namespaceUri)
          Constructs a new InstantInFutureRuleElementHandler.
 
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 type org.joda.time.Instant.
 
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

InstantInFutureRuleElementHandler

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

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 type org.joda.time.Instant.

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.