Package org.apache.jackrabbit.jcr2spi
Interface ItemManager
-
- All Known Implementing Classes:
ItemManagerImpl
public interface ItemManagerThere's oneItemManagerinstance perSessioninstance. It is the factory forNodeandPropertyinstances.The
ItemManager's responsibilities are:- providing access to
Iteminstances byItemStatewhereasNodeandItemare only providing relative access. - returning the instance of an existing
NodeorProperty, given its absolute path. - creating the per-session instance of a
NodeorPropertythat doesn't exist yet and needs to be created first. - guaranteeing that there aren't multiple instances representing the same
NodeorPropertyassociated with the sameSessioninstance. - maintaining a cache of the item instances it created.
If the parent
Sessionis anXASession, there is oneItemManagerinstance per started global transaction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Disposes thisItemManagerand frees resources.NodeIteratorgetChildNodes(NodeEntry parentEntry)PropertyIteratorgetChildProperties(NodeEntry parentEntry)ItemgetItem(HierarchyEntry hierarchyEntry)NodegetNode(org.apache.jackrabbit.spi.Path path)PropertygetProperty(org.apache.jackrabbit.spi.Path path)booleanhasChildNodes(NodeEntry parentEntry)booleanhasChildProperties(NodeEntry parentEntry)booleanitemExists(HierarchyEntry hierarchyEntry)Checks if the item for given HierarchyEntry exists.booleannodeExists(org.apache.jackrabbit.spi.Path path)Checks if the node with the given path exists.booleanpropertyExists(org.apache.jackrabbit.spi.Path path)Checks if the property with the given path exists.
-
-
-
Method Detail
-
dispose
void dispose()
Disposes thisItemManagerand frees resources.
-
nodeExists
boolean nodeExists(org.apache.jackrabbit.spi.Path path) throws RepositoryExceptionChecks if the node with the given path exists.- Parameters:
path- path to the node to be checked- Returns:
- true if the specified item exists
- Throws:
RepositoryException
-
propertyExists
boolean propertyExists(org.apache.jackrabbit.spi.Path path) throws RepositoryExceptionChecks if the property with the given path exists.- Parameters:
path- path to the property to be checked- Returns:
- true if the specified item exists
- Throws:
RepositoryException
-
itemExists
boolean itemExists(HierarchyEntry hierarchyEntry) throws RepositoryException
Checks if the item for given HierarchyEntry exists.- Parameters:
hierarchyEntry-- Returns:
- true if the specified item exists
- Throws:
RepositoryException
-
getNode
Node getNode(org.apache.jackrabbit.spi.Path path) throws PathNotFoundException, RepositoryException
- Parameters:
path-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
getProperty
Property getProperty(org.apache.jackrabbit.spi.Path path) throws PathNotFoundException, RepositoryException
- Parameters:
path-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
getItem
Item getItem(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
hierarchyEntry-- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException
-
hasChildNodes
boolean hasChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry-- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException
-
getChildNodes
NodeIterator getChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry-- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException
-
hasChildProperties
boolean hasChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry-- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException
-
getChildProperties
PropertyIterator getChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry-- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException
-
-