Package org.apache.jackrabbit.jcr2spi
Interface ItemManager
-
- All Known Implementing Classes:
ItemManagerImpl
public interface ItemManager
There's oneItemManager
instance perSession
instance. It is the factory forNode
andProperty
instances.The
ItemManager
's responsibilities are:- providing access to
Item
instances byItemState
whereasNode
andItem
are only providing relative access. - returning the instance of an existing
Node
orProperty
, given its absolute path. - creating the per-session instance of a
Node
orProperty
that doesn't exist yet and needs to be created first. - guaranteeing that there aren't multiple instances representing the same
Node
orProperty
associated with the sameSession
instance. - maintaining a cache of the item instances it created.
If the parent
Session
is anXASession
, there is oneItemManager
instance per started global transaction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose()
Disposes thisItemManager
and frees resources.NodeIterator
getChildNodes(NodeEntry parentEntry)
PropertyIterator
getChildProperties(NodeEntry parentEntry)
Item
getItem(HierarchyEntry hierarchyEntry)
Node
getNode(Path path)
Property
getProperty(Path path)
boolean
hasChildNodes(NodeEntry parentEntry)
boolean
hasChildProperties(NodeEntry parentEntry)
boolean
itemExists(HierarchyEntry hierarchyEntry)
Checks if the item for given HierarchyEntry exists.boolean
nodeExists(Path path)
Checks if the node with the given path exists.boolean
propertyExists(Path path)
Checks if the property with the given path exists.
-
-
-
Method Detail
-
dispose
void dispose()
Disposes thisItemManager
and frees resources.
-
nodeExists
boolean nodeExists(Path path) throws RepositoryException
Checks 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(Path path) throws RepositoryException
Checks 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(Path path) throws PathNotFoundException, RepositoryException
- Parameters:
path
-- Returns:
- Throws:
PathNotFoundException
RepositoryException
-
getProperty
Property getProperty(Path path) throws PathNotFoundException, RepositoryException
- Parameters:
path
-- Returns:
- Throws:
PathNotFoundException
RepositoryException
-
getItem
Item getItem(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
hierarchyEntry
-- Returns:
- Throws:
ItemNotFoundException
RepositoryException
-
hasChildNodes
boolean hasChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry
-- Returns:
- Throws:
ItemNotFoundException
RepositoryException
-
getChildNodes
NodeIterator getChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry
-- Returns:
- Throws:
ItemNotFoundException
RepositoryException
-
hasChildProperties
boolean hasChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry
-- Returns:
- Throws:
ItemNotFoundException
RepositoryException
-
getChildProperties
PropertyIterator getChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Parameters:
parentEntry
-- Returns:
- Throws:
ItemNotFoundException
RepositoryException
-
-