com.atlassian.gadgets
Interface LocalGadgetSpecProvider

All Superinterfaces:
GadgetSpecProvider
All Known Implementing Classes:
PublishedGadgetSpecStoreImpl

public interface LocalGadgetSpecProvider
extends 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
 Date getLastModified(URI gadgetSpecUri)
          Return the date the gadget spec was last modified.
 void writeGadgetSpecTo(URI gadgetSpecUri, OutputStream output)
          Writes the gadget spec found at the specified URI, to the specified OutputStream.
 
Methods inherited from interface com.atlassian.gadgets.GadgetSpecProvider
contains, entries
 

Method Detail

writeGadgetSpecTo

void writeGadgetSpecTo(URI gadgetSpecUri,
                       OutputStream output)
                       throws GadgetSpecUriNotAllowedException,
                              IOException
Writes the gadget spec found at the specified URI, to the specified OutputStream. It is assumed that the caller has already checked that the URI is provided by this provider by calling the GadgetSpecProvider.contains(java.net.URI) method. If not, this method will throw a com.atlassian.gadgets.GadgetSpecUriNotAllowedException.

Parameters:
gadgetSpecUri - URI of the gadget spec to write. 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.
Throws:
GadgetSpecUriNotAllowedException - if the provided gadget spec URI cannot be written by this provider
IOException - if an error occurs in I/O processing
NullPointerException - if any argument is null

getLastModified

Date getLastModified(URI gadgetSpecUri)
Return the date the gadget spec was last modified.



Copyright © 2010 Atlassian. All Rights Reserved.