com.atlassian.gadgets.directory.internal.impl
Class PluginExternalGadgetSpecDirectoryEntryProvider
java.lang.Object
com.atlassian.gadgets.directory.internal.impl.AbstractDirectoryEntryProvider<URI>
com.atlassian.gadgets.directory.internal.impl.PluginExternalGadgetSpecDirectoryEntryProvider
- All Implemented Interfaces:
- DirectoryEntryProvider, PluginGadgetSpecEventListener, org.springframework.beans.factory.DisposableBean
public class PluginExternalGadgetSpecDirectoryEntryProvider
- extends AbstractDirectoryEntryProvider<URI>
- implements PluginGadgetSpecEventListener
A DirectoryEntryProvider
for external gadget specs provided by
plugins.
PluginExternalGadgetSpecDirectoryEntryProvider
public PluginExternalGadgetSpecDirectoryEntryProvider(GadgetSpecFactory gadgetSpecFactory,
com.atlassian.sal.api.executor.ThreadLocalDelegateExecutorFactory threadLocalDelegateExecutorFactory)
- Creates a new instance that uses the specified
GadgetSpecFactory
to retrieve and parse gadget specs.
- Parameters:
gadgetSpecFactory
- the GadgetSpecFactory
to use to retrieve and parse gadget specs. Must not be
null
or a NullPointerException
will be thrown.
contains
public boolean contains(URI gadgetSpecUri)
- Specified by:
contains
in interface DirectoryEntryProvider
- Parameters:
gadgetSpecUri
- uri of the gadget spec to check if it's in the directory
- Returns:
- true if the gadget spec at the location specificied by the uri is in the directory, false otherwise
pluginGadgetSpecEnabled
public void pluginGadgetSpecEnabled(PluginGadgetSpec pluginGadgetSpec)
throws GadgetParsingException
- Description copied from interface:
PluginGadgetSpecEventListener
- Called when a gadget spec is enabled from a plugin.
- Specified by:
pluginGadgetSpecEnabled
in interface PluginGadgetSpecEventListener
- Parameters:
pluginGadgetSpec
- the gadget spec that was enabled. Must not be null
, or a NullPointerException
will be thrown.
- Throws:
GadgetParsingException
pluginGadgetSpecDisabled
public void pluginGadgetSpecDisabled(PluginGadgetSpec pluginGadgetSpec)
- Description copied from interface:
PluginGadgetSpecEventListener
- Called when a gadget spec is disabled from a plugin.
- Specified by:
pluginGadgetSpecDisabled
in interface PluginGadgetSpecEventListener
- Parameters:
pluginGadgetSpec
- the gadget spec that was enabled. Must not be null
, or a NullPointerException
will be thrown.
internalEntries
protected Iterable<URI> internalEntries()
- Specified by:
internalEntries
in class AbstractDirectoryEntryProvider<URI>
convertToLocalizedDirectoryEntry
protected com.google.common.base.Function<URI,Directory.Entry> convertToLocalizedDirectoryEntry(GadgetRequestContext gadgetRequestContext)
- Specified by:
convertToLocalizedDirectoryEntry
in class AbstractDirectoryEntryProvider<URI>
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2014 Atlassian. All Rights Reserved.