org.apache.jackrabbit.commons.flat
Interface NodeSequence

All Superinterfaces:
Iterable<Node>, Sequence<Node>
All Known Implementing Classes:
ItemSequence.NodeSequenceImpl

public interface NodeSequence
extends Sequence<Node>

Extension of Sequence<Node> which provides methods for adding and removing nodes by key.


Method Summary
 Node addNode(String key, String primaryNodeTypeName)
          Add a with the given key and primary node type name.
 void removeNode(String key)
          Remove the node with the given key.
 
Methods inherited from interface org.apache.jackrabbit.commons.flat.Sequence
getItem, hasItem, iterator
 

Method Detail

addNode

Node addNode(String key,
             String primaryNodeTypeName)
             throws RepositoryException
Add a with the given key and primary node type name.

Parameters:
key - key of the node to add
primaryNodeTypeName - primary node type of the node to add
Returns:
the newly added node
Throws:
RepositoryException

removeNode

void removeNode(String key)
                throws RepositoryException
Remove the node with the given key.

Parameters:
key - The key of the node to remove
Throws:
RepositoryException - If there is no node with such a key or another error occurs.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.