|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.publisher.internal.impl.PublishedGadgetSpecStoreImpl
public class PublishedGadgetSpecStoreImpl
A fairly naive implementation that processes gadget spec file and substitutes values into it on the fly.
| Constructor Summary | |
|---|---|
PublishedGadgetSpecStoreImpl(GadgetSpecUrlBuilder urlBuilder,
GadgetSpecValidator validator,
GadgetProcessor gadgetProcessor,
PluginGadgetSpecProviderPermission permission)
|
|
| Method Summary | |
|---|---|
boolean |
contains(URI gadgetSpecUri)
Returns true if the URI is in the store, false otherwise. |
Iterable<URI> |
entries()
Returns all the gadget URIs contained by this store. |
void |
pluginGadgetSpecDisabled(PluginGadgetSpec pluginGadgetSpec)
Called when a gadget spec is disabled from a plugin. |
void |
pluginGadgetSpecEnabled(PluginGadgetSpec pluginGadgetSpec)
Called when a gadget spec is enabled from a plugin. |
String |
toString()
|
void |
write(PluginGadgetSpec pluginGadgetSpec,
OutputStream output)
|
void |
writeGadgetSpecTo(String pluginKey,
String location,
OutputStream output)
Writes the gadget spec from the specified plugin, with the specified resource location within the plugin, to the specified OutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PublishedGadgetSpecStoreImpl(GadgetSpecUrlBuilder urlBuilder,
GadgetSpecValidator validator,
GadgetProcessor gadgetProcessor,
PluginGadgetSpecProviderPermission permission)
| Method Detail |
|---|
public boolean contains(URI gadgetSpecUri)
GadgetSpecProvidertrue if the URI is in the store, false otherwise.
contains in interface GadgetSpecProvidergadgetSpecUri - URI to check is in the store
true if the URI is in the store, false otherwisepublic Iterable<URI> entries()
GadgetSpecProvider
entries in interface GadgetSpecProvider
public void writeGadgetSpecTo(String pluginKey,
String location,
OutputStream output)
throws IOException
PublishedGadgetSpecWriterOutputStream. Output will be buffered internally, so there is no need for the calling code to
wrap the OutputStream with a BufferedOutputStream.
writeGadgetSpecTo in interface PublishedGadgetSpecWriterpluginKey - the plugin key of the Plugin that contains the gadget spec to
store. Must not be null, or a NullPointerException will be thrown.location - the location of the gadget spec XML file resource within the plugin. Must not be null, or a NullPointerException will be thrown.output - the OutputStream to write the gadget spec XML to. Must not be null, or a
NullPointerException will be thrown.
IOException - if an error occurs in I/O processing
public void write(PluginGadgetSpec pluginGadgetSpec,
OutputStream output)
throws IOException
IOException
public void pluginGadgetSpecEnabled(PluginGadgetSpec pluginGadgetSpec)
throws GadgetParsingException
PluginGadgetSpecEventListener
pluginGadgetSpecEnabled in interface PluginGadgetSpecEventListenerpluginGadgetSpec - the gadget spec that was enabled. Must not be null, or a NullPointerException will be thrown.
GadgetParsingExceptionpublic void pluginGadgetSpecDisabled(PluginGadgetSpec pluginGadgetSpec)
PluginGadgetSpecEventListener
pluginGadgetSpecDisabled in interface PluginGadgetSpecEventListenerpluginGadgetSpec - the gadget spec that was enabled. Must not be null, or a NullPointerException will be thrown.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||