Interface ItemStateFactory
-
- All Known Subinterfaces:
TransientItemStateFactory
- All Known Implementing Classes:
AbstractItemStateFactory
,TransientISFactory
,WorkspaceItemStateFactory
public interface ItemStateFactory
ItemStateFactory
provides methods to create childNodeState
s andPropertyState
s for a givenNodeState
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCreationListener(ItemStateCreationListener listener)
Adds the givenItemStateCreationListener
.NodeState
createDeepNodeState(NodeId nodeId, NodeEntry anyParent)
Tries to retrieve theNodeState
with the givenNodeId
and if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked byanyParent
.PropertyState
createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent)
Tries to retrieve thePropertyState
with the givenPropertyId
and if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked byanyParent
.NodeState
createNodeState(NodeId nodeId, NodeEntry entry)
Creates the childNodeState
with the givennodeId
.PropertyState
createPropertyState(PropertyId propertyId, PropertyEntry entry)
Creates thePropertyState
with the givenpropertyId
.NodeState
createRootState(NodeEntry entry)
Iterator<ChildInfo>
getChildNodeInfos(NodeId nodeId)
Returns an Iterator overChildInfo
s for the givenNodeState
.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 givenItemStateCreationListener
.
-
-
-
Method Detail
-
createRootState
NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException
- Parameters:
entry
-- Returns:
- Throws:
ItemNotFoundException
RepositoryException
-
createNodeState
NodeState createNodeState(NodeId nodeId, NodeEntry entry) throws ItemNotFoundException, RepositoryException
Creates the childNodeState
with the givennodeId
.- Parameters:
nodeId
- the id of theNodeState
to create.entry
- theHierarchyEntry
the new state should be attached to.- Returns:
- the created
NodeState
. - Throws:
ItemNotFoundException
- if there is no suchNodeState
.RepositoryException
- if an error occurs while retrieving theNodeState
.
-
createDeepNodeState
NodeState createDeepNodeState(NodeId nodeId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Tries to retrieve theNodeState
with the givenNodeId
and if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked byanyParent
.- Parameters:
nodeId
-anyParent
-- Returns:
- the created
NodeState
. - Throws:
ItemNotFoundException
- if there is no suchNodeState
.RepositoryException
- if an error occurs while retrieving theNodeState
.
-
createPropertyState
PropertyState createPropertyState(PropertyId propertyId, PropertyEntry entry) throws ItemNotFoundException, RepositoryException
Creates thePropertyState
with the givenpropertyId
.- Parameters:
propertyId
- the id of thePropertyState
to create.entry
- theHierarchyEntry
the new state should be attached to.- Returns:
- the created
PropertyState
. - Throws:
ItemNotFoundException
- if there is no suchPropertyState
.RepositoryException
- if an error occurs while retrieving thePropertyState
.
-
createDeepPropertyState
PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Tries to retrieve thePropertyState
with the givenPropertyId
and if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked byanyParent
.- Parameters:
propertyId
-anyParent
-- Returns:
- Throws:
ItemNotFoundException
- if there is no suchNodeState
.RepositoryException
- if an error occurs while retrieving theNodeState
.
-
getChildNodeInfos
Iterator<ChildInfo> getChildNodeInfos(NodeId nodeId) throws ItemNotFoundException, RepositoryException
Returns an Iterator overChildInfo
s for the givenNodeState
.- Parameters:
nodeId
-- Throws:
ItemNotFoundException
RepositoryException
-
getNodeReferences
Iterator<PropertyId> getNodeReferences(NodeState nodeState, Name propertyName, boolean weak)
Returns the identifiers of all reference properties that point to the given node.- Parameters:
nodeState
- reference targetpropertyName
-weak
- Boolean flag indicating whether weak references should be returned or not.- Returns:
- reference property identifiers
-
addCreationListener
void addCreationListener(ItemStateCreationListener listener)
Adds the givenItemStateCreationListener
.- Parameters:
listener
-
-
removeCreationListener
void removeCreationListener(ItemStateCreationListener listener)
Removes the givenItemStateCreationListener
.- Parameters:
listener
-
-
-