org.apache.jackrabbit.mk.model
Interface NodeStore


public interface NodeStore

Storage abstraction for content trees. At any given point in time the stored content tree is rooted at a single immutable node state. Changes in the tree are constructed using NodeBuilder instances based on the root and other node states in the tree. The state of the entire tree can then be changed by setting the resulting modified root node state as the new root of the tree.

This is a low-level interface that doesn't cover functionality like merging concurrent changes or rejecting new tree states based on some higher-level consistency constraints.


Method Summary
 NodeBuilder getNodeBuilder(NodeState base)
          Returns a builder for constructing a new or modified node state.
 NodeState getRoot()
          Returns the latest state of the content tree.
 void setRoot(NodeState newRoot)
          Updates the state of the content tree.
 

Method Detail

getRoot

NodeState getRoot()
Returns the latest state of the content tree.

Returns:
root node state

setRoot

void setRoot(NodeState newRoot)
Updates the state of the content tree.

Parameters:
newRoot - new root node state

getNodeBuilder

NodeBuilder getNodeBuilder(NodeState base)
Returns a builder for constructing a new or modified node state. The builder is initialized with all the properties and child nodes from the given base node state, or with no properties or child nodes if no base node state is given.

Parameters:
base - base node state, or null to construct a new node state
Returns:
builder instance


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.