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 ItemNotFoundException, RepositoryException
entry
- ItemNotFoundException
RepositoryException
NodeState createNodeState(NodeId nodeId, NodeEntry entry) throws ItemNotFoundException, 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
.ItemNotFoundException
- if there is no such NodeState
.RepositoryException
- if an error occurs while retrieving the NodeState
.NodeState createDeepNodeState(NodeId nodeId, NodeEntry anyParent) throws ItemNotFoundException, 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
.ItemNotFoundException
- if there is no such NodeState
.RepositoryException
- if an error occurs while retrieving the NodeState
.PropertyState createPropertyState(PropertyId propertyId, PropertyEntry entry) throws ItemNotFoundException, 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
.ItemNotFoundException
- if there is no such PropertyState
.RepositoryException
- if an error occurs while retrieving the
PropertyState
.PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent) throws ItemNotFoundException, 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
- ItemNotFoundException
- if there is no such NodeState
.RepositoryException
- if an error occurs while retrieving the NodeState
.Iterator<ChildInfo> getChildNodeInfos(NodeId nodeId) throws ItemNotFoundException, RepositoryException
ChildInfo
s for the given NodeState
.nodeId
- ItemNotFoundException
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–2024 The Apache Software Foundation. All rights reserved.