org.apache.myfaces.extensions.validator.crossval.strategy
Class AbstractCompareStrategy
java.lang.Object
org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy
org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy
org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCrossValidationStrategy
org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCompareStrategy
- All Implemented Interfaces:
- org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy, CrossValidationStrategy
- Direct Known Subclasses:
- DateIsStrategy, EqualsStrategy, RequiredIfStrategy
public abstract class AbstractCompareStrategy
- extends AbstractCrossValidationStrategy
- Since:
- 1.x.1
- Author:
- Gerhard Petracek
Field Summary |
protected static java.util.List<org.apache.myfaces.extensions.validator.crossval.strategy.ReferencingStrategy> |
referencingStrategies
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
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 |
Method Summary |
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 javax.faces.application.FacesMessage |
getSourceComponentErrorMessage(java.lang.annotation.Annotation annotation,
java.lang.String summary,
java.lang.String detail)
|
protected javax.faces.application.FacesMessage |
getTargetComponentErrorMessage(java.lang.annotation.Annotation foundAnnotation,
java.lang.String summary,
java.lang.String detail)
|
protected java.lang.String |
getValidationErrorMsgKey(java.lang.annotation.Annotation annotation)
|
protected abstract java.lang.String |
getValidationErrorMsgKey(java.lang.annotation.Annotation annotation,
boolean isTargetComponent)
|
abstract java.lang.String[] |
getValidationTargets(java.lang.annotation.Annotation annotation)
|
protected boolean |
handleSourceViolation(CrossValidationStorageEntry entryOfSource)
|
protected boolean |
handleTargetViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
|
protected void |
initReferencingStrategies()
|
abstract boolean |
isViolation(java.lang.Object object1,
java.lang.Object object2,
java.lang.annotation.Annotation annotation)
|
void |
processCrossValidation(CrossValidationStorageEntry crossValidationStorageEntry,
CrossValidationStorage crossValidationStorage)
|
protected void |
processSourceComponentAfterViolation(CrossValidationStorageEntry entryOfSource)
|
protected void |
processTargetComponentAfterViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
|
protected boolean |
useTargetComponentToDisplayErrorMsg(CrossValidationStorageEntry crossValidationStorageEntry)
|
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 |
referencingStrategies
protected static java.util.List<org.apache.myfaces.extensions.validator.crossval.strategy.ReferencingStrategy> referencingStrategies
violationResultStorage
protected java.util.Map<java.lang.Object,java.lang.Object> violationResultStorage
AbstractCompareStrategy
public AbstractCompareStrategy()
initReferencingStrategies
protected void initReferencingStrategies()
processCrossValidation
public void processCrossValidation(CrossValidationStorageEntry crossValidationStorageEntry,
CrossValidationStorage crossValidationStorage)
throws javax.faces.validator.ValidatorException
- Throws:
javax.faces.validator.ValidatorException
processTargetComponentAfterViolation
protected final void processTargetComponentAfterViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
processSourceComponentAfterViolation
protected final void processSourceComponentAfterViolation(CrossValidationStorageEntry entryOfSource)
getSourceComponentErrorMessage
protected javax.faces.application.FacesMessage getSourceComponentErrorMessage(java.lang.annotation.Annotation annotation,
java.lang.String summary,
java.lang.String detail)
getTargetComponentErrorMessage
protected javax.faces.application.FacesMessage getTargetComponentErrorMessage(java.lang.annotation.Annotation foundAnnotation,
java.lang.String summary,
java.lang.String detail)
getErrorMessageSummary
protected java.lang.String getErrorMessageSummary(java.lang.annotation.Annotation annotation,
boolean isTargetComponent)
getErrorMessageDetail
protected java.lang.String getErrorMessageDetail(java.lang.annotation.Annotation annotation,
boolean isTargetComponent)
getValidationErrorMsgKey
protected java.lang.String getValidationErrorMsgKey(java.lang.annotation.Annotation annotation)
- Specified by:
getValidationErrorMsgKey
in class org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy
handleTargetViolation
protected boolean handleTargetViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
handleSourceViolation
protected boolean handleSourceViolation(CrossValidationStorageEntry entryOfSource)
useTargetComponentToDisplayErrorMsg
protected boolean useTargetComponentToDisplayErrorMsg(CrossValidationStorageEntry crossValidationStorageEntry)
getReverseErrorMessageSummary
protected java.lang.String getReverseErrorMessageSummary(java.lang.annotation.Annotation annotation)
getReverseErrorMessageDetail
protected java.lang.String getReverseErrorMessageDetail(java.lang.annotation.Annotation annotation)
getValidationErrorMsgKey
protected abstract java.lang.String getValidationErrorMsgKey(java.lang.annotation.Annotation annotation,
boolean isTargetComponent)
isViolation
public abstract boolean isViolation(java.lang.Object object1,
java.lang.Object object2,
java.lang.annotation.Annotation annotation)
getValidationTargets
public abstract java.lang.String[] getValidationTargets(java.lang.annotation.Annotation annotation)
Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.