org.ceryle.wiki.plugin.query
Class ReferenceManagerInfoProvider

java.lang.Object
  extended by org.ceryle.wiki.plugin.query.ReferenceManagerInfoProvider
All Implemented Interfaces:
ReferenceInfoProvider

public class ReferenceManagerInfoProvider
extends Object
implements ReferenceInfoProvider

This ReferenceInfoProvider uses the ReferenceManager as its ultimate source of information.

Author:
John Volkar (john.volkar at gmail.com)

Constructor Summary
ReferenceManagerInfoProvider(WikiEngine engine)
           
 
Method Summary
 Collection getAllPages()
           
 Collection getReferredBy(String page)
           
 Collection getRefersTo(String page)
           
 int getSignature()
          This 'signature' can be used to determine if there were any modifications made to the underlying to and by maps of the ReferenceManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceManagerInfoProvider

public ReferenceManagerInfoProvider(WikiEngine engine)
Method Detail

getSignature

public int getSignature()
Description copied from interface: ReferenceInfoProvider
This 'signature' can be used to determine if there were any modifications made to the underlying to and by maps of the ReferenceManager. This method traps and retries if a concurrent modifcaition occurs. The maps of the ReferenceManager are not synchronized, so someone could add/remove entries in them while the hashCodes are being computed.

Specified by:
getSignature in interface ReferenceInfoProvider
Returns:
Sum of the hashCodes for the to and by maps of the ReferenceManager
See Also:
ReferenceInfoProvider.getSignature()

getRefersTo

public Collection getRefersTo(String page)
Specified by:
getRefersTo in interface ReferenceInfoProvider
See Also:
ReferenceInfoProvider.getRefersTo(java.lang.String)

getReferredBy

public Collection getReferredBy(String page)
Specified by:
getReferredBy in interface ReferenceInfoProvider
See Also:
ReferenceInfoProvider.getReferredBy(java.lang.String)

getAllPages

public Collection getAllPages()
Specified by:
getAllPages in interface ReferenceInfoProvider
See Also:
ReferenceInfoProvider.getAllPages()


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.