|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.oval.AbstractCheckExclusion
public abstract class AbstractCheckExclusion
Partial implementation of exclusion classes.
Constructor Summary | |
---|---|
AbstractCheckExclusion()
|
Method Summary | |
---|---|
Map<String,String> |
getMessageVariables()
|
String[] |
getProfiles()
|
String |
getWhen()
Formula returning true if this constraint shall be evaluated and
false if it shall be ignored for the current validation. |
boolean |
isActive(Object validatedObject,
Object valueToValidate,
Validator validator)
|
void |
setProfiles(String... profiles)
|
void |
setWhen(String when)
Sets the formula returning true if this constraint shall be evaluated and
false if it shall be ignored for the current validation. |
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.CheckExclusion |
---|
isCheckExcluded |
Constructor Detail |
---|
public AbstractCheckExclusion()
Method Detail |
---|
public Map<String,String> getMessageVariables()
public String[] getProfiles()
getProfiles
in interface CheckExclusion
public String getWhen()
true
if this constraint shall be evaluated and
false
if it shall be ignored for the current validation.
Important: The formula must be prefixed with the name of the scripting language that is used.
E.g. groovy:_this.amount > 10
Available context variables are:
_this -> the validated bean
_value -> the value to validate (e.g. the field value, parameter value, method return value,
or the validated bean for object level constraints)
getWhen
in interface CheckExclusion
public boolean isActive(Object validatedObject, Object valueToValidate, Validator validator)
isActive
in interface CheckExclusion
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 methodsvalidator
- the calling validator
true
if this check exclusion is active and must be satisfiedpublic void setProfiles(String... profiles)
setProfiles
in interface CheckExclusion
profiles
- the profiles to setpublic void setWhen(String when)
true
if this constraint shall be evaluated and
false
if it shall be ignored for the current validation.
Important: The formula must be prefixed with the name of the scripting language that is used.
E.g. groovy:_this.amount > 10
Available context variables are:
_this -> the validated bean
_value -> the value to validate (e.g. the field value, parameter value, method return value,
or the validated bean for object level constraints)
setWhen
in interface CheckExclusion
when
- formula calculating if this check is active
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |