org.apache.jackrabbit.jcr2spi
Class ItemManagerImpl

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

public class ItemManagerImpl
extends Object
implements ItemManager, ItemStateCreationListener

ItemManagerImpl implements the ItemManager interface.


Method Summary
 void created(ItemState state)
           
 void dispose()
          Disposes this ItemManager 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 an ItemState has changed its status.
 String toString()
          Returns the the state of this instance in a human readable format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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()

nodeExists

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

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

propertyExists

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

Specified by:
propertyExists in interface ItemManager
Parameters:
path - path to the property to be checked
Returns:
true if the specified item exists
See Also:
ItemManager.propertyExists(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)

getNode

public Node getNode(Path path)
             throws PathNotFoundException,
                    RepositoryException
Specified by:
getNode in interface ItemManager
Returns:
Throws:
PathNotFoundException
RepositoryException
See Also:
ItemManager.getNode(Path)

getProperty

public Property getProperty(Path path)
                     throws PathNotFoundException,
                            RepositoryException
Specified by:
getProperty in interface ItemManager
Returns:
Throws:
PathNotFoundException
RepositoryException
See Also:
ItemManager.getProperty(Path)

getItem

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

hasChildNodes

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

getChildNodes

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

hasChildProperties

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

getChildProperties

public PropertyIterator getChildProperties(NodeEntry parentEntry)
                                    throws ItemNotFoundException,
                                           RepositoryException
Specified by:
getChildProperties in interface ItemManager
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.

Overrides:
toString in class Object

created

public void created(ItemState state)
Specified by:
created in interface ItemStateCreationListener
Parameters:
state -

statusChanged

public void statusChanged(ItemState state,
                          int previousStatus)
Description copied from interface: ItemStateLifeCycleListener
Called after an ItemState has changed its status. The new status can be retrieved by calling ItemState.getStatus().

Specified by:
statusChanged in interface ItemStateLifeCycleListener
Parameters:
state - the item state, which changed its status.
previousStatus - the previous status of state.


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