-
public interface TraversableResolver
Contract determining if a property can be accessed by the Bean Validation provider. This contract is called for each property that is being either validated or cascaded. A traversable resolver implementation must be thread-safe.- Author:
- Emmanuel Bernard
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description boolean
isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType)
Determines if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as@Valid
.boolean
isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType)
Determines if the Bean Validation provider is allowed to reach the property state.
-
-
-
Method Detail
-
isReachable
boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType)
Determines if the Bean Validation provider is allowed to reach the property state.- Parameters:
traversableObject
- object hostingtraversableProperty
ornull
ifvalidateValue
is calledtraversableProperty
- the traversable propertyrootBeanType
- type of the root object passed to the Validator or hosting the method or constructor validatedpathToTraversableObject
- path from the root object totraversableObject
(using the path specification defined by Bean Validator)elementType
- eitherFIELD
orMETHOD
- Returns:
true
if the Bean Validation provider is allowed to reach the property state,false
otherwise
-
isCascadable
boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType)
Determines if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as@Valid
. Note that this method is called only ifisReachable(Object, javax.validation.Path.Node, Class, Path, java.lang.annotation.ElementType)
returnstrue
for the same set of arguments and if the property is marked asValid
.- Parameters:
traversableObject
- object hostingtraversableProperty
ornull
ifvalidateValue
is calledtraversableProperty
- the traversable propertyrootBeanType
- type of the root object passed to the Validator or hosting the method or constructor validatedpathToTraversableObject
- path from the root object totraversableObject
(using the path specification defined by Bean Validator)elementType
- eitherFIELD
orMETHOD
- Returns:
true
if the Bean Validation provider is allowed to cascade validation,false
otherwise
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 18:31:05 Cette version de la page est en cache (à la date du 21/08/2025 18:31:05) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/validation/traversableresolver.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.