org.apache.jackrabbit.jcr2spi.hierarchy
Class UniqueIdResolver

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.hierarchy.UniqueIdResolver
All Implemented Interfaces:
EntryFactory.NodeEntryListener, ItemStateCreationListener, ItemStateLifeCycleListener

public class UniqueIdResolver
extends Object
implements ItemStateCreationListener, EntryFactory.NodeEntryListener

UniqueIdResolver allows to retrieve NodeEntry instances that are identified by a uniqueID.


Constructor Summary
UniqueIdResolver(ItemStateFactory isf)
          Creates a new UniqueIdResolver.
 
Method Summary
 void created(ItemState state)
          Nothing to do.
 void dispose()
           
 void entryCreated(NodeEntry entry)
           
 NodeEntry lookup(String uniqueId)
           
 NodeEntry resolve(NodeId nodeId, NodeEntry rootEntry)
           
 void statusChanged(ItemState state, int previousStatus)
          Updates the internal id-lookup if the given state - is identify by a uniqueID and got removed - was modified and now is identified by a uniqueID - was modified and is not identified by a uniqueID any more
 void uniqueIdChanged(NodeEntry entry, String previousUniqueID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueIdResolver

public UniqueIdResolver(ItemStateFactory isf)
Creates a new UniqueIdResolver.

Method Detail

dispose

public void dispose()

lookup

public NodeEntry lookup(String uniqueId)

resolve

public NodeEntry resolve(NodeId nodeId,
                         NodeEntry rootEntry)
                  throws ItemNotFoundException,
                         RepositoryException
Throws:
ItemNotFoundException
RepositoryException

statusChanged

public void statusChanged(ItemState state,
                          int previousStatus)
Updates the internal id-lookup if the given state - is identify by a uniqueID and got removed - was modified and now is identified by a uniqueID - was modified and is not identified by a uniqueID any more

Specified by:
statusChanged in interface ItemStateLifeCycleListener
Parameters:
state -
previousStatus -
See Also:
ItemStateLifeCycleListener.statusChanged(ItemState, int)

created

public void created(ItemState state)
Nothing to do. The lookUp is filled entry creation and/or modification of its uniqueID

Specified by:
created in interface ItemStateCreationListener
Parameters:
state -
See Also:
ItemStateCreationListener.created(ItemState)

entryCreated

public void entryCreated(NodeEntry entry)
Specified by:
entryCreated in interface EntryFactory.NodeEntryListener
See Also:
EntryFactory.NodeEntryListener.entryCreated(NodeEntry)

uniqueIdChanged

public void uniqueIdChanged(NodeEntry entry,
                            String previousUniqueID)
Specified by:
uniqueIdChanged in interface EntryFactory.NodeEntryListener
See Also:
EntryFactory.NodeEntryListener.uniqueIdChanged(NodeEntry, String)


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