Package org.apache.jackrabbit.jcr2spi
Class ItemManagerImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.ItemManagerImpl
-
- All Implemented Interfaces:
ItemManager
,ItemStateCreationListener
,ItemStateLifeCycleListener
public class ItemManagerImpl extends Object implements ItemManager, ItemStateCreationListener
ItemManagerImpl
implements theItemManager
interface.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
created(ItemState state)
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.void
statusChanged(ItemState state, int previousStatus)
Called after anItemState
has changed its status.String
toString()
Returns the the state of this instance in a human readable format.
-
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:ItemManager
Disposes thisItemManager
and frees resources.- Specified by:
dispose
in interfaceItemManager
- See Also:
ItemManager.dispose()
-
nodeExists
public boolean nodeExists(Path path) throws RepositoryException
Description copied from interface:ItemManager
Checks if the node with the given path exists.- Specified by:
nodeExists
in interfaceItemManager
- Parameters:
path
- path to the node to be checked- Returns:
- true if the specified item exists
- Throws:
RepositoryException
- See Also:
ItemManager.nodeExists(Path)
-
propertyExists
public boolean propertyExists(Path path) throws RepositoryException
Description copied from interface:ItemManager
Checks if the property with the given path exists.- Specified by:
propertyExists
in interfaceItemManager
- Parameters:
path
- path to the property to be checked- Returns:
- true if the specified item exists
- Throws:
RepositoryException
- See Also:
ItemManager.propertyExists(Path)
-
itemExists
public boolean itemExists(HierarchyEntry hierarchyEntry) throws RepositoryException
Description copied from interface:ItemManager
Checks if the item for given HierarchyEntry exists.- Specified by:
itemExists
in interfaceItemManager
- Returns:
- true if the specified item exists
- Throws:
RepositoryException
- See Also:
ItemManager.itemExists(HierarchyEntry)
-
getNode
public Node getNode(Path path) throws PathNotFoundException, RepositoryException
- Specified by:
getNode
in interfaceItemManager
- Returns:
- Throws:
PathNotFoundException
RepositoryException
- See Also:
ItemManager.getNode(Path)
-
getProperty
public Property getProperty(Path path) throws PathNotFoundException, RepositoryException
- Specified by:
getProperty
in interfaceItemManager
- Returns:
- Throws:
PathNotFoundException
RepositoryException
- See Also:
ItemManager.getProperty(Path)
-
getItem
public Item getItem(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
getItem
in interfaceItemManager
- Returns:
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemManager.getItem(HierarchyEntry)
-
hasChildNodes
public boolean hasChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
hasChildNodes
in interfaceItemManager
- Returns:
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemManager.hasChildNodes(NodeEntry)
-
getChildNodes
public NodeIterator getChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
getChildNodes
in interfaceItemManager
- Returns:
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemManager.getChildNodes(NodeEntry)
-
hasChildProperties
public boolean hasChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
hasChildProperties
in interfaceItemManager
- Returns:
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemManager.hasChildProperties(NodeEntry)
-
getChildProperties
public PropertyIterator getChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
getChildProperties
in interfaceItemManager
- Returns:
- Throws:
ItemNotFoundException
RepositoryException
- See Also:
ItemManager.getChildProperties(NodeEntry)
-
toString
public String toString()
Returns the the state of this instance in a human readable format.
-
created
public void created(ItemState state)
- Specified by:
created
in interfaceItemStateCreationListener
- Parameters:
state
-
-
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
.
-
-