|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.oval.AbstractCheck
net.sf.oval.configuration.annotation.AbstractAnnotationCheck<AssertFieldConstraints>
net.sf.oval.constraint.AssertFieldConstraintsCheck
public class AssertFieldConstraintsCheck
| Constructor Summary | |
|---|---|
AssertFieldConstraintsCheck()
|
|
| Method Summary | |
|---|---|
void |
configure(AssertFieldConstraints constraintAnnotation)
Configures the check based on the given constraint annotation. |
protected ConstraintTarget[] |
getAppliesToDefault()
|
Class<?> |
getDeclaringClass()
|
String |
getErrorCode()
|
String |
getFieldName()
|
String |
getMessage()
gets the default message that is displayed if a corresponding message key is not found in the messages properties file default processed place holders are:
|
int |
getSeverity()
|
boolean |
isSatisfied(Object validatedObject,
Object valueToValidate,
OValContext context,
Validator validator)
This method is not used. |
void |
setDeclaringClass(Class<?> declaringClass)
|
void |
setErrorCode(String errorCode)
|
void |
setFieldName(String fieldName)
|
void |
setMessage(String message)
sets the default message that is displayed if a corresponding message key is not found in the messages properties file default processed place holders are:
|
void |
setSeverity(int severity)
|
| Methods inherited from class net.sf.oval.AbstractCheck |
|---|
createMessageVariables, getAppliesTo, getContext, getMessageVariables, getProfiles, getTarget, getWhen, isActive, requireMessageVariablesRecreation, setAppliesTo, setContext, setProfiles, setTarget, setWhen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.oval.Check |
|---|
getAppliesTo, getContext, getMessageVariables, getProfiles, getTarget, getWhen, isActive, setAppliesTo, setContext, setProfiles, setTarget, setWhen |
| Constructor Detail |
|---|
public AssertFieldConstraintsCheck()
| Method Detail |
|---|
public void configure(AssertFieldConstraints constraintAnnotation)
configure in interface AnnotationCheck<AssertFieldConstraints>configure in class AbstractAnnotationCheck<AssertFieldConstraints>constraintAnnotation - the constraint annotation to use for configurationprotected ConstraintTarget[] getAppliesToDefault()
getAppliesToDefault in class AbstractCheckpublic Class<?> getDeclaringClass()
public String getErrorCode()
throws UnsupportedOperationException
getErrorCode in interface CheckgetErrorCode in class AbstractCheckUnsupportedOperationExceptionpublic String getFieldName()
public String getMessage()
throws UnsupportedOperationException
getMessage in interface CheckgetMessage in class AbstractCheckUnsupportedOperationException
public int getSeverity()
throws UnsupportedOperationException
getSeverity in interface CheckgetSeverity in class AbstractCheckUnsupportedOperationException
public boolean isSatisfied(Object validatedObject,
Object valueToValidate,
OValContext context,
Validator validator)
throws UnsupportedOperationException
validatedObject - the object/bean to validate the value against, for static fields or methods this is the classvalueToValidate - the value to validate, may be null when validating pre conditions for static methodscontext - the validation context (e.g. a field, a constructor parameter or a method parameter)validator - the calling validator
UnsupportedOperationException - always thrown if this method is invokedpublic void setDeclaringClass(Class<?> declaringClass)
declaringClass - the declaringClass to set
public void setErrorCode(String errorCode)
throws UnsupportedOperationException
setErrorCode in interface ChecksetErrorCode in class AbstractCheckerrorCode - the error code to set
UnsupportedOperationExceptionpublic void setFieldName(String fieldName)
fieldName - the fieldName to set
public void setMessage(String message)
throws UnsupportedOperationException
setMessage in interface ChecksetMessage in class AbstractCheckUnsupportedOperationException
public void setSeverity(int severity)
throws UnsupportedOperationException
setSeverity in interface ChecksetSeverity in class AbstractCheckseverity - the severity to set
UnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||