com.atlassian.gadgets.directory.internal.impl
Class AbstractDirectoryEntryProvider<T>

java.lang.Object
  extended by com.atlassian.gadgets.directory.internal.impl.AbstractDirectoryEntryProvider<T>
All Implemented Interfaces:
DirectoryEntryProvider
Direct Known Subclasses:
ConfigurableExternalGadgetSpecDirectoryEntryProvider, GadgetSpecProviderDirectoryEntryProvider, PluginExternalGadgetSpecDirectoryEntryProvider

public abstract class AbstractDirectoryEntryProvider<T>
extends Object
implements DirectoryEntryProvider


Constructor Summary
AbstractDirectoryEntryProvider(GadgetSpecFactory gadgetSpecFactory)
           
 
Method Summary
protected abstract  com.google.common.base.Function<T,Directory.Entry> convertToLocalizedDirectoryEntry(GadgetRequestContext gadgetRequestContext)
           
 Iterable<Directory.Entry> entries(GadgetRequestContext gadgetRequestContext)
          Returns all the entries available, localized by the locale.
protected  GadgetSpec getGadgetSpec(URI gadgetSpecUri, GadgetRequestContext gadgetRequestContext)
           
protected abstract  Iterable<T> internalEntries()
           
protected static
<T> Iterable<T>
stripNulls(Iterable<T> fromIterable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.gadgets.directory.internal.DirectoryEntryProvider
contains
 

Constructor Detail

AbstractDirectoryEntryProvider

public AbstractDirectoryEntryProvider(GadgetSpecFactory gadgetSpecFactory)
Method Detail

entries

public final Iterable<Directory.Entry> entries(GadgetRequestContext gadgetRequestContext)
Description copied from interface: DirectoryEntryProvider
Returns all the entries available, localized by the locale.

Specified by:
entries in interface DirectoryEntryProvider
Parameters:
gadgetRequestContext - the context of this request
Returns:
all the entries available

internalEntries

protected abstract Iterable<T> internalEntries()

convertToLocalizedDirectoryEntry

protected abstract com.google.common.base.Function<T,Directory.Entry> convertToLocalizedDirectoryEntry(GadgetRequestContext gadgetRequestContext)

getGadgetSpec

protected final GadgetSpec getGadgetSpec(URI gadgetSpecUri,
                                         GadgetRequestContext gadgetRequestContext)
                                  throws GadgetParsingException
Throws:
GadgetParsingException

stripNulls

protected static <T> Iterable<T> stripNulls(Iterable<T> fromIterable)


Copyright © 2009 Atlassian. All Rights Reserved.