Package com.atlassian.gadgets
Interface LocalGadgetSpecProvider
- All Superinterfaces:
GadgetSpecProvider
A provider of gadget specs that are avaiable locally, without making an HTTP request to fetch them. Implementations
of
GadgetSpecProvider that serve gadget specs that are intended to be rendered by the same server that they
are published from should implement this interface in order to eliminate the need for the renderer to make a loopback
HTTP request to fetch the gadget spec.- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptiongetLastModified(URI gadgetSpecUri) Return the date the gadget spec was last modified.voidwriteGadgetSpecTo(URI gadgetSpecUri, OutputStream output) Writes the gadget spec found at the specified URI, to the specifiedOutputStream.Methods inherited from interface com.atlassian.gadgets.GadgetSpecProvider
contains, entries
-
Method Details
-
writeGadgetSpecTo
void writeGadgetSpecTo(URI gadgetSpecUri, OutputStream output) throws GadgetSpecUriNotAllowedException, IOException Writes the gadget spec found at the specified URI, to the specifiedOutputStream. It is assumed that the caller has already checked that the URI is provided by this provider by calling theGadgetSpecProvider.contains(java.net.URI)method. If not, this method will throw acom.atlassian.gadgets.GadgetSpecUriNotAllowedException.- Parameters:
gadgetSpecUri- URI of the gadget spec to write. Must not benullor aNullPointerExceptionwill be thrown.output- theOutputStreamto write the gadget spec XML to. Must not benull, or aNullPointerExceptionwill be thrown.- Throws:
GadgetSpecUriNotAllowedException- if the provided gadget spec URI cannot be written by this providerIOException- if an error occurs in I/O processingNullPointerException- if any argument isnull
-
getLastModified
Return the date the gadget spec was last modified.- Returns:
- date the gadget spec was last modified.
-