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 void
created(ItemState state)
NodeState
createDeepNodeState(NodeId nodeId, NodeEntry anyParent)
Tries to retrieve theNodeState
with the givenNodeId
and if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked byanyParent
.PropertyState
createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent)
Tries to retrieve thePropertyState
with the givenPropertyId
and if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked byanyParent
.NodeState
createNewNodeState(NodeEntry entry, Name nodetypeName, QNodeDefinition definition)
Creates a transient childNodeState
with the givenname
.PropertyState
createNewPropertyState(PropertyEntry entry, QPropertyDefinition definition, QValue[] values, int propertyType)
Creates a transientPropertyState
.NodeState
createNodeState(NodeId nodeId, NodeEntry entry)
Creates the childNodeState
with the givennodeId
.PropertyState
createPropertyState(PropertyId propertyId, PropertyEntry entry)
Creates thePropertyState
with the givenpropertyId
.NodeState
createRootState(NodeEntry entry)
Iterator<ChildInfo>
getChildNodeInfos(NodeId nodeId)
Returns an Iterator overChildInfo
s 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.void
statusChanged(ItemState state, int previousStatus)
Called after anItemState
has 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, Name nodetypeName, QNodeDefinition definition)
Description copied from interface:TransientItemStateFactory
Creates a transient childNodeState
with the givenname
.- Specified by:
createNewNodeState
in interfaceTransientItemStateFactory
- Returns:
- the created
NodeState
- See Also:
TransientItemStateFactory.createNewNodeState(NodeEntry , Name, QNodeDefinition)
-
createNewPropertyState
public PropertyState createNewPropertyState(PropertyEntry entry, QPropertyDefinition definition, QValue[] values, int propertyType) throws RepositoryException
Description copied from interface:TransientItemStateFactory
Creates a transientPropertyState
.- Specified by:
createNewPropertyState
in 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:
createRootState
in interfaceItemStateFactory
- Returns:
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemStateFactory.createRootState(NodeEntry)
-
createNodeState
public NodeState createNodeState(NodeId nodeId, NodeEntry entry) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactory
Creates the childNodeState
with the givennodeId
.- Specified by:
createNodeState
in interfaceItemStateFactory
- Parameters:
nodeId
- the id of theNodeState
to create.entry
- theHierarchyEntry
the 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(NodeId nodeId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactory
Tries to retrieve theNodeState
with the givenNodeId
and if the state exists, fills in the NodeEntries missing between the last known NodeEntry marked byanyParent
.- Specified by:
createDeepNodeState
in 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(PropertyId propertyId, PropertyEntry entry) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactory
Creates thePropertyState
with the givenpropertyId
.- Specified by:
createPropertyState
in interfaceItemStateFactory
- Parameters:
propertyId
- the id of thePropertyState
to create.entry
- theHierarchyEntry
the 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(PropertyId propertyId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactory
Tries to retrieve thePropertyState
with the givenPropertyId
and if the state exists, fills in the HierarchyEntries missing between the last known NodeEntry marked byanyParent
.- Specified by:
createDeepPropertyState
in 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<ChildInfo> getChildNodeInfos(NodeId nodeId) throws ItemNotFoundException, RepositoryException
Description copied from interface:ItemStateFactory
Returns an Iterator overChildInfo
s for the givenNodeState
.- Specified by:
getChildNodeInfos
in interfaceItemStateFactory
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemStateFactory.getChildNodeInfos(NodeId)
-
getNodeReferences
public Iterator<PropertyId> getNodeReferences(NodeState nodeState, Name propertyName, boolean weak)
Description copied from interface:ItemStateFactory
Returns the identifiers of all reference properties that point to the given node.- Specified by:
getNodeReferences
in 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:
created
in interfaceItemStateCreationListener
- See Also:
ItemStateCreationListener.created(ItemState)
-
statusChanged
public void statusChanged(ItemState state, int previousStatus)
Description copied from interface:ItemStateLifeCycleListener
Called after anItemState
has changed its status. The new status can be retrieved by callingItemState.getStatus()
.- Specified by:
statusChanged
in interfaceItemStateLifeCycleListener
- Parameters:
state
- the item state, which changed itsstatus
.previousStatus
- the previous status ofstate
.- See Also:
ItemStateLifeCycleListener.statusChanged(ItemState, int)
-
-