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, org.springframework.beans.factory.DisposableBean
Direct Known Subclasses:
ConfigurableExternalGadgetSpecDirectoryEntryProvider, GadgetSpecProviderDirectoryEntryProvider, PluginExternalGadgetSpecDirectoryEntryProvider

public abstract class AbstractDirectoryEntryProvider<T>
extends Object
implements DirectoryEntryProvider, org.springframework.beans.factory.DisposableBean


Constructor Summary
AbstractDirectoryEntryProvider(GadgetSpecFactory gadgetSpecFactory, com.atlassian.sal.api.executor.ThreadLocalDelegateExecutorFactory threadLocalDelegateExecutorFactory)
           
 
Method Summary
protected abstract  com.google.common.base.Function<T,Directory.Entry> convertToLocalizedDirectoryEntry(GadgetRequestContext gadgetRequestContext)
           
 void destroy()
           
 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()
           
 
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,
                                      com.atlassian.sal.api.executor.ThreadLocalDelegateExecutorFactory threadLocalDelegateExecutorFactory)
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

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
Exception


Copyright © 2012 Atlassian. All Rights Reserved.