org.apache.jackrabbit.jcr2spi.state
Class WorkspaceItemStateFactory

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory
      extended by org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory
All Implemented Interfaces:
ItemStateFactory

public class WorkspaceItemStateFactory
extends AbstractItemStateFactory

WorkspaceItemStateFactory...


Constructor Summary
WorkspaceItemStateFactory(org.apache.jackrabbit.spi.RepositoryService service, org.apache.jackrabbit.spi.SessionInfo sessionInfo, ItemDefinitionProvider definitionProvider, org.apache.jackrabbit.spi.ItemInfoCache cache)
           
 
Method Summary
 NodeState createDeepNodeState(org.apache.jackrabbit.spi.NodeId nodeId, NodeEntry anyParent)
          Creates the node with information retrieved from the RepositoryService.
 PropertyState createDeepPropertyState(org.apache.jackrabbit.spi.PropertyId propertyId, NodeEntry anyParent)
          Creates the PropertyState with information retrieved from the RepositoryService.
 NodeState createNodeState(org.apache.jackrabbit.spi.NodeId nodeId, NodeEntry entry)
          Creates the node with information retrieved from the RepositoryService.
 PropertyState createPropertyState(org.apache.jackrabbit.spi.PropertyId propertyId, PropertyEntry entry)
          Creates the PropertyState with information retrieved from the RepositoryService.
 NodeState createRootState(NodeEntry entry)
           
 Iterator<org.apache.jackrabbit.spi.ChildInfo> getChildNodeInfos(org.apache.jackrabbit.spi.NodeId nodeId)
          Returns an Iterator over ChildInfos for the given NodeState.
 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.
 
Methods inherited from class org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory
addCreationListener, removeCreationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceItemStateFactory

public WorkspaceItemStateFactory(org.apache.jackrabbit.spi.RepositoryService service,
                                 org.apache.jackrabbit.spi.SessionInfo sessionInfo,
                                 ItemDefinitionProvider definitionProvider,
                                 org.apache.jackrabbit.spi.ItemInfoCache cache)
Method Detail

createRootState

public NodeState createRootState(NodeEntry entry)
                          throws ItemNotFoundException,
                                 RepositoryException
Returns:
Throws:
ItemNotFoundException
RepositoryException

createNodeState

public NodeState createNodeState(org.apache.jackrabbit.spi.NodeId nodeId,
                                 NodeEntry entry)
                          throws ItemNotFoundException,
                                 RepositoryException
Creates the node with information retrieved from the RepositoryService.

Parameters:
nodeId - the id of the NodeState to create.
entry - the HierarchyEntry the new state should be attached to.
Returns:
the created NodeState.
Throws:
ItemNotFoundException - if there is no such NodeState.
RepositoryException - if an error occurs while retrieving the NodeState.

createDeepNodeState

public NodeState createDeepNodeState(org.apache.jackrabbit.spi.NodeId nodeId,
                                     NodeEntry anyParent)
                              throws ItemNotFoundException,
                                     RepositoryException
Creates the node with information retrieved from the RepositoryService. Intermediate entries are created as needed.

Returns:
the created NodeState.
Throws:
ItemNotFoundException - if there is no such NodeState.
RepositoryException - if an error occurs while retrieving the NodeState.

createPropertyState

public PropertyState createPropertyState(org.apache.jackrabbit.spi.PropertyId propertyId,
                                         PropertyEntry entry)
                                  throws ItemNotFoundException,
                                         RepositoryException
Creates the PropertyState with information retrieved from the RepositoryService.

Parameters:
propertyId - the id of the PropertyState to create.
entry - the HierarchyEntry the new state should be attached to.
Returns:
the created PropertyState.
Throws:
ItemNotFoundException - if there is no such PropertyState.
RepositoryException - if an error occurs while retrieving the PropertyState.

createDeepPropertyState

public PropertyState createDeepPropertyState(org.apache.jackrabbit.spi.PropertyId propertyId,
                                             NodeEntry anyParent)
                                      throws RepositoryException
Creates the PropertyState with information retrieved from the RepositoryService. Intermediate entries are created as needed.

Returns:
Throws:
ItemNotFoundException - if there is no such NodeState.
RepositoryException - if an error occurs while retrieving the NodeState.

getChildNodeInfos

public Iterator<org.apache.jackrabbit.spi.ChildInfo> getChildNodeInfos(org.apache.jackrabbit.spi.NodeId nodeId)
                                                                throws ItemNotFoundException,
                                                                       RepositoryException
Description copied from interface: ItemStateFactory
Returns an Iterator over ChildInfos for the given NodeState.

Throws:
ItemNotFoundException
RepositoryException

getNodeReferences

public Iterator<org.apache.jackrabbit.spi.PropertyId> getNodeReferences(NodeState nodeState,
                                                                        org.apache.jackrabbit.spi.Name propertyName,
                                                                        boolean weak)
Description copied from interface: ItemStateFactory
Returns the identifiers of all reference properties that point to the given node.

Parameters:
nodeState - reference target
weak - Boolean flag indicating whether weak references should be returned or not.
Returns:
reference property identifiers


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.