|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.commons.validator.ValidatorBase
org.apache.myfaces.commons.validator.AbstractDateRestrictionValidator
public abstract class AbstractDateRestrictionValidator
Validate that the date entered is within a given restriction.
Field Summary | |
---|---|
static java.lang.String |
DAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid days value check fails. |
static java.lang.String |
MONTH_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid month value check fails. |
static java.lang.String |
VALIDATOR_ID
|
static java.lang.String |
WEEKDAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid weekdays value check fails. |
Fields inherited from interface javax.faces.validator.Validator |
---|
NOT_IN_RANGE_MESSAGE_ID |
Constructor Summary | |
---|---|
AbstractDateRestrictionValidator()
Construct a Validator with no preconfigured limits. |
Method Summary | |
---|---|
protected java.util.Calendar |
getCalendar()
|
protected static java.util.Date |
getDateValue(java.lang.Object value)
Parses the already converted value to a java.util.Date . |
abstract DateListProvider |
getInvalidDays()
To specifiy a concrete List of Dates, use the invalidDays attribute and wire it to a DateListProvider implementation. |
abstract java.lang.String[] |
getInvalidDaysOfWeek()
Specify the weekdays which are invalid for your use case. |
abstract java.lang.String[] |
getInvalidMonths()
Specify the month which are invalid for your use case. |
abstract void |
setInvalidDays(DateListProvider invalidDays)
|
abstract void |
setInvalidDaysOfWeek(java.lang.String[] invalidDaysOfWeek)
|
abstract void |
setInvalidMonths(java.lang.String[] invalidMonths)
|
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
|
Methods inherited from class org.apache.myfaces.commons.validator.ValidatorBase |
---|
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueExpression, isTransient, restoreAttachedState, restoreState, saveAttachedState, saveState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueExpression |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VALIDATOR_ID
public static final java.lang.String DAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid days value check fails. The message format
string for this message may optionally include {0}
,
{1}
and {3}
placeholders,
which will be replaced by user input, component label and configured
days value.
public static final java.lang.String MONTH_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid month value check fails. The message format
string for this message may optionally include {0}
,
{1}
and {3}
placeholders,
which will be replaced by user input, component label and configured
month value.
public static final java.lang.String WEEKDAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid weekdays value check fails. The message format
string for this message may optionally include {0}
,
{1}
and {3}
placeholders,
which will be replaced by user input, component label and configured
weekdays value.
Constructor Detail |
---|
public AbstractDateRestrictionValidator()
Validator
with no preconfigured limits.
Method Detail |
---|
public abstract java.lang.String[] getInvalidMonths()
public abstract void setInvalidMonths(java.lang.String[] invalidMonths)
public abstract java.lang.String[] getInvalidDaysOfWeek()
public abstract void setInvalidDaysOfWeek(java.lang.String[] invalidDaysOfWeek)
public abstract DateListProvider getInvalidDays()
public abstract void setInvalidDays(DateListProvider invalidDays)
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value) throws javax.faces.validator.ValidatorException
java.lang.IllegalArgumentException
- if value
is not of type
Date
javax.faces.validator.ValidatorException
protected java.util.Calendar getCalendar()
protected static java.util.Date getDateValue(java.lang.Object value) throws java.lang.IllegalArgumentException
java.util.Date
.
value
- converted value
java.util.Date
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |