org.loom.binding
Class SimpleNode

java.lang.Object
  extended by org.loom.binding.Node
      extended by org.loom.binding.SimpleNode

public class SimpleNode
extends Node

A node that is a simple property with a single value


Constructor Summary
SimpleNode()
           
 
Method Summary
protected  void applyValidationImpl(java.lang.Object container, ValidationRequest request)
          Applies a validation.
 java.lang.Object getValue(java.lang.Object container, java.lang.String[] propertyPath, int propertyIndex)
          Gets the value of the property at the end of this chain
 void setValue(java.lang.Object container, java.lang.Object value, java.lang.String[] propertyPath, int index)
          Sets a value to the property at the end of this chain
 
Methods inherited from class org.loom.binding.Node
applyValidation, getChild, getIndex, getIndexAsInt, getNextNodeClass, getPropertyName, getPropertyWrapper, isLeaf, setChild, setPropertyWrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleNode

public SimpleNode()
Method Detail

setValue

public void setValue(java.lang.Object container,
                     java.lang.Object value,
                     java.lang.String[] propertyPath,
                     int index)
Description copied from class: Node
Sets a value to the property at the end of this chain

Specified by:
setValue in class Node
Parameters:
container - The current property node (starts at the root of the chain)
value - the value to assign
index - the current index inside the property chain

getValue

public java.lang.Object getValue(java.lang.Object container,
                                 java.lang.String[] propertyPath,
                                 int propertyIndex)
Description copied from class: Node
Gets the value of the property at the end of this chain

Specified by:
getValue in class Node
Parameters:
container - The current property node (starts at the root of the chain)
propertyPath - the full path to the requested property
propertyIndex - the current index inside the property chain
Returns:
the value at the end of this chain, may be null

applyValidationImpl

protected void applyValidationImpl(java.lang.Object container,
                                   ValidationRequest request)
Description copied from class: Node
Applies a validation. If there is more than one value involved in this validation (i.e. lists, maps, or arrays), validates every node.

Specified by:
applyValidationImpl in class Node
Parameters:
container - the container where to apply this validation. It cannot be null.
request - the validation to be performed