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
implements ItemStateFactory

WorkspaceItemStateFactory...


Constructor Summary
WorkspaceItemStateFactory(RepositoryService service, SessionInfo sessionInfo, ItemDefinitionProvider definitionProvider)
           
 
Method Summary
 NodeState createDeepNodeState(NodeId nodeId, NodeEntry anyParent)
          Tries to retrieve the NodeState with the given NodeId and if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked by anyParent.
 PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent)
          Tries to retrieve the PropertyState with the given PropertyId and if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked by anyParent.
 NodeState createNodeState(NodeId nodeId, NodeEntry entry)
          Creates the node with information retrieved from the RepositoryService.
 PropertyState createPropertyState(PropertyId propertyId, PropertyEntry entry)
          Creates the PropertyState with information retrieved from the RepositoryService.
 NodeState createRootState(NodeEntry entry)
           
 Iterator getChildNodeInfos(NodeId nodeId)
          Returns an Iterator over ChildInfos for the given NodeState.
 PropertyId[] getNodeReferences(NodeState nodeState)
          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
 
Methods inherited from interface org.apache.jackrabbit.jcr2spi.state.ItemStateFactory
addCreationListener, removeCreationListener
 

Constructor Detail

WorkspaceItemStateFactory

public WorkspaceItemStateFactory(RepositoryService service,
                                 SessionInfo sessionInfo,
                                 ItemDefinitionProvider definitionProvider)
Method Detail

createRootState

public NodeState createRootState(NodeEntry entry)
                          throws ItemNotFoundException,
                                 RepositoryException
Specified by:
createRootState in interface ItemStateFactory
Returns:
Throws:
ItemNotFoundException
RepositoryException
See Also:
ItemStateFactory.createRootState(NodeEntry)

createNodeState

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

Specified by:
createNodeState in interface ItemStateFactory
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.
See Also:
ItemStateFactory.createNodeState(NodeId,NodeEntry)

createDeepNodeState

public NodeState createDeepNodeState(NodeId nodeId,
                                     NodeEntry anyParent)
                              throws ItemNotFoundException,
                                     RepositoryException
Description copied from interface: ItemStateFactory
Tries to retrieve the NodeState with the given NodeId and if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked by anyParent.

Specified by:
createDeepNodeState in interface ItemStateFactory
Returns:
the created NodeState.
Throws:
ItemNotFoundException - if there is no such NodeState.
RepositoryException - if an error occurs while retrieving the NodeState.
See Also:
ItemStateFactory.createDeepNodeState(NodeId,NodeEntry)

createPropertyState

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

Specified by:
createPropertyState in interface ItemStateFactory
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.
See Also:
ItemStateFactory.createPropertyState(PropertyId,PropertyEntry)

createDeepPropertyState

public PropertyState createDeepPropertyState(PropertyId propertyId,
                                             NodeEntry anyParent)
                                      throws ItemNotFoundException,
                                             RepositoryException
Description copied from interface: ItemStateFactory
Tries to retrieve the PropertyState with the given PropertyId and if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked by anyParent.

Specified by:
createDeepPropertyState in interface ItemStateFactory
Returns:
Throws:
ItemNotFoundException - if there is no such NodeState.
RepositoryException - if an error occurs while retrieving the NodeState.
See Also:
ItemStateFactory.createDeepPropertyState(PropertyId,NodeEntry)

getChildNodeInfos

public Iterator getChildNodeInfos(NodeId nodeId)
                           throws ItemNotFoundException,
                                  RepositoryException
Description copied from interface: ItemStateFactory
Returns an Iterator over ChildInfos for the given NodeState.

Specified by:
getChildNodeInfos in interface ItemStateFactory
Parameters:
nodeId -
Throws:
ItemNotFoundException
RepositoryException
See Also:
ItemStateFactory.getChildNodeInfos(NodeId)

getNodeReferences

public PropertyId[] getNodeReferences(NodeState nodeState)
Description copied from interface: ItemStateFactory
Returns the identifiers of all reference properties that point to the given node.

Specified by:
getNodeReferences in interface ItemStateFactory
Parameters:
nodeState -
Returns:
reference property identifiers
See Also:
ItemStateFactory.getNodeReferences(NodeState)


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