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
ItemManagerImplimplements theItemManagerinterface.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreated(ItemState state)voiddispose()Disposes thisItemManagerand frees resources.NodeIteratorgetChildNodes(NodeEntry parentEntry)PropertyIteratorgetChildProperties(NodeEntry parentEntry)ItemgetItem(HierarchyEntry hierarchyEntry)NodegetNode(Path path)PropertygetProperty(Path path)booleanhasChildNodes(NodeEntry parentEntry)booleanhasChildProperties(NodeEntry parentEntry)booleanitemExists(HierarchyEntry hierarchyEntry)Checks if the item for given HierarchyEntry exists.booleannodeExists(Path path)Checks if the node with the given path exists.booleanpropertyExists(Path path)Checks if the property with the given path exists.voidstatusChanged(ItemState state, int previousStatus)Called after anItemStatehas changed its status.StringtoString()Returns the the state of this instance in a human readable format.
-
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:ItemManagerDisposes thisItemManagerand frees resources.- Specified by:
disposein interfaceItemManager- See Also:
ItemManager.dispose()
-
nodeExists
public boolean nodeExists(Path path) throws RepositoryException
Description copied from interface:ItemManagerChecks if the node with the given path exists.- Specified by:
nodeExistsin 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:ItemManagerChecks if the property with the given path exists.- Specified by:
propertyExistsin 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:ItemManagerChecks if the item for given HierarchyEntry exists.- Specified by:
itemExistsin 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:
getNodein interfaceItemManager- Returns:
- Throws:
PathNotFoundExceptionRepositoryException- See Also:
ItemManager.getNode(Path)
-
getProperty
public Property getProperty(Path path) throws PathNotFoundException, RepositoryException
- Specified by:
getPropertyin interfaceItemManager- Returns:
- Throws:
PathNotFoundExceptionRepositoryException- See Also:
ItemManager.getProperty(Path)
-
getItem
public Item getItem(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
getItemin interfaceItemManager- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
ItemManager.getItem(HierarchyEntry)
-
hasChildNodes
public boolean hasChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
hasChildNodesin interfaceItemManager- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
ItemManager.hasChildNodes(NodeEntry)
-
getChildNodes
public NodeIterator getChildNodes(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
getChildNodesin interfaceItemManager- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
ItemManager.getChildNodes(NodeEntry)
-
hasChildProperties
public boolean hasChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
hasChildPropertiesin interfaceItemManager- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
ItemManager.hasChildProperties(NodeEntry)
-
getChildProperties
public PropertyIterator getChildProperties(NodeEntry parentEntry) throws ItemNotFoundException, RepositoryException
- Specified by:
getChildPropertiesin interfaceItemManager- Returns:
- Throws:
ItemNotFoundExceptionRepositoryException- 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:
createdin interfaceItemStateCreationListener- Parameters:
state-
-
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.
-
-