org.apache.myfaces.extensions.validator.crossval.strategy
Class AbstractCompareStrategy<A extends Annotation>
java.lang.Object
org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy
org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy<A>
org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCrossValidationStrategy
org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCompareStrategy<A>
- All Implemented Interfaces:
- ValidationStrategy, CrossValidationStrategy
- Direct Known Subclasses:
- DateIsStrategy, EmptyIfStrategy, EqualsStrategy, RequiredIfStrategy
public abstract class AbstractCompareStrategy<A extends Annotation>
- extends AbstractCrossValidationStrategy
- Since:
- 1.x.1
- Author:
- Gerhard Petracek
Method Summary |
protected String |
getErrorMessageDetail(A annotation,
boolean isTargetComponent)
|
protected String |
getErrorMessageSummary(A annotation,
boolean isTargetComponent)
|
protected abstract MessageTarget |
getMessageTarget(A annotation)
|
protected String |
getReverseErrorMessageDetail(A annotation)
|
protected String |
getReverseErrorMessageSummary(A annotation)
|
protected javax.faces.application.FacesMessage |
getSourceComponentErrorMessage(A annotation,
String summary,
String detail)
|
protected javax.faces.application.FacesMessage |
getTargetComponentErrorMessage(A foundAnnotation,
String summary,
String detail)
|
protected abstract String |
getValidationErrorMsgKey(A annotation,
boolean isTargetComponent)
|
protected String |
getValidationErrorMsgKey(Annotation annotation)
Returns the key for the message that needs to be resolved for the violation-message. |
abstract String[] |
getValidationTargets(A annotation)
|
protected boolean |
handleSourceViolation(CrossValidationStorageEntry entryOfSource)
Deprecated. |
protected boolean |
handleTargetViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
|
protected void |
initReferencingStrategies()
|
abstract boolean |
isViolation(Object object1,
Object object2,
A annotation)
|
void |
processCrossValidation(CrossValidationStorageEntry crossValidationStorageEntry,
CrossValidationStorage crossValidationStorage)
|
protected void |
processSourceComponentAfterViolation(CrossValidationStorageEntry entryOfSource)
|
protected void |
processTargetComponentAfterViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
|
protected boolean |
useSourceComponentToDisplayErrorMsg(CrossValidationStorageEntry entryOfSource)
|
protected boolean |
useTargetComponentToDisplayErrorMsg(CrossValidationStorageEntry entryOfSource)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
referencingStrategies
protected static List<org.apache.myfaces.extensions.validator.crossval.strategy.ReferencingStrategy> referencingStrategies
violationResultStorage
protected Map<Object,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(A annotation,
String summary,
String detail)
getTargetComponentErrorMessage
protected javax.faces.application.FacesMessage getTargetComponentErrorMessage(A foundAnnotation,
String summary,
String detail)
getErrorMessageSummary
protected String getErrorMessageSummary(A annotation,
boolean isTargetComponent)
getErrorMessageDetail
protected String getErrorMessageDetail(A annotation,
boolean isTargetComponent)
getValidationErrorMsgKey
protected final String getValidationErrorMsgKey(Annotation 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
- Parameters:
annotation
- The annotation associated with the
ValidationStrategy
.
- Returns:
- The key of the error message.
handleTargetViolation
protected boolean handleTargetViolation(CrossValidationStorageEntry entryOfSource,
CrossValidationStorageEntry entryOfTarget)
handleSourceViolation
@Deprecated
protected boolean handleSourceViolation(CrossValidationStorageEntry entryOfSource)
- Deprecated.
useSourceComponentToDisplayErrorMsg
protected boolean useSourceComponentToDisplayErrorMsg(CrossValidationStorageEntry entryOfSource)
useTargetComponentToDisplayErrorMsg
protected boolean useTargetComponentToDisplayErrorMsg(CrossValidationStorageEntry entryOfSource)
getMessageTarget
protected abstract MessageTarget getMessageTarget(A annotation)
getReverseErrorMessageSummary
protected String getReverseErrorMessageSummary(A annotation)
getReverseErrorMessageDetail
protected String getReverseErrorMessageDetail(A annotation)
getValidationErrorMsgKey
protected abstract String getValidationErrorMsgKey(A annotation,
boolean isTargetComponent)
isViolation
public abstract boolean isViolation(Object object1,
Object object2,
A annotation)
getValidationTargets
public abstract String[] getValidationTargets(A annotation)
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.