Spec-Zone .ru
спецификации, руководства, описания, API


javax.validation
Интерфейс ConstraintValidatorContext.ConstraintViolationBuilder

Включение интерфейса:
ConstraintValidatorContext

public static interface ConstraintValidatorContext.ConstraintViolationBuilder

ConstraintViolation разработчик, позволяющий дополнительно связать отчет нарушения к sub пути. Создать ConstraintViolation, нужно вызвать любой #addConstraintViolation () методы, доступные в одном из интерфейсов быстрого API. Если другой метод вызывают после #addConstraintViolation () на ConstraintViolationBuilder или любой из его связанных объектов IllegalStateException повышается.


Вложенная Сводка Класса
static interface ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext
          Представьте узел, контекст которого конфигурируем (то есть индексируйте, ключ и isInIterable),
static interface ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext
          Представьте узел, контекст которого известен (то есть индексируйте, ключ и isInIterable),
static interface ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder
          Представьте варианты усовершенствования для узла, который находится в Iterator or Map.
 
Method Summary
 ConstraintValidatorContext addConstraintViolation()
          Add the new ConstraintViolation to be generated if the constraint validator marks the value as invalid.
 ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext addNode(java.lang.String name)
          Add a node to the path the ConstraintViolation will be associated to.
 

Method Detail

addNode

ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext addNode(java.lang.String name)
Add a node to the path the ConstraintViolation will be associated to. name describes a single property. In particular, dot (.) is not allowed.

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

addConstraintViolation

ConstraintValidatorContext addConstraintViolation()
Add the new ConstraintViolation to be generated if the constraint validator marks the value as invalid. Methods of this ConstraintViolationBuilder instance and its nested objects return IllegalStateException from now on.

Returns:
the ConstraintValidatorContext instance the ConstraintViolationBuilder comes from


Представьте ошибку или функцию

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41

free hit counter