org.apache.myfaces.extensions.validator.baseval.strategy
Class PatternStrategy

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy
      extended by org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy<Pattern>
          extended by org.apache.myfaces.extensions.validator.baseval.strategy.PatternStrategy
All Implemented Interfaces:
ValidationStrategy

@SkipValidationSupport
public class PatternStrategy
extends AbstractAnnotationValidationStrategy<Pattern>

Since:
1.x.1

Field Summary
 
Fields inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy
DETAIL_MESSAGE_KEY_POSTFIX
 
Fields inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy
logger
 
Constructor Summary
PatternStrategy()
           
 
Method Summary
protected  String getValidationErrorMsgKey(Pattern annotation)
          Returns the key for the message that needs to be resolved for the violation-message.
protected  void processValidation(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, MetaDataEntry metaDataEntry, Object convertedObject)
          Validates the given value based on the given meta-data entry.
 
Methods inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy
getErrorMessageDetail, getErrorMessageSummary, getLabel, getValidationErrorFacesMessage, processAfterValidatorException, resolveMessage, setMessageResolver
 
Methods inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy
initValidation, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternStrategy

public PatternStrategy()
Method Detail

processValidation

protected void processValidation(javax.faces.context.FacesContext facesContext,
                                 javax.faces.component.UIComponent uiComponent,
                                 MetaDataEntry metaDataEntry,
                                 Object convertedObject)
                          throws javax.faces.validator.ValidatorException
Description copied from class: AbstractValidationStrategy
Validates the given value based on the given meta-data entry. The method throws a ValidatorException if a violation is detected

Specified by:
processValidation in class AbstractValidationStrategy
Parameters:
facesContext - The JSF Context
uiComponent - The JSF component that contained the value entered by the user.
metaDataEntry - The data holder which stores the meta-data and some information where the meta-data was around.
convertedObject - Converted object of the user entered value.
Throws:
javax.faces.validator.ValidatorException - When violation of the validation rules occurs.

getValidationErrorMsgKey

protected String getValidationErrorMsgKey(Pattern annotation)
Description copied from class: AbstractAnnotationValidationStrategy
Returns the key for the message that needs to be resolved for the violation-message.

Specified by:
getValidationErrorMsgKey in class AbstractAnnotationValidationStrategy<Pattern>
Parameters:
annotation - The annotation associated with the ValidationStrategy.
Returns:
The key of the error message.


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.