org.loom.validator
Class ValidationRequest
java.lang.Object
org.loom.validator.ValidationRequest
public class ValidationRequest
- extends java.lang.Object
Class with all the data needed to perform a validation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidationRequest
public ValidationRequest(PropertyValidator validator,
Messages messages)
validate
public void validate(java.lang.Object value)
- Performs the validation
- Parameters:
value
- the value to validate
getMessages
public Messages getMessages()
getValidator
public PropertyValidator getValidator()
push
public ValidationRequest push(java.lang.String nodeName)
push
public ValidationRequest push(java.lang.String nodeName,
java.lang.Object index)
pop
public void pop()
addErrorMessage
public Message addErrorMessage(java.lang.String messageKey,
java.lang.Object value)
- Adds a validation error message
- Parameters:
messageKey
- The key of the error messagevalue
- The value that could not be validated
- Returns:
- the Message that has been added, or null if the field already had associated errors.
getVisitedPath
public java.lang.String getVisitedPath()
- Returns:
- a String that represents the visited property path with property indexes inclued, if any