javax.validation
Interface ValidatorContext


public interface ValidatorContext

Represents the context that is used to create Validator instances. A client may use methods of the ValidatorContext returned through usingContext of ValidatorFactory to customize the context (for instance establish different message interpolators or traversable resolvers) used to create Validator instances.

Author:
Emmanuel Bernard

Method Summary
 Validator getValidator()
           
 ValidatorContext messageInterpolator(MessageInterpolator messageInterpolator)
          Defines the message interpolator implementation used by the Validator.
 ValidatorContext traversableResolver(TraversableResolver traversableResolver)
          Defines the traversable resolver implementation used by the Validator.
 

Method Detail

messageInterpolator

ValidatorContext messageInterpolator(MessageInterpolator messageInterpolator)
Defines the message interpolator implementation used by the Validator. If not set or if null is passed as a parameter, the message interpolator of the ValidatorFactory is used.

Returns:
self following the chaining method pattern

traversableResolver

ValidatorContext traversableResolver(TraversableResolver traversableResolver)
Defines the traversable resolver implementation used by the Validator. If not set or if null is passed as a parameter, the traversable resolver of the ValidatorFactory is used.

Returns:
self following the chaining method pattern

getValidator

Validator getValidator()
Returns:
an initialized Validator instance respecting the defined state. Validator instances can be pooled and shared by the implementation.


Copyright © 2007-2009. All Rights Reserved.