Interface ItemStateFactory
- 
- All Known Subinterfaces:
 TransientItemStateFactory
- All Known Implementing Classes:
 AbstractItemStateFactory,TransientISFactory,WorkspaceItemStateFactory
public interface ItemStateFactoryItemStateFactoryprovides methods to create childNodeStates andPropertyStates for a givenNodeState. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCreationListener(ItemStateCreationListener listener)Adds the givenItemStateCreationListener.NodeStatecreateDeepNodeState(NodeId nodeId, NodeEntry anyParent)Tries to retrieve theNodeStatewith the givenNodeIdand if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked byanyParent.PropertyStatecreateDeepPropertyState(PropertyId propertyId, NodeEntry anyParent)Tries to retrieve thePropertyStatewith the givenPropertyIdand if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked byanyParent.NodeStatecreateNodeState(NodeId nodeId, NodeEntry entry)Creates the childNodeStatewith the givennodeId.PropertyStatecreatePropertyState(PropertyId propertyId, PropertyEntry entry)Creates thePropertyStatewith the givenpropertyId.NodeStatecreateRootState(NodeEntry entry)Iterator<ChildInfo>getChildNodeInfos(NodeId nodeId)Returns an Iterator overChildInfos 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.voidremoveCreationListener(ItemStateCreationListener listener)Removes the givenItemStateCreationListener. 
 - 
 
- 
- 
Method Detail
- 
createRootState
NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException
- Parameters:
 entry-- Returns:
 - Throws:
 ItemNotFoundExceptionRepositoryException
 
- 
createNodeState
NodeState createNodeState(NodeId nodeId, NodeEntry entry) throws ItemNotFoundException, RepositoryException
Creates the childNodeStatewith the givennodeId.- Parameters:
 nodeId- the id of theNodeStateto create.entry- theHierarchyEntrythe 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 theNodeStatewith the givenNodeIdand 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 thePropertyStatewith the givenpropertyId.- Parameters:
 propertyId- the id of thePropertyStateto create.entry- theHierarchyEntrythe 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 thePropertyStatewith the givenPropertyIdand 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 overChildInfos for the givenNodeState.- Parameters:
 nodeId-- Throws:
 ItemNotFoundExceptionRepositoryException
 
- 
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-
 
 - 
 
 -