org.apache.myfaces.custom.csvvalidator
Class AbstractCSVValidator

java.lang.Object
  extended by org.apache.myfaces.validator.ValidatorBase
      extended by org.apache.myfaces.custom.csvvalidator.AbstractCSVValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public abstract class AbstractCSVValidator
extends org.apache.myfaces.validator.ValidatorBase

Validation by validating comma separated values individually.

Version:
$Revision: 940142 $ $Date: 2010-05-01 20:36:31 -0500 (Sat, 01 May 2010) $
Author:
Lance Frohman

Field Summary
static java.lang.String CSV_INVALID_SEPARATOR_MESSAGE_ID
           
static java.lang.String CSV_NOT_STRING_MESSAGE_ID
          The message identifiers of the FacesMessage to be created if the check fails.
static java.lang.String CSV_SUFFIX_MESSAGE_ID
           
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
AbstractCSVValidator()
           
 
Method Summary
abstract  java.lang.String getSeparator()
           
abstract  java.lang.String getSubvalidatorId()
           
abstract  void setSeparator(java.lang.String separator)
           
abstract  void setSubvalidatorId(java.lang.String subvalidatorId)
           
 void validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.Object value)
           
 
Methods inherited from class org.apache.myfaces.validator.ValidatorBase
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueExpression, isTransient, restoreAttachedState, restoreState, saveAttachedState, saveState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueExpression
 
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

CSV_NOT_STRING_MESSAGE_ID

public static final java.lang.String CSV_NOT_STRING_MESSAGE_ID

The message identifiers of the FacesMessage to be created if the check fails.

See Also:
Constant Field Values

CSV_INVALID_SEPARATOR_MESSAGE_ID

public static final java.lang.String CSV_INVALID_SEPARATOR_MESSAGE_ID
See Also:
Constant Field Values

CSV_SUFFIX_MESSAGE_ID

public static final java.lang.String CSV_SUFFIX_MESSAGE_ID
See Also:
Constant Field Values
Constructor Detail

AbstractCSVValidator

public AbstractCSVValidator()
Method Detail

getSubvalidatorId

public abstract java.lang.String getSubvalidatorId()
Returns:
the VALIDATOR_ID of the actual validator to be used

setSubvalidatorId

public abstract void setSubvalidatorId(java.lang.String subvalidatorId)
Parameters:
the - VALIDATOR_ID of the actual validator to be used

getSeparator

public abstract java.lang.String getSeparator()
Returns:
the separator character to separate values

setSeparator

public abstract void setSeparator(java.lang.String separator)
Parameters:
the - separator character to separate values

validate

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


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.