consciouscode.seedling.tree
Interface NodeProvider

All Known Implementing Classes:
ConfigBasedNodeProvider

public interface NodeProvider

Provisions new nodes for branches within a Seedling container.

A single NodeProvider can be shared by many branches.


Method Summary
 void collectAvailableNodeNames(String branchPath, Collection<String> names)
          Builds a collection of the names of child nodes that are available for provisioning by this NodeProvider.
 Object provisionNode(NodeLocation location)
          Provisions a child of a given branch.
 

Method Detail

provisionNode

Object provisionNode(NodeLocation location)
                     throws NodeProvisioningException
Provisions a child of a given branch. This is usually, but not necessarily, a new instance.

Parameters:
location - identifies where the node will be located.
Returns:
the provisioned node, or null if there's no such node available.
Throws:
NodeProvisioningException

collectAvailableNodeNames

void collectAvailableNodeNames(String branchPath,
                               Collection<String> names)
Builds a collection of the names of child nodes that are available for provisioning by this NodeProvider.

Parameters:
branchPath - indicates the branch for which child names are collected.
names - the collection into which child names will be added by this method. Must not be null.


Copyright © 2001–2012 Todd V. Jonker. All Rights Reserved.