org.apache.myfaces.commons.validator
Class CreditCardValidator

java.lang.Object
  extended by org.apache.myfaces.commons.validator.ValidatorBase
      extended by org.apache.myfaces.commons.validator.AbstractCreditCardValidator
          extended by org.apache.myfaces.commons.validator.CreditCardValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class CreditCardValidator
extends AbstractCreditCardValidator


Field Summary
static java.lang.String VALIDATOR_ID
           
 
Fields inherited from class org.apache.myfaces.commons.validator.AbstractCreditCardValidator
CREDITCARD_MESSAGE_ID
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
CreditCardValidator()
           
 
Method Summary
 boolean isAmex()
          american express cards
 boolean isDiscover()
          validation for discover
 boolean isMastercard()
          validation for mastercard
 boolean isNone()
          none of the given cardtypes is allowed.
 boolean isVisa()
          validation for visa
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setAmex(boolean amex)
           
 void setDiscover(boolean discover)
           
 void setMastercard(boolean mastercard)
           
 void setNone(boolean none)
           
 void setVisa(boolean visa)
           
 
Methods inherited from class org.apache.myfaces.commons.validator.AbstractCreditCardValidator
validate
 
Methods inherited from class org.apache.myfaces.commons.validator.ValidatorBase
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueBinding, isTransient, restoreAttachedState, saveAttachedState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueBinding
 
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
See Also:
Constant Field Values
Constructor Detail

CreditCardValidator

public CreditCardValidator()
Method Detail

isAmex

public boolean isAmex()
Description copied from class: AbstractCreditCardValidator
american express cards

Specified by:
isAmex in class AbstractCreditCardValidator

setAmex

public void setAmex(boolean amex)
Specified by:
setAmex in class AbstractCreditCardValidator

isDiscover

public boolean isDiscover()
Description copied from class: AbstractCreditCardValidator
validation for discover

Specified by:
isDiscover in class AbstractCreditCardValidator

setDiscover

public void setDiscover(boolean discover)
Specified by:
setDiscover in class AbstractCreditCardValidator

isMastercard

public boolean isMastercard()
Description copied from class: AbstractCreditCardValidator
validation for mastercard

Specified by:
isMastercard in class AbstractCreditCardValidator

setMastercard

public void setMastercard(boolean mastercard)
Specified by:
setMastercard in class AbstractCreditCardValidator

isNone

public boolean isNone()
Description copied from class: AbstractCreditCardValidator
none of the given cardtypes is allowed.

Specified by:
isNone in class AbstractCreditCardValidator

setNone

public void setNone(boolean none)
Specified by:
setNone in class AbstractCreditCardValidator

isVisa

public boolean isVisa()
Description copied from class: AbstractCreditCardValidator
validation for visa

Specified by:
isVisa in class AbstractCreditCardValidator

setVisa

public void setVisa(boolean visa)
Specified by:
setVisa in class AbstractCreditCardValidator

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class ValidatorBase

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class ValidatorBase


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.