com.ibm.xsp.validator
Class ModulusSelfCheckValidator
java.lang.Object
com.ibm.xsp.complex.ValueBindingObjectImpl
com.ibm.xsp.validator.AbstractValidator
com.ibm.xsp.validator.ModulusSelfCheckValidator
- All Implemented Interfaces:
- ComponentBindingObject, ValueBindingObject, java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator
public class ModulusSelfCheckValidator
- extends AbstractValidator
A modulus self check validator with support for automatic
client-side validation and computed expressions on its properties.
Corresponds to xp:validateModulusSelfCheck tag
Fields inherited from interface javax.faces.validator.Validator |
NOT_IN_RANGE_MESSAGE_ID |
Method Summary |
java.lang.String |
getInvalidMessage()
Return a message that tells the user the value entered is invalid |
int |
getModulus()
Return the modulus algorithm to use, either 10 or 11, defaulting to 10. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setModulus(int modulus)
Modulus specifies which IBM Modulus Self Check Algorithm to use. |
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModulusSelfCheckValidator
public ModulusSelfCheckValidator()
getModulus
public int getModulus()
- Return the modulus algorithm to use, either 10 or 11, defaulting to 10.
- Returns:
- modulus
setModulus
public void setModulus(int modulus)
- Modulus specifies which IBM Modulus Self Check Algorithm to use.
entering 10 specifies the IBM Modulus 10 Self-check Algorithm is to be used.
entering 11 specifies the IBM Modulus 11 Self-check Algorithm is to be used.
Set the value of the modulus
property.
validate
public void validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
throws javax.faces.validator.ValidatorException
- Throws:
javax.faces.validator.ValidatorException
getInvalidMessage
public java.lang.String getInvalidMessage()
- Return a message that tells the user the value entered is invalid
- Returns:
- invalid message
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interface javax.faces.component.StateHolder
- Overrides:
saveState
in class AbstractValidator
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
- Overrides:
restoreState
in class AbstractValidator