org.kuali.rice.krad.datadictionary.validation.constraint
Class DatePatternConstraint
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.DatePatternConstraint
- All Implemented Interfaces:
- Serializable, Constraint
public class DatePatternConstraint
- extends ValidDataPatternConstraint
DatePatternConstraint constrains a field to only allow dates which are part of the formats
defined in the system. Constraining a field all these formats is often not appropriate for
fields, and you may want to constrain the input to a subset of the allowed formats in the system.
This can be done by setting the allowed formats to this subset (see BasicDatePatternConstraint
bean for example)
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
- Serialized Form
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint |
getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageKey, getMessageNamespaceCode, getStates, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setMessageComponentCode, setMessageKey, setMessageNamespaceCode, setStates, setValidationMessageParams |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatePatternConstraint
public DatePatternConstraint()
getRegexString
protected String getRegexString()
- Returns a regex representing all the allowed formats in the system. If allowedFormats is
supplied, returns a regex representing only those formats.
- Specified by:
getRegexString
in class ValidDataPatternConstraint
- See Also:
ValidDataPatternConstraint.getRegexString()
getAllowedFormats
public List<String> getAllowedFormats()
- Returns:
- the allowedFormats
setAllowedFormats
public void setAllowedFormats(List<String> allowedFormats)
- Sets the alloweFormats for this constraint, this must be a subset of the system configured
formats for a date - this list should be used for most fields where you are expecting a user
to enter a date in a specific format
- Parameters:
allowedFormats
- the allowedFormats to set
getValidationMessageParams
public List<String> getValidationMessageParams()
- This overridden method ...
- Overrides:
getValidationMessageParams
in class BaseConstraint
- Returns:
- the validationMessageParams
- See Also:
BaseConstraint.getValidationMessageParams()
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.