javax.validation
Interface ConstraintValidatorContext.ErrorBuilder.NodeContextBuilder

Enclosing interface:
ConstraintValidatorContext.ErrorBuilder

public static interface ConstraintValidatorContext.ErrorBuilder.NodeContextBuilder

Represent refinement choices for a node which is in an Iterator or Map. If the iterator is an indexed collection or a map, the index or the key should be set.


Method Summary
 ConstraintValidatorContext addError()
          Add the new error report to be generated if the constraint validator mark the value as invalid.
 ConstraintValidatorContext.ErrorBuilder.NodeBuilderCustomizableContext addSubNode(java.lang.String name)
          Add a subNode to the path the error will be associated to.
 ConstraintValidatorContext.ErrorBuilder.NodeBuilderDefinedContext atIndex(java.lang.Integer index)
          Define the index the object is into the List or array
 ConstraintValidatorContext.ErrorBuilder.NodeBuilderDefinedContext atKey(java.lang.Object key)
          Define the key the object is into the Map
 

Method Detail

atKey

ConstraintValidatorContext.ErrorBuilder.NodeBuilderDefinedContext atKey(java.lang.Object key)
Define the key the object is into the Map

Parameters:
key - map key
Returns:
a builder representing the current node

atIndex

ConstraintValidatorContext.ErrorBuilder.NodeBuilderDefinedContext atIndex(java.lang.Integer index)
Define the index the object is into the List or array

Parameters:
index - index
Returns:
a builder representing the current node

addSubNode

ConstraintValidatorContext.ErrorBuilder.NodeBuilderCustomizableContext addSubNode(java.lang.String name)
Add a subNode to the path the error will be associated to. name describes a single property. In particular, dot (.) are not allowed.

Parameters:
name - property name
Returns:
a builder representing this node

addError

ConstraintValidatorContext addError()
Add the new error report to be generated if the constraint validator mark the value as invalid. Methods of the ErrorBuilder instance this object comes from and the error builder nested objects returns IllegalStateException after this call.

Returns:
ConstraintValidatorContext instance the ErrorBuilder comes from


Copyright © 2007-2009. All Rights Reserved.