com.binaryfantasy.murq
Class ContentDirectory

java.lang.Object
  extended by com.binaryfantasy.murq.ContentDirectory
All Implemented Interfaces:
ISourceListener, EventListener

public class ContentDirectory
extends Object
implements ISourceListener

Tracks SourceKey to ContentId relationships and handles the selection of locale appropriate candidates.

FOR INTERNAL USE ONLY.

Author:
Bill Weiss

Method Summary
 SourceKey findSourceKey(String contentId, Locale locale)
          Returns the most appropriate SourceKey for the specified contentId and locale using the method described in the java ResourceBundle.getBundle(java.lang.String, java.util.Locale,java.lang.ClassLoader) documentation.
 Set<String> getContentIds()
          Returns a Set of all ContentIds present in the ISource, including protected.
 Set<SourceKey> getSourceKeys()
          Returns a Set of all SourceKeys present in the ISource, including protected.
 Set<SourceKey> getSourceKeys(String contentId)
          Returns a Set of all SourceKeys related to the specified contentId.
 void onSourceEvent(SourceEvent event)
          Called when a SourceEvent is fired.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

onSourceEvent

public void onSourceEvent(SourceEvent event)
Description copied from interface: ISourceListener
Called when a SourceEvent is fired.

Specified by:
onSourceEvent in interface ISourceListener
Parameters:
event - the event to be handled.

getContentIds

public Set<String> getContentIds()
Returns a Set of all ContentIds present in the ISource, including protected.

Returns:
a Set of all ContentIds present in the ISource, including protected.

getSourceKeys

public Set<SourceKey> getSourceKeys()
Returns a Set of all SourceKeys present in the ISource, including protected.

Returns:
a Set of all SourceKeys present in the ISource, including protected.

getSourceKeys

public Set<SourceKey> getSourceKeys(String contentId)
Returns a Set of all SourceKeys related to the specified contentId.

Returns:
a Set of all SourceKeys related to the specified contentId.

findSourceKey

public SourceKey findSourceKey(String contentId,
                               Locale locale)
Returns the most appropriate SourceKey for the specified contentId and locale using the method described in the java ResourceBundle.getBundle(java.lang.String, java.util.Locale,java.lang.ClassLoader) documentation.

Returns:
the most appropriate SourceKey for the specified contentId and locale.

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2000-2006, BinaryFantasy.com