Class TransientISFactory
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory
-
- org.apache.jackrabbit.jcr2spi.state.TransientISFactory
-
- All Implemented Interfaces:
ItemStateCreationListener,ItemStateFactory,ItemStateLifeCycleListener,TransientItemStateFactory
public final class TransientISFactory extends AbstractItemStateFactory implements TransientItemStateFactory, ItemStateCreationListener
TransientISFactory...
-
-
Constructor Summary
Constructors Constructor Description TransientISFactory(AbstractItemStateFactory workspaceStateFactory, ItemDefinitionProvider defProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreated(ItemState state)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.NodeStatecreateNewNodeState(NodeEntry entry, org.apache.jackrabbit.spi.Name nodetypeName, org.apache.jackrabbit.spi.QNodeDefinition definition)Creates a transient childNodeStatewith the givenname.PropertyStatecreateNewPropertyState(PropertyEntry entry, org.apache.jackrabbit.spi.QPropertyDefinition definition, org.apache.jackrabbit.spi.QValue[] values, int propertyType)Creates a transientPropertyState.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.voidstatusChanged(ItemState state, int previousStatus)Called after anItemStatehas changed its status.-
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
-
TransientISFactory
public TransientISFactory(AbstractItemStateFactory workspaceStateFactory, ItemDefinitionProvider defProvider)
-
-
Method Detail
-
createNewNodeState
public NodeState createNewNodeState(NodeEntry entry, org.apache.jackrabbit.spi.Name nodetypeName, org.apache.jackrabbit.spi.QNodeDefinition definition)
Description copied from interface:TransientItemStateFactoryCreates a transient childNodeStatewith the givenname.- Specified by:
createNewNodeStatein interfaceTransientItemStateFactory- Returns:
- the created
NodeState - See Also:
TransientItemStateFactory.createNewNodeState(NodeEntry , Name, QNodeDefinition)
-
createNewPropertyState
public PropertyState createNewPropertyState(PropertyEntry entry, org.apache.jackrabbit.spi.QPropertyDefinition definition, org.apache.jackrabbit.spi.QValue[] values, int propertyType) throws RepositoryException
Description copied from interface:TransientItemStateFactoryCreates a transientPropertyState.- Specified by:
createNewPropertyStatein interfaceTransientItemStateFactory- Returns:
- the created
PropertyState. - Throws:
RepositoryException- See Also:
TransientItemStateFactory.createNewPropertyState(PropertyEntry, QPropertyDefinition, QValue[], int)
-
createRootState
public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException
- Specified by:
createRootStatein interfaceItemStateFactory- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
ItemStateFactory.createRootState(NodeEntry)
-
createNodeState
public NodeState createNodeState(org.apache.jackrabbit.spi.NodeId nodeId, NodeEntry entry) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactoryCreates the childNodeStatewith the givennodeId.- Specified by:
createNodeStatein interfaceItemStateFactory- 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.- See Also:
ItemStateFactory.createNodeState(NodeId,NodeEntry)
-
createDeepNodeState
public NodeState createDeepNodeState(org.apache.jackrabbit.spi.NodeId nodeId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactoryTries to retrieve theNodeStatewith the givenNodeIdand if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked byanyParent.- Specified by:
createDeepNodeStatein interfaceItemStateFactory- Returns:
- the created
NodeState. - Throws:
ItemNotFoundException- if there is no suchNodeState.RepositoryException- if an error occurs while retrieving theNodeState.- See Also:
ItemStateFactory.createDeepNodeState(NodeId, NodeEntry)
-
createPropertyState
public PropertyState createPropertyState(org.apache.jackrabbit.spi.PropertyId propertyId, PropertyEntry entry) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactoryCreates thePropertyStatewith the givenpropertyId.- Specified by:
createPropertyStatein interfaceItemStateFactory- 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.- See Also:
ItemStateFactory.createPropertyState(PropertyId, PropertyEntry)
-
createDeepPropertyState
public PropertyState createDeepPropertyState(org.apache.jackrabbit.spi.PropertyId propertyId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactoryTries to retrieve thePropertyStatewith the givenPropertyIdand if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked byanyParent.- Specified by:
createDeepPropertyStatein interfaceItemStateFactory- Returns:
- Throws:
ItemNotFoundException- if there is no suchNodeState.RepositoryException- if an error occurs while retrieving theNodeState.- See Also:
ItemStateFactory.createDeepPropertyState(PropertyId, NodeEntry)
-
getChildNodeInfos
public Iterator<org.apache.jackrabbit.spi.ChildInfo> getChildNodeInfos(org.apache.jackrabbit.spi.NodeId nodeId) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactoryReturns an Iterator overChildInfos for the givenNodeState.- Specified by:
getChildNodeInfosin interfaceItemStateFactory- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
ItemStateFactory.getChildNodeInfos(NodeId)
-
getNodeReferences
public Iterator<org.apache.jackrabbit.spi.PropertyId> getNodeReferences(NodeState nodeState, org.apache.jackrabbit.spi.Name propertyName, boolean weak)
Description copied from interface:ItemStateFactoryReturns the identifiers of all reference properties that point to the given node.- Specified by:
getNodeReferencesin interfaceItemStateFactory- Parameters:
nodeState- reference targetweak- Boolean flag indicating whether weak references should be returned or not.- Returns:
- reference property identifiers
- See Also:
ItemStateFactory.getNodeReferences(NodeState,org.apache.jackrabbit.spi.Name,boolean)
-
created
public void created(ItemState state)
- Specified by:
createdin interfaceItemStateCreationListener- See Also:
ItemStateCreationListener.created(ItemState)
-
statusChanged
public void statusChanged(ItemState state, int previousStatus)
Description copied from interface:ItemStateLifeCycleListenerCalled after anItemStatehas changed its status. The new status can be retrieved by callingItemState.getStatus().- Specified by:
statusChangedin interfaceItemStateLifeCycleListener- Parameters:
state- the item state, which changed itsstatus.previousStatus- the previous status ofstate.- See Also:
ItemStateLifeCycleListener.statusChanged(ItemState, int)
-
-