|
||||||||||
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<AssertConstraintSet>
net.sf.oval.constraint.AssertConstraintSetCheck
public class AssertConstraintSetCheck
Constructor Summary | |
---|---|
AssertConstraintSetCheck()
|
Method Summary | |
---|---|
void |
configure(AssertConstraintSet constraintAnnotation)
Configures the check based on the given constraint annotation. |
String |
getErrorCode()
|
String |
getId()
|
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 |
setErrorCode(String errorCode)
|
void |
setId(String id)
|
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, getAppliesToDefault, 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 AssertConstraintSetCheck()
Method Detail |
---|
public void configure(AssertConstraintSet constraintAnnotation)
configure
in interface AnnotationCheck<AssertConstraintSet>
configure
in class AbstractAnnotationCheck<AssertConstraintSet>
constraintAnnotation
- the constraint annotation to use for configurationpublic String getErrorCode() throws UnsupportedOperationException
getErrorCode
in interface Check
getErrorCode
in class AbstractCheck
UnsupportedOperationException
public String getId()
public String getMessage() throws UnsupportedOperationException
getMessage
in interface Check
getMessage
in class AbstractCheck
UnsupportedOperationException
public int getSeverity() throws UnsupportedOperationException
getSeverity
in interface Check
getSeverity
in class AbstractCheck
UnsupportedOperationException
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 setErrorCode(String errorCode) throws UnsupportedOperationException
setErrorCode
in interface Check
setErrorCode
in class AbstractCheck
errorCode
- the error code to set
UnsupportedOperationException
public void setId(String id)
public void setMessage(String message) throws UnsupportedOperationException
setMessage
in interface Check
setMessage
in class AbstractCheck
UnsupportedOperationException
public void setSeverity(int severity) throws UnsupportedOperationException
setSeverity
in interface Check
setSeverity
in class AbstractCheck
severity
- the severity to set
UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |