|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--oracle.adf.view.faces.validator.DateTimeRangeValidator
DateTimeRangeValidator is a Validator that checks
the value of the corresponding component against specified minimum and
maximum dates. The following algorithm is implemented:
null, exit immediately.ValidatorException containing a
TYPE_MESSAGE_ID message.maximum and minimum property
has been configured on this Validator, check the component
value against both limits. If the component value is not within
this specified range, throw a ValidatorException containing a
Validator.NOT_IN_RANGE_MESSAGE_ID message.maximum property has been configured on this
Validator, check the component value against
this limit. If the component value is greater than the
specified maximum, throw a ValidatorException containing a
MAXIMUM_MESSAGE_ID message.minimum property has been configured on this
Validator, check the component value against
this limit. If the component value is less than the
specified minimum, throw a ValidatorException containing a
MINIMUM_MESSAGE_ID message.
| Field Summary | |
static java.lang.String |
MAXIMUM_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the maximum value check fails. |
static java.lang.String |
MINIMUM_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the minimum value check fails. |
static java.lang.String |
NOT_IN_RANGE_MESSAGE_ID
The message identifier of the FacesMessage to be created if
the maximum or minimum value check fails, and both the maximum
and minimum values for this validator have been set. |
static java.lang.String |
TYPE_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the current value of this component is not of the
correct type. |
static java.lang.String |
VALIDATOR_ID
|
| Constructor Summary | |
DateTimeRangeValidator()
Construct a Validator with no preconfigured limits. |
|
DateTimeRangeValidator(java.util.Date maximum)
Construct a Validator with the specified preconfigured
limit. |
|
DateTimeRangeValidator(java.util.Date maximum,
java.util.Date minimum)
Construct a Validator with the specified preconfigured
limits. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
|
java.util.Date |
getMaximum()
Return the maximum value to be enforced by this Validator or null if it has not been
set. |
java.util.Date |
getMinimum()
Return the minimum value to be enforced by this Validator, or null if it has not been
set. |
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 |
setMaximum(java.util.Date maximum)
Set the maximum value to be enforced by this Validator. |
void |
setMinimum(java.util.Date minimum)
Set the minimum value to be enforced by this Validator. |
void |
setTransient(boolean transientValue)
|
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 MAXIMUM_MESSAGE_ID
FacesMessage
to be created if the maximum value check fails. The message format
string for this message may optionally include a {0}
placeholder, which will be replaced by the configured maximum value.
public static final java.lang.String MINIMUM_MESSAGE_ID
FacesMessage
to be created if the minimum value check fails. The message format
string for this message may optionally include a {0}
placeholder, which will be replaced by the configured minimum value.
public static final java.lang.String NOT_IN_RANGE_MESSAGE_ID
FacesMessage to be created if
the maximum or minimum value check fails, and both the maximum
and minimum values for this validator have been set. The message
format string for this message may optionally include a
{0} placeholder, which will be replaced by the
configured minimum value, and a {1} placeholder,
which will be replaced by the configured maximum value.
public static final java.lang.String TYPE_MESSAGE_ID
FacesMessage
to be created if the current value of this component is not of the
correct type.
| Constructor Detail |
public DateTimeRangeValidator()
Validator with no preconfigured limits.
public DateTimeRangeValidator(java.util.Date maximum)
Validator with the specified preconfigured
limit.
maximum - Maximum value to allow
public DateTimeRangeValidator(java.util.Date maximum,
java.util.Date minimum)
Validator with the specified preconfigured
limits.
maximum - Maximum value to allowminimum - Minimum value to allow| Method Detail |
public java.util.Date getMaximum()
Validator or null if it has not been
set.
public void setMaximum(java.util.Date maximum)
Validator.
maximum - The new maximum valuepublic java.util.Date getMinimum()
Validator, or null if it has not been
set.
public void setMinimum(java.util.Date minimum)
Validator.
minimum - The new minimum value
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.Validatorjava.lang.NullPointerException
javax.faces.validator.ValidatorExceptionpublic 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.StateHolderpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isTransient()
isTransient in interface javax.faces.component.StateHolderpublic void setTransient(boolean transientValue)
setTransient in interface javax.faces.component.StateHolder
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||