org.apache.myfaces.extensions.validator.crossval.strategy
Class DateIsStrategy

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
          extended by org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCrossValidationStrategy
              extended by org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCompareStrategy
                  extended by org.apache.myfaces.extensions.validator.crossval.strategy.DateIsStrategy
All Implemented Interfaces:
org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy, CrossValidationStrategy

public class DateIsStrategy
extends AbstractCompareStrategy

Since:
1.x.1
Author:
Gerhard Petracek

Field Summary
protected static java.lang.String COMPARED_VALUE_KEY
           
protected static java.lang.String NOT_EQUAL_DATE_TIME
           
protected static java.lang.String RESULT_KEY
           
protected static java.lang.String REVERSE_COMPARED_VALUE_KEY
           
protected static java.lang.String TOO_EARLY
           
protected static java.lang.String TOO_LATE
           
 
Fields inherited from class org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCompareStrategy
referencingStrategies, violationResultStorage
 
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
DateIsStrategy()
           
 
Method Summary
protected  java.lang.String getErrorMessage(java.lang.String key, java.lang.annotation.Annotation annotation, boolean isTargetComponent)
           
protected  java.lang.String getErrorMessageDetail(java.lang.annotation.Annotation annotation, boolean isTargetComponent)
           
protected  java.lang.String getErrorMessageSummary(java.lang.annotation.Annotation annotation, boolean isTargetComponent)
           
protected  java.lang.String getReverseErrorMessageDetail(java.lang.annotation.Annotation annotation)
           
protected  java.lang.String getReverseErrorMessageSummary(java.lang.annotation.Annotation annotation)
           
protected  java.lang.String getValidationErrorMsgKey(java.lang.annotation.Annotation annotation, boolean isTargetComponent)
           
 java.lang.String[] getValidationTargets(java.lang.annotation.Annotation annotation)
           
protected  boolean handleSourceViolation(CrossValidationStorageEntry entryOfSource)
           
 boolean isViolation(java.lang.Object object1, java.lang.Object object2, java.lang.annotation.Annotation annotation)
           
 boolean useTargetComponentToDisplayErrorMsg(CrossValidationStorageEntry crossValidationStorageEntry)
           
 
Methods inherited from class org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCompareStrategy
getSourceComponentErrorMessage, getTargetComponentErrorMessage, getValidationErrorMsgKey, handleTargetViolation, initReferencingStrategies, processCrossValidation, processSourceComponentAfterViolation, processTargetComponentAfterViolation
 
Methods inherited from class org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCrossValidationStrategy
getCrossValidationStorageEntry, getLabel, initCrossValidation, initValidation, processAfterCrossValidatorException, processAfterValidatorException, processValidation
 
Methods inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy
getErrorMessageDetail, getErrorMessageSummary, getValidationErrorFacesMassage, resolveMessage, setMessageResolver
 
Methods inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy
validate
 

Field Detail

TOO_EARLY

protected static final java.lang.String TOO_EARLY
See Also:
Constant Field Values

TOO_LATE

protected static final java.lang.String TOO_LATE
See Also:
Constant Field Values

NOT_EQUAL_DATE_TIME

protected static final java.lang.String NOT_EQUAL_DATE_TIME
See Also:
Constant Field Values

RESULT_KEY

protected static final java.lang.String RESULT_KEY
See Also:
Constant Field Values

COMPARED_VALUE_KEY

protected static final java.lang.String COMPARED_VALUE_KEY
See Also:
Constant Field Values

REVERSE_COMPARED_VALUE_KEY

protected static final java.lang.String REVERSE_COMPARED_VALUE_KEY
See Also:
Constant Field Values
Constructor Detail

DateIsStrategy

public DateIsStrategy()
Method Detail

useTargetComponentToDisplayErrorMsg

public boolean useTargetComponentToDisplayErrorMsg(CrossValidationStorageEntry crossValidationStorageEntry)
Overrides:
useTargetComponentToDisplayErrorMsg in class AbstractCompareStrategy

handleSourceViolation

protected boolean handleSourceViolation(CrossValidationStorageEntry entryOfSource)
Overrides:
handleSourceViolation in class AbstractCompareStrategy

isViolation

public boolean isViolation(java.lang.Object object1,
                           java.lang.Object object2,
                           java.lang.annotation.Annotation annotation)
Specified by:
isViolation in class AbstractCompareStrategy

getValidationTargets

public java.lang.String[] getValidationTargets(java.lang.annotation.Annotation annotation)
Specified by:
getValidationTargets in class AbstractCompareStrategy

getValidationErrorMsgKey

protected java.lang.String getValidationErrorMsgKey(java.lang.annotation.Annotation annotation,
                                                    boolean isTargetComponent)
Specified by:
getValidationErrorMsgKey in class AbstractCompareStrategy

getErrorMessageSummary

protected java.lang.String getErrorMessageSummary(java.lang.annotation.Annotation annotation,
                                                  boolean isTargetComponent)
Overrides:
getErrorMessageSummary in class AbstractCompareStrategy

getErrorMessageDetail

protected java.lang.String getErrorMessageDetail(java.lang.annotation.Annotation annotation,
                                                 boolean isTargetComponent)
Overrides:
getErrorMessageDetail in class AbstractCompareStrategy

getReverseErrorMessageSummary

protected java.lang.String getReverseErrorMessageSummary(java.lang.annotation.Annotation annotation)
Overrides:
getReverseErrorMessageSummary in class AbstractCompareStrategy

getReverseErrorMessageDetail

protected java.lang.String getReverseErrorMessageDetail(java.lang.annotation.Annotation annotation)
Overrides:
getReverseErrorMessageDetail in class AbstractCompareStrategy

getErrorMessage

protected java.lang.String getErrorMessage(java.lang.String key,
                                           java.lang.annotation.Annotation annotation,
                                           boolean isTargetComponent)


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