## org.apache.myfaces.custom.creditcardvalidator
Class CreditCardValidator

    java.lang.Object
      org.apache.myfaces.custom.creditcardvalidator.CreditCardValidator

All Implemented Interfaces:
  java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class CreditCardValidator
extends java.lang.Object
implements javax.faces.validator.Validator, javax.faces.component.StateHolder

Version:
  $Revision: 169649 $ $Date: 2005-05-11 11:47:12 -0400 (Wed, 11 May 2005) $
Author:
  mwessendorf (latest modification by $Author: grantsmith $)

Field Summary
`static java.lang.String` `CREDITCARD_MESSAGE_ID` The message identifier of the `FacesMessage` to be created if the creditcard check fails.
`static java.lang.String` `VALIDATOR_ID` The standard converter id for this converter.

Fields inherited from interface javax.faces.validator.Validator
`NOT_IN_RANGE_MESSAGE_ID`

Constructor Summary
`CreditCardValidator()`

Method Summary
`boolean` `isAmex()`
`boolean` `isDiscover()`
`boolean` `isMastercard()`
`boolean` `isNone()`
`boolean` `isTransient()`
`boolean` `isVisa()`
`void` `restoreState(javax.faces.context.FacesContext context, java.lang.Object state)`
`java.lang.Object` `saveState(javax.faces.context.FacesContext context)`
`void` `setAmex(boolean b)`
`void` `setDiscover(boolean b)`
`void` `setMastercard(boolean b)`
`void` `setNone(boolean b)`
`void` `setTransient(boolean newTransientValue)`
`void` `setVisa(boolean b)`
`void` `validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.Object value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### VALIDATOR_ID

    public static final java.lang.String VALIDATOR_ID

  The standard converter id for this converter.

  See Also:
    Constant Field Values

### CREDITCARD_MESSAGE_ID

    public static final java.lang.String CREDITCARD_MESSAGE_ID

  The message identifier of the `FacesMessage` to be created if the creditcard check fails.

  See Also:
    Constant Field Values

Constructor Detail

### CreditCardValidator

    public CreditCardValidator()

Method Detail

### validate

    public void validate(javax.faces.context.FacesContext facesContext,
                         javax.faces.component.UIComponent uiComponent,
                         java.lang.Object value)
                  throws javax.faces.validator.ValidatorException

  Specified by:
    `validate` in interface `javax.faces.validator.Validator`
  Throws:
    `javax.faces.validator.ValidatorException`

### isAmex

    public boolean isAmex()

### isDiscover

    public boolean isDiscover()

### isMastercard

    public boolean isMastercard()

### isNone

    public boolean isNone()

### isVisa

    public boolean isVisa()

### setAmex

    public void setAmex(boolean b)

### setDiscover

    public void setDiscover(boolean b)

### setMastercard

    public void setMastercard(boolean b)

### setNone

    public void setNone(boolean b)

### setVisa

    public void setVisa(boolean b)

### saveState

    public java.lang.Object saveState(javax.faces.context.FacesContext context)

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`

### restoreState

    public void restoreState(javax.faces.context.FacesContext context,
                             java.lang.Object state)

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`

### isTransient

    public boolean isTransient()

  Specified by:
    `isTransient` in interface `javax.faces.component.StateHolder`

### setTransient

    public void setTransient(boolean newTransientValue)

  Specified by:
    `setTransient` in interface `javax.faces.component.StateHolder`