com.atlassian.gadgets.publisher.internal.impl
Class PublishedGadgetSpecWriterImpl

java.lang.Object
  extended by com.atlassian.gadgets.publisher.internal.impl.PublishedGadgetSpecWriterImpl
All Implemented Interfaces:
PublishedGadgetSpecWriter

public class PublishedGadgetSpecWriterImpl
extends Object
implements PublishedGadgetSpecWriter

A fairly naive implementation that processes gadget spec file and substitutes values into it on the fly.


Constructor Summary
PublishedGadgetSpecWriterImpl(PublishedGadgetSpecStore store, com.atlassian.gadgets.publisher.internal.impl.GadgetSpecProcessingWriter writer)
           
 
Method Summary
 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, toString, wait, wait, wait
 

Constructor Detail

PublishedGadgetSpecWriterImpl

public PublishedGadgetSpecWriterImpl(PublishedGadgetSpecStore store,
                                     com.atlassian.gadgets.publisher.internal.impl.GadgetSpecProcessingWriter writer)
Method Detail

writeGadgetSpecTo

public void writeGadgetSpecTo(String pluginKey,
                              String location,
                              OutputStream output)
                       throws IOException
Description copied from interface: PublishedGadgetSpecWriter
Writes the gadget spec from the specified plugin, with the specified resource location within the plugin, to the specified OutputStream. Output will be buffered internally, so there is no need for the calling code to wrap the OutputStream with a BufferedOutputStream.

Specified by:
writeGadgetSpecTo in interface PublishedGadgetSpecWriter
Parameters:
pluginKey - 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.
Throws:
IOException - if an error occurs in I/O processing


Copyright © 2009 Atlassian. All Rights Reserved.