public interface ItemStateFactory
ItemStateFactory
provides methods to create child
NodeState
s and PropertyState
s for a given
NodeState
.Modifier and Type | Method and Description |
---|---|
void |
addCreationListener(ItemStateCreationListener listener)
Adds the given
ItemStateCreationListener . |
NodeState |
createDeepNodeState(NodeId nodeId,
NodeEntry anyParent)
Tries to retrieve the
NodeState with the given NodeId
and if the state exists, fills in the NodeEntries missing between the
last known NodeEntry marked by anyParent . |
PropertyState |
createDeepPropertyState(PropertyId propertyId,
NodeEntry anyParent)
Tries to retrieve the
PropertyState with the given PropertyId
and if the state exists, fills in the HierarchyEntries missing between the
last known NodeEntry marked by anyParent . |
NodeState |
createNodeState(NodeId nodeId,
NodeEntry entry)
Creates the child
NodeState with the given
nodeId . |
PropertyState |
createPropertyState(PropertyId propertyId,
PropertyEntry entry)
Creates the
PropertyState with the given
propertyId . |
NodeState |
createRootState(NodeEntry entry) |
Iterator<ChildInfo> |
getChildNodeInfos(NodeId nodeId)
Returns an Iterator over
ChildInfo s for the given NodeState . |
Iterator<PropertyId> |
getNodeReferences(NodeState nodeState,
Name propertyName,
boolean weak)
Returns the identifiers of all reference properties that point to
the given node.
|
void |
removeCreationListener(ItemStateCreationListener listener)
Removes the given
ItemStateCreationListener . |
NodeState createRootState(NodeEntry entry) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
entry
- javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
NodeState createNodeState(NodeId nodeId, NodeEntry entry) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
NodeState
with the given
nodeId
.nodeId
- the id of the NodeState
to create.entry
- the HierarchyEntry
the new state should
be attached to.NodeState
.javax.jcr.ItemNotFoundException
- if there is no such NodeState
.javax.jcr.RepositoryException
- if an error occurs while retrieving the NodeState
.NodeState createDeepNodeState(NodeId nodeId, NodeEntry anyParent) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
NodeState
with the given NodeId
and if the state exists, fills in the NodeEntries missing between the
last known NodeEntry marked by anyParent
.nodeId
- anyParent
- NodeState
.javax.jcr.ItemNotFoundException
- if there is no such NodeState
.javax.jcr.RepositoryException
- if an error occurs while retrieving the NodeState
.PropertyState createPropertyState(PropertyId propertyId, PropertyEntry entry) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
PropertyState
with the given
propertyId
.propertyId
- the id of the PropertyState
to create.entry
- the HierarchyEntry
the new state should
be attached to.PropertyState
.javax.jcr.ItemNotFoundException
- if there is no such PropertyState
.javax.jcr.RepositoryException
- if an error occurs while retrieving the
PropertyState
.PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
PropertyState
with the given PropertyId
and if the state exists, fills in the HierarchyEntries missing between the
last known NodeEntry marked by anyParent
.propertyId
- anyParent
- javax.jcr.ItemNotFoundException
- if there is no such NodeState
.javax.jcr.RepositoryException
- if an error occurs while retrieving the NodeState
.Iterator<ChildInfo> getChildNodeInfos(NodeId nodeId) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
ChildInfo
s for the given NodeState
.nodeId
- javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
Iterator<PropertyId> getNodeReferences(NodeState nodeState, Name propertyName, boolean weak)
nodeState
- reference targetpropertyName
- weak
- Boolean flag indicating whether weak references should be
returned or not.void addCreationListener(ItemStateCreationListener listener)
ItemStateCreationListener
.listener
- void removeCreationListener(ItemStateCreationListener listener)
ItemStateCreationListener
.listener
- Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.