Package org.fugerit.java.core.validator
Class ValidatorDate
- java.lang.Object
-
- org.fugerit.java.core.cfg.xml.BasicIdConfigType
-
- org.fugerit.java.core.validator.BasicValidator
-
- org.fugerit.java.core.validator.ValidatorDate
-
- All Implemented Interfaces:
Serializable
,IdConfigType
,KeyObject<String>
,KeyString
public class ValidatorDate extends BasicValidator
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_KEY_DATE
static String
ERROR_KEY_DATE_MAX
static String
ERROR_KEY_DATE_MIN
static String
KEY_DATEFORMAT
static String
KEY_MAXDATE
static String
KEY_MINDATE
-
Fields inherited from class org.fugerit.java.core.validator.BasicValidator
ERROR_KEY_LENGTH_MAX, ERROR_KEY_LENGTH_MIN, ERROR_KEY_REQUIRED, KEY_INFO, KEY_MAXLENGTH, KEY_MINLENGTH, KEY_REQUIRED, NO_LENGTH_CONSTRAINT
-
-
Constructor Summary
Constructors Constructor Description ValidatorDate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkConfig()
void
configure(Properties atts)
String
getDateFormat()
String
getMaxDate()
String
getMinDate()
protected Date
setDate(SimpleDateFormat sdf, String d)
boolean
validate(ValidatorContext context)
protected boolean
validate(ValidatorContext context, String minDate, String maxDate)
-
Methods inherited from class org.fugerit.java.core.validator.BasicValidator
checkOverride, configure, configure, formatMessage, isOptional
-
Methods inherited from class org.fugerit.java.core.cfg.xml.BasicIdConfigType
getId, getKey, setId, toString
-
-
-
-
Field Detail
-
KEY_DATEFORMAT
public static final String KEY_DATEFORMAT
- See Also:
- Constant Field Values
-
KEY_MINDATE
public static final String KEY_MINDATE
- See Also:
- Constant Field Values
-
KEY_MAXDATE
public static final String KEY_MAXDATE
- See Also:
- Constant Field Values
-
ERROR_KEY_DATE
public static final String ERROR_KEY_DATE
- See Also:
- Constant Field Values
-
ERROR_KEY_DATE_MIN
public static final String ERROR_KEY_DATE_MIN
- See Also:
- Constant Field Values
-
ERROR_KEY_DATE_MAX
public static final String ERROR_KEY_DATE_MAX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDateFormat
public String getDateFormat()
-
getMinDate
public String getMinDate()
-
getMaxDate
public String getMaxDate()
-
setDate
protected Date setDate(SimpleDateFormat sdf, String d) throws ParseException
- Throws:
ParseException
-
checkConfig
public void checkConfig() throws ConfigException
- Overrides:
checkConfig
in classBasicValidator
- Throws:
ConfigException
-
configure
public void configure(Properties atts) throws ConfigException
- Overrides:
configure
in classBasicValidator
- Throws:
ConfigException
-
validate
public boolean validate(ValidatorContext context) throws Exception
- Overrides:
validate
in classBasicValidator
- Throws:
Exception
-
validate
protected boolean validate(ValidatorContext context, String minDate, String maxDate) throws ConfigException
- Throws:
ConfigException
-
-