org.apache.jackrabbit.jcr2spi
Class ItemManagerImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.ItemManagerImpl
All Implemented Interfaces:
ItemLifeCycleListener, ItemManager, Dumpable

public class ItemManagerImpl
extends Object
implements Dumpable, ItemManager

ItemManagerImpl implements the ItemManager interface.


Method Summary
 void dispose()
          Disposes this ItemManager and frees resources.
 void dump(PrintStream ps)
          Dumps the state of this instance in a human readable format for diagnostic purposes.
 NodeIterator getChildNodes(NodeEntry parentEntry)
           
 PropertyIterator getChildProperties(NodeEntry parentEntry)
           
 Item getItem(HierarchyEntry hierarchyEntry)
           
 Item getItem(Path path)
           
 boolean hasChildNodes(NodeEntry parentEntry)
           
 boolean hasChildProperties(NodeEntry parentEntry)
           
 void itemCreated(Item item)
          Called when an Item instance has been created.
 void itemDestroyed(Item item)
          Called when an ItemImpl instance has been destroyed (i.e.
 boolean itemExists(HierarchyEntry hierarchyEntry)
          Checks if the item for given HierarchyEntry exists.
 boolean itemExists(Path path)
          Checks if the item with the given path exists.
 void itemInvalidated(Item item)
          Called when an Item instance has been invalidated (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

dispose

public void dispose()
Description copied from interface: ItemManager
Disposes this ItemManager and frees resources.

Specified by:
dispose in interface ItemManager
See Also:
ItemManager.dispose()

itemExists

public boolean itemExists(Path path)
Description copied from interface: ItemManager
Checks if the item with the given path exists.

Specified by:
itemExists in interface ItemManager
Parameters:
path - path to the item to be checked
Returns:
true if the specified item exists
See Also:
ItemManager.itemExists(Path)

itemExists

public boolean itemExists(HierarchyEntry hierarchyEntry)
Description copied from interface: ItemManager
Checks if the item for given HierarchyEntry exists.

Specified by:
itemExists in interface ItemManager
Returns:
true if the specified item exists
See Also:
ItemManager.itemExists(HierarchyEntry)

getItem

public Item getItem(Path path)
             throws PathNotFoundException,
                    AccessDeniedException,
                    RepositoryException
Specified by:
getItem in interface ItemManager
Returns:
The item for the given path.
Throws:
PathNotFoundException
AccessDeniedException
RepositoryException
See Also:
ItemManager.getItem(Path)

getItem

public Item getItem(HierarchyEntry hierarchyEntry)
             throws ItemNotFoundException,
                    AccessDeniedException,
                    RepositoryException
Specified by:
getItem in interface ItemManager
Returns:
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException
See Also:
ItemManager.getItem(HierarchyEntry)

hasChildNodes

public boolean hasChildNodes(NodeEntry parentEntry)
                      throws ItemNotFoundException,
                             AccessDeniedException,
                             RepositoryException
Specified by:
hasChildNodes in interface ItemManager
Returns:
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException
See Also:
ItemManager.hasChildNodes(NodeEntry)

getChildNodes

public NodeIterator getChildNodes(NodeEntry parentEntry)
                           throws ItemNotFoundException,
                                  AccessDeniedException,
                                  RepositoryException
Specified by:
getChildNodes in interface ItemManager
Returns:
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException
See Also:
ItemManager.getChildNodes(NodeEntry)

hasChildProperties

public boolean hasChildProperties(NodeEntry parentEntry)
                           throws ItemNotFoundException,
                                  AccessDeniedException,
                                  RepositoryException
Specified by:
hasChildProperties in interface ItemManager
Returns:
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException
See Also:
ItemManager.hasChildProperties(NodeEntry)

getChildProperties

public PropertyIterator getChildProperties(NodeEntry parentEntry)
                                    throws ItemNotFoundException,
                                           AccessDeniedException,
                                           RepositoryException
Specified by:
getChildProperties in interface ItemManager
Returns:
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException
See Also:
ItemManager.getChildProperties(NodeEntry)

itemCreated

public void itemCreated(Item item)
Description copied from interface: ItemLifeCycleListener
Called when an Item instance has been created.

Specified by:
itemCreated in interface ItemLifeCycleListener
Parameters:
item - the instance which has been created
See Also:
ItemLifeCycleListener.itemCreated(Item)

itemInvalidated

public void itemInvalidated(Item item)
Description copied from interface: ItemLifeCycleListener
Called when an Item instance has been invalidated (i.e. it has been temporarily rendered 'invalid').

Note that most methods of Item, Node and Property will throw an InvalidItemStateException when called on an 'invalidated' item.

Specified by:
itemInvalidated in interface ItemLifeCycleListener
Parameters:
item - the instance which has been discarded
See Also:
ItemLifeCycleListener.itemInvalidated(Item)

itemDestroyed

public void itemDestroyed(Item item)
Description copied from interface: ItemLifeCycleListener
Called when an ItemImpl instance has been destroyed (i.e. it has been permanently rendered 'invalid').

Note that most Item, Node and Property methods will throw an InvalidItemStateException when called on a 'destroyed' item.

Specified by:
itemDestroyed in interface ItemLifeCycleListener
Parameters:
item - the instance which has been destroyed
See Also:
ItemLifeCycleListener.itemDestroyed(Item)

dump

public void dump(PrintStream ps)
Description copied from interface: Dumpable
Dumps the state of this instance in a human readable format for diagnostic purposes.

Specified by:
dump in interface Dumpable
Parameters:
ps - stream to dump state to
See Also:
Dumpable.dump(PrintStream)


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.