|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.validator.DateRestrictionValidator
public class DateRestrictionValidator
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 | |
---|---|
DateRestrictionValidator()
Construct a Validator with no preconfigured limits. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
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 . |
java.lang.String |
getHintInvalidDaysOfWeek()
Return custom hint invalidDaysOfWeek message. |
java.lang.String |
getHintInvalidMonths()
Return custom hint invalidMonths message. |
DateListProvider |
getInvalidDays()
|
java.lang.String[] |
getInvalidDaysOfWeek()
|
java.lang.String[] |
getInvalidMonths()
|
java.lang.String |
getMessageDetailInvalidDays()
|
java.lang.String |
getMessageDetailInvalidDaysOfWeek()
|
java.lang.String |
getMessageDetailInvalidMonths()
|
javax.faces.el.ValueBinding |
getValueBinding(java.lang.String name)
Return the ValueBinding used to calculate the value for the
specified attribute name, if any. |
int |
hashCode()
|
boolean |
isTransient()
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setHintInvalidDaysOfWeek(java.lang.String hintWeek)
Custom hint invalidDaysOfWeek message. |
void |
setHintInvalidMonths(java.lang.String hintMonth)
Custom hint invalidMonths message. |
void |
setInvalidDays(DateListProvider invalidDays)
|
void |
setInvalidDaysOfWeek(java.lang.String[] invalidDaysOfWeek)
|
void |
setInvalidMonths(java.lang.String[] invalidMonths)
|
void |
setMessageDetailInvalidDays(java.lang.String invalidDays)
|
void |
setMessageDetailInvalidDaysOfWeek(java.lang.String invalidDaysOfWeek)
|
void |
setMessageDetailInvalidMonths(java.lang.String invalidMonths)
|
void |
setTransient(boolean transientValue)
|
void |
setValueBinding(java.lang.String name,
javax.faces.el.ValueBinding binding)
Set the ValueBinding used to calculate the value for the
specified attribute if any. |
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, 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 DateRestrictionValidator()
Validator
with no preconfigured limits.
Method Detail |
---|
public final java.lang.String[] getInvalidMonths()
public final void setInvalidMonths(java.lang.String[] invalidMonths)
public final java.lang.String[] getInvalidDaysOfWeek()
public final void setInvalidDaysOfWeek(java.lang.String[] invalidDaysOfWeek)
public final DateListProvider getInvalidDays()
public final void setInvalidDays(DateListProvider invalidDays)
public final java.lang.String getMessageDetailInvalidMonths()
public final void setMessageDetailInvalidMonths(java.lang.String invalidMonths)
public final java.lang.String getMessageDetailInvalidDaysOfWeek()
public final void setMessageDetailInvalidDaysOfWeek(java.lang.String invalidDaysOfWeek)
public final java.lang.String getMessageDetailInvalidDays()
public final void setMessageDetailInvalidDays(java.lang.String invalidDays)
public void setHintInvalidDaysOfWeek(java.lang.String hintWeek)
Custom hint invalidDaysOfWeek message.
Overrides default hint message
hintWeek
- Custom hint message.public java.lang.String getHintInvalidDaysOfWeek()
Return custom hint invalidDaysOfWeek message.
setHintInvalidDaysOfWeek(String)
public void setHintInvalidMonths(java.lang.String hintMonth)
Custom hint invalidMonths message.
Overrides default hint message
hintMonth
- Custom hint message.public java.lang.String getHintInvalidMonths()
Return custom hint invalidMonths message.
setHintInvalidMonths(String)
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value) throws javax.faces.validator.ValidatorException
validate
in interface javax.faces.validator.Validator
java.lang.IllegalArgumentException
- if value
is not of type
Date
javax.faces.validator.ValidatorException
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
public boolean isTransient()
isTransient
in interface javax.faces.component.StateHolder
public void setTransient(boolean transientValue)
setTransient
in interface javax.faces.component.StateHolder
public void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)
Set the ValueBinding
used to calculate the value for the
specified attribute if any.
name
- Name of the attribute for which to set a ValueBinding
binding
- The ValueBinding
to set, or null
to remove any currently set ValueBinding
java.lang.NullPointerException
- if name
is null
java.lang.IllegalArgumentException
- if name
is not a valid
attribute of this validatorpublic javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
Return the ValueBinding
used to calculate the value for the
specified attribute name, if any.
name
- Name of the attribute or property for which to retrieve a
ValueBinding
java.lang.NullPointerException
- if name
is null
java.lang.IllegalArgumentException
- if name
is not a valid
attribute of this validatorpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
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 |