net.sf.oval.guard
Class PostCheck

java.lang.Object
  extended by net.sf.oval.AbstractCheck
      extended by net.sf.oval.guard.PostCheck
All Implemented Interfaces:
Serializable, Check

public class PostCheck
extends AbstractCheck

Author:
Sebastian Thomschke
See Also:
Serialized Form

Constructor Summary
PostCheck()
           
 
Method Summary
 void configure(Post constraintAnnotation)
           
 String getExpression()
           
 String getLanguage()
           
 String getOld()
           
 boolean isSatisfied(Object validatedObject, Object valueToValidate, OValContext context, Validator validator)
          This method implements the validation logic
 void setExpression(String condition)
           
 void setLanguage(String language)
           
 void setOld(String old)
           
 
Methods inherited from class net.sf.oval.AbstractCheck
createMessageVariables, getAppliesTo, getAppliesToDefault, getContext, getErrorCode, getMessage, getMessageVariables, getProfiles, getSeverity, getTarget, getWhen, isActive, requireMessageVariablesRecreation, setAppliesTo, setContext, setErrorCode, setMessage, setProfiles, setSeverity, setTarget, setWhen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostCheck

public PostCheck()
Method Detail

configure

public void configure(Post constraintAnnotation)

getExpression

public String getExpression()
Returns:
the condition

getLanguage

public String getLanguage()
Returns:
the language

getOld

public String getOld()
Returns:
the old

isSatisfied

public boolean isSatisfied(Object validatedObject,
                           Object valueToValidate,
                           OValContext context,
                           Validator validator)
                    throws OValException
This method implements the validation logic

Parameters:
validatedObject - the object/bean to validate the value against, for static fields or methods this is the class
valueToValidate - the value to validate, may be null when validating pre conditions for static methods
context - the validation context (e.g. a field, a constructor parameter or a method parameter)
validator - the calling validator
Returns:
true if the value satisfies the checked constraint
Throws:
OValException

setExpression

public void setExpression(String condition)
Parameters:
condition - the condition to set

setLanguage

public void setLanguage(String language)
Parameters:
language - the language to set

setOld

public void setOld(String old)
Parameters:
old - the old to set


Copyright © 2005–2015 The OVal Development Team. All rights reserved.