|
||||||||||
| 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 String |
DAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid days value check fails. |
static String |
MONTH_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid month value check fails. |
static String |
VALIDATOR_ID
|
static 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(Object o)
|
protected Calendar |
getCalendar()
|
protected static Date |
getDateValue(Object value)
Parses the already converted value to a java.util.Date. |
String |
getHintInvalidDaysOfWeek()
Return custom hint invalidDaysOfWeek message. |
String |
getHintInvalidMonths()
Return custom hint invalidMonths message. |
DateListProvider |
getInvalidDays()
|
String[] |
getInvalidDaysOfWeek()
|
String[] |
getInvalidMonths()
|
String |
getMessageDetailInvalidDays()
|
String |
getMessageDetailInvalidDaysOfWeek()
|
String |
getMessageDetailInvalidMonths()
|
ValueBinding |
getValueBinding(String name)
Deprecated. |
ValueExpression |
getValueExpression(String name)
Return the ValueExpression used to calculate the value for the
specified attribute name, if any. |
int |
hashCode()
|
boolean |
isTransient()
|
void |
restoreState(FacesContext context,
Object state)
|
Object |
saveState(FacesContext context)
|
void |
setHintInvalidDaysOfWeek(String hintWeek)
Custom hint invalidDaysOfWeek message. |
void |
setHintInvalidMonths(String hintMonth)
Custom hint invalidMonths message. |
void |
setInvalidDays(DateListProvider invalidDays)
|
void |
setInvalidDaysOfWeek(String[] invalidDaysOfWeek)
|
void |
setInvalidMonths(String[] invalidMonths)
|
void |
setMessageDetailInvalidDays(String invalidDays)
|
void |
setMessageDetailInvalidDaysOfWeek(String invalidDaysOfWeek)
|
void |
setMessageDetailInvalidMonths(String invalidMonths)
|
void |
setTransient(boolean transientValue)
|
void |
setValueBinding(String name,
ValueBinding binding)
Deprecated. |
void |
setValueExpression(String name,
ValueExpression expression)
Set the ValueExpression used to calculate the value for the
specified attribute if any. |
void |
validate(FacesContext context,
UIComponent component,
Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VALIDATOR_ID
public static final 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 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 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 String[] getInvalidMonths()
public final void setInvalidMonths(String[] invalidMonths)
public final String[] getInvalidDaysOfWeek()
public final void setInvalidDaysOfWeek(String[] invalidDaysOfWeek)
public final DateListProvider getInvalidDays()
public final void setInvalidDays(DateListProvider invalidDays)
public final String getMessageDetailInvalidMonths()
public final void setMessageDetailInvalidMonths(String invalidMonths)
public final String getMessageDetailInvalidDaysOfWeek()
public final void setMessageDetailInvalidDaysOfWeek(String invalidDaysOfWeek)
public final String getMessageDetailInvalidDays()
public final void setMessageDetailInvalidDays(String invalidDays)
public void setHintInvalidDaysOfWeek(String hintWeek)
Custom hint invalidDaysOfWeek message.
Overrides default hint message
hintWeek - Custom hint message.public String getHintInvalidDaysOfWeek()
Return custom hint invalidDaysOfWeek message.
setHintInvalidDaysOfWeek(String)public void setHintInvalidMonths(String hintMonth)
Custom hint invalidMonths message.
Overrides default hint message
hintMonth - Custom hint message.public String getHintInvalidMonths()
Return custom hint invalidMonths message.
setHintInvalidMonths(String)
public void validate(FacesContext context,
UIComponent component,
Object value)
throws ValidatorException
validate in interface ValidatorIllegalArgumentException - if value is not of type
Date
ValidatorExceptionpublic Object saveState(FacesContext context)
saveState in interface StateHolder
public void restoreState(FacesContext context,
Object state)
restoreState in interface StateHolderpublic boolean isTransient()
isTransient in interface StateHolderpublic void setTransient(boolean transientValue)
setTransient in interface StateHolder
public void setValueExpression(String name,
ValueExpression expression)
Set the ValueExpression used to calculate the value for the
specified attribute if any.
name - Name of the attribute for which to set a ValueExpressionexpression - The ValueExpression to set, or null
to remove any currently set ValueExpression
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this converterpublic ValueExpression getValueExpression(String name)
Return the ValueExpression used to calculate the value for the
specified attribute name, if any.
name - Name of the attribute or property for which to retrieve a
ValueExpression
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this converter
public void setValueBinding(String name,
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 ValueBindingbinding - The ValueBinding to set, or null
to remove any currently set ValueBinding
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this validatorpublic ValueBinding getValueBinding(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
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this validatorpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectprotected Calendar getCalendar()
protected static Date getDateValue(Object value)
throws IllegalArgumentException
java.util.Date.
value - converted value
java.util.Date
IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||