Class WorkspaceItemStateFactory
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory
-
- org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory
-
- All Implemented Interfaces:
ItemStateFactory
public class WorkspaceItemStateFactory extends AbstractItemStateFactory
WorkspaceItemStateFactory...
-
-
Constructor Summary
Constructors Constructor Description WorkspaceItemStateFactory(RepositoryService service, SessionInfo sessionInfo, ItemDefinitionProvider definitionProvider, ItemInfoCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeStatecreateDeepNodeState(NodeId nodeId, NodeEntry anyParent)Creates the node with information retrieved from theRepositoryService.PropertyStatecreateDeepPropertyState(PropertyId propertyId, NodeEntry anyParent)Creates the PropertyState with information retrieved from theRepositoryService.NodeStatecreateNodeState(NodeId nodeId, NodeEntry entry)Creates the node with information retrieved from theRepositoryService.PropertyStatecreatePropertyState(PropertyId propertyId, PropertyEntry entry)Creates the PropertyState with information retrieved from theRepositoryService.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.-
Methods inherited from class org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory
addCreationListener, removeCreationListener
-
-
-
-
Constructor Detail
-
WorkspaceItemStateFactory
public WorkspaceItemStateFactory(RepositoryService service, SessionInfo sessionInfo, ItemDefinitionProvider definitionProvider, ItemInfoCache cache)
-
-
Method Detail
-
createRootState
public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException
- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException
-
createNodeState
public NodeState createNodeState(NodeId nodeId, NodeEntry entry) throws ItemNotFoundException, RepositoryException
Creates the node with information retrieved from theRepositoryService.- 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
public NodeState createDeepNodeState(NodeId nodeId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Creates the node with information retrieved from theRepositoryService. Intermediate entries are created as needed.- Returns:
- the created
NodeState. - Throws:
ItemNotFoundException- if there is no suchNodeState.RepositoryException- if an error occurs while retrieving theNodeState.
-
createPropertyState
public PropertyState createPropertyState(PropertyId propertyId, PropertyEntry entry) throws ItemNotFoundException, RepositoryException
Creates the PropertyState with information retrieved from theRepositoryService.- 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
public PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent) throws RepositoryException
Creates the PropertyState with information retrieved from theRepositoryService. Intermediate entries are created as needed.- Returns:
- Throws:
ItemNotFoundException- if there is no suchNodeState.RepositoryException- if an error occurs while retrieving theNodeState.
-
getChildNodeInfos
public Iterator<ChildInfo> getChildNodeInfos(NodeId nodeId) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactoryReturns an Iterator overChildInfos for the givenNodeState.
-
getNodeReferences
public Iterator<PropertyId> getNodeReferences(NodeState nodeState, Name propertyName, boolean weak)
Description copied from interface:ItemStateFactoryReturns the identifiers of all reference properties that point to the given node.- Parameters:
nodeState- reference targetweak- Boolean flag indicating whether weak references should be returned or not.- Returns:
- reference property identifiers
-
-