Packageorg.granite.validation
Interfacepublic interface ITraversableResolver
ImplementorsDefaultTraversableResolver

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.



Public Methods
 MethodDefined by
  
isCascadable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean
Determine if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as [Valid].
ITraversableResolver
  
isReachable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean
Determine if the Bean Validation provider is allowed to reach the property state
ITraversableResolver
Method detail
isCascadable()method
public function isCascadable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean

Determine 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 if isReachable returns true for the same set of arguments and if the property is marked as [Valid]

Parameters
traversableObject:Object — object hosting traversableProperty or null if validateValue is called
 
traversableProperty:INode — the traversable property.
 
rootBeanType:Type — type of the root object passed to the Validator.
 
pathToTraversableObject:IPath — path from the root object to traversableObject (using the path specification defined by Bean Validator).
 
elementType:IAnnotatedElement — either FIELD or METHOD.

Returns
Booleantrue if the Bean Validation provider is allowed to cascade validation, false otherwise.
isReachable()method 
public function isReachable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean

Determine if the Bean Validation provider is allowed to reach the property state

Parameters
traversableObject:Object — object hosting traversableProperty or null if validateValue is called
 
traversableProperty:INode — the traversable property.
 
rootBeanType:Type — type of the root object passed to the Validator.
 
pathToTraversableObject:IPath — path from the root object to traversableObject (using the path specification defined by Bean Validator).
 
elementType:IAnnotatedElement — either FIELD or METHOD.

Returns
Booleantrue if the Bean Validation provider is allowed to reach the property state, false otherwise.