org.loom.validator.date
Class DateValidator

java.lang.Object
  extended by org.loom.validator.AbstractPropertyValidator
      extended by org.loom.validator.date.DateValidator
All Implemented Interfaces:
FormInputDecorator, PropertyValidator

public class DateValidator
extends AbstractPropertyValidator

Class that contains data and behaviour to validate one field. This class and its descendants are thread-safe.


Constructor Summary
DateValidator()
           
 
Method Summary
 void decorate(FormInputTag t)
          Add attributes to the tag based on this Validator instance metadata
 DateValue getMaxValue()
           
 DateValue getMinValue()
           
 boolean isExcludeMax()
           
 boolean isExcludeMin()
           
 void setExcludeMax(boolean excludeMax)
           
 void setExcludeMin(boolean excludeMin)
           
 void setMaxValue(DateValue maxValue)
           
 void setMinValue(DateValue minValue)
           
protected  org.joda.time.DateTime toDateTime(java.lang.Object v)
          Convert any kind of Date object to joda
 java.lang.String toString()
           
 void validate(ValidationRequest request, java.lang.Object v)
          Validates one input value and adds to errors any validation error found
 
Methods inherited from class org.loom.validator.AbstractPropertyValidator
getMessagePrefix, getOverridenMessageKey, getPropertyPath, isBindMessages, isValidateCollectionContainer, pushPropertyPath, setBindMessages, setMessagePrefix, setOverridenMessageKey, setPropertyPath, setValidateCollectionContainer, validateCollectionContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateValidator

public DateValidator()
Method Detail

validate

public void validate(ValidationRequest request,
                     java.lang.Object v)
Validates one input value and adds to errors any validation error found

Parameters:
v - the value to validate

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setMaxValue

public void setMaxValue(DateValue maxValue)

setMinValue

public void setMinValue(DateValue minValue)

toDateTime

protected org.joda.time.DateTime toDateTime(java.lang.Object v)
Convert any kind of Date object to joda


decorate

public void decorate(FormInputTag t)
Description copied from class: AbstractPropertyValidator
Add attributes to the tag based on this Validator instance metadata

Specified by:
decorate in interface FormInputDecorator
Overrides:
decorate in class AbstractPropertyValidator
Parameters:
t - the tag to be modified

isExcludeMax

public boolean isExcludeMax()

setExcludeMax

public void setExcludeMax(boolean excludeMax)

isExcludeMin

public boolean isExcludeMin()

setExcludeMin

public void setExcludeMin(boolean excludeMin)

getMaxValue

public DateValue getMaxValue()

getMinValue

public DateValue getMinValue()