public abstract class ItemSequence
extends java.lang.Object
This class serves as main entry point for obtaining sequences of Node
s and Property
s. It provides factory methods for creating
NodeSequence
s and PropertySequence
s.
NodeSequence and PropertySequence instances provide a flat representation of a JCR hierarchy rooted at a certain node. They allow iterating over all items, retrieving items by key, checking whether a given key is mapped, adding new items and removing existing items.
The specifics of the mapping from the flat representation to the JCR
hierarchy are delegated to a TreeManager
. Particularly the
TreeManager specifies the order of the items when retrieved as sequence and
when and how to add and remove intermediate nodes when new items are inserted
or removed.
An TreeTraverser.ErrorHandler
is used to handle exceptions which occur while
traversing the hierarchy.
TreeTraverser
,
NodeSequence
,
PropertySequence
,
TreeManager
Modifier and Type | Method and Description |
---|---|
static NodeSequence |
createNodeSequence(TreeManager treeManager)
Create a new
NodeSequence instance. |
static NodeSequence |
createNodeSequence(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler)
Create a new
NodeSequence instance. |
static PropertySequence |
createPropertySequence(TreeManager treeManager)
Create a new
PropertySequence instance. |
static PropertySequence |
createPropertySequence(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler)
Create a new
PropertySequence instance. |
NodeSequence |
getNodeSequence()
Create a new
NodeSequence instance with the same parameterization
as this instance. |
PropertySequence |
getPropertySequence()
Create a new
PropertySequence instance with the same
parametrization as this instance. |
public static NodeSequence createNodeSequence(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
NodeSequence
instance.treeManager
- The TreeManager
for managing the mapping
between the sequence view and the JCR hierarchy.errorHandler
- The TreeTraverser.ErrorHandler
for handling exceptions
occurring whilepublic static NodeSequence createNodeSequence(TreeManager treeManager)
NodeSequence
instance.treeManager
- The TreeManager
for managing the mapping
between the sequence view and the JCR hierarchy.public static PropertySequence createPropertySequence(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
PropertySequence
instance.treeManager
- The TreeManager
for managing the mapping
between the sequence view and the JCR hierarchy.errorHandler
- The TreeTraverser.ErrorHandler
for handling exceptions
occurring whilepublic static PropertySequence createPropertySequence(TreeManager treeManager)
PropertySequence
instance.treeManager
- The TreeManager
for managing the mapping
between the sequence view and the JCR hierarchy.public NodeSequence getNodeSequence()
NodeSequence
instance with the same parameterization
as this instance.public PropertySequence getPropertySequence()
PropertySequence
instance with the same
parametrization as this instance.Copyright © 2010 - 2020 Adobe. All Rights Reserved