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(org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.NodeId nodeId, NodeEntry entry)Creates the childNodeStatewith the givennodeId.PropertyStatecreatePropertyState(org.apache.jackrabbit.spi.PropertyId propertyId, PropertyEntry entry)Creates thePropertyStatewith the givenpropertyId.NodeStatecreateRootState(NodeEntry entry)Iterator<org.apache.jackrabbit.spi.ChildInfo>getChildNodeInfos(org.apache.jackrabbit.spi.NodeId nodeId)Returns an Iterator overChildInfos for the givenNodeState.Iterator<org.apache.jackrabbit.spi.PropertyId>getNodeReferences(NodeState nodeState, org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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<org.apache.jackrabbit.spi.ChildInfo> getChildNodeInfos(org.apache.jackrabbit.spi.NodeId nodeId) throws ItemNotFoundException, RepositoryException
Returns an Iterator overChildInfos for the givenNodeState.- Parameters:
nodeId-- Throws:
ItemNotFoundExceptionRepositoryException
-
getNodeReferences
Iterator<org.apache.jackrabbit.spi.PropertyId> getNodeReferences(NodeState nodeState, org.apache.jackrabbit.spi.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-
-
-