org.oddjob.arooa.runtime
Interface ConfigurationNode

All Superinterfaces:
ArooaConfiguration
All Known Implementing Classes:
AbstractConfigurationNode, XMLConfigurationNode

public interface ConfigurationNode
extends ArooaConfiguration

Encapsulates structure and values of a configuration. It must preserve enough information so that it can also be an ArooaConfiguration.

Author:
rob

Method Summary
 void addNodeListener(ConfigurationNodeListener listener)
          Add a RuntimeNodeListener.
 void addText(String text)
          Add text to the node.
 ArooaContext getContext()
          Get the associated ArooaContext for this node.
 int indexOf(ConfigurationNode child)
          Get the index of a child RuntimeNode.
 int insertChild(ConfigurationNode child)
          Insert a child in the parse Tree.
 void removeChild(int index)
          Remove a child.
 void removeNodeListener(ConfigurationNodeListener listener)
          Remove a RuntimeNodeListener.
 void setInsertPosition(int insertAt)
          Set the position for the next inserted node.
 
Methods inherited from interface org.oddjob.arooa.ArooaConfiguration
parse
 

Method Detail

getContext

ArooaContext getContext()
Get the associated ArooaContext for this node.

Returns:
The ArooaContext. Never null.

addNodeListener

void addNodeListener(ConfigurationNodeListener listener)
Add a RuntimeNodeListener.

Parameters:
listener -

removeNodeListener

void removeNodeListener(ConfigurationNodeListener listener)
Remove a RuntimeNodeListener.

Parameters:
listener -

setInsertPosition

void setInsertPosition(int insertAt)
Set the position for the next inserted node.

Parameters:
insertAt - The position.

insertChild

int insertChild(ConfigurationNode child)
Insert a child in the parse Tree.

Parameters:
child - The child. Must not be null.
Returns:
The insert position.

removeChild

void removeChild(int index)
Remove a child.

Parameters:
index - The index at which to remove the child.

addText

void addText(String text)
Add text to the node.

Parameters:
text -

indexOf

int indexOf(ConfigurationNode child)
Get the index of a child RuntimeNode. This is required for lists who's indexes may change as nodes are inserted and deleted.

Parameters:
child - The child node whose index is to be determined.
Returns:
The index, or -1 if the node is not a child.