|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.validator.util.AbstractUtilities org.apache.shale.validator.validator.AbstractValidator org.apache.shale.validator.validator.IntegerValidator
public final class IntegerValidator
Validator
implementation that will perform both format
and (optional) range checks on an integer value.
Field Summary |
---|
Fields inherited from class org.apache.shale.validator.validator.AbstractValidator |
---|
ARG_VALUE, helper, MAXIMUM_VALUE, MINIMUM_VALUE, SUBMITTED_VALUE |
Fields inherited from class org.apache.shale.validator.util.AbstractUtilities |
---|
DEFAULT_RESOURCE_BUNDLE |
Fields inherited from interface javax.faces.validator.Validator |
---|
NOT_IN_RANGE_MESSAGE_ID |
Constructor Summary | |
---|---|
IntegerValidator()
|
Method Summary | |
---|---|
int |
getMaximum()
Return the configured maximum value for this validator. |
int |
getMinimum()
Return the configured minimum value for this validator. |
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
|
Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setMaximum(int maximum)
Set the configured maximum value for this validator. |
void |
setMinimum(int minimum)
Set the configured minimum value for this validator. |
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Perform the correctness checks implemented by this
|
Methods inherited from class org.apache.shale.validator.validator.AbstractValidator |
---|
actions, convert, isClient, resources, setClient, validate |
Methods inherited from class org.apache.shale.validator.util.AbstractUtilities |
---|
getMessage, isTransient, message, message, message, setMessage, setTransient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.StateHolder |
---|
isTransient, setTransient |
Constructor Detail |
---|
public IntegerValidator()
Method Detail |
---|
public int getMaximum()
Return the configured maximum value for this validator.
public void setMaximum(int maximum)
Set the configured maximum value for this validator.
maximum
- The new maximum valuepublic int getMinimum()
Return the configured minimum value for this validator.
public void setMinimum(int minimum)
Set the configured minimum value for this validator.
minimum
- The new minimum valuepublic void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value) throws javax.faces.validator.ValidatorException
Perform the correctness checks implemented by this
Validator
against the specified UIComponent
.
If any violations are found, a ValidatorException
will be thrown containing the FacesMessage
describing the failure.
IMPLEMENTATION NOTE: Unlike earlier implementations of Shale Validator integration, validators that subclass this class do not support the option to skip server side validation.
validate
in interface javax.faces.validator.Validator
validate
in class AbstractValidator
context
- FacesContext
for the current requestcomponent
- UIComponent
we are checking for correctnessvalue
- The value to validate
javax.faces.validator.ValidatorException
- if validation failspublic void restoreState(javax.faces.context.FacesContext context, Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class AbstractValidator
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class AbstractValidator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |