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

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

public class GadgetProcessorImpl
extends Object
implements GadgetProcessor

Default implementation of GadgetProcessor that handles host-specific base URLs and the pseudomacro #requireResource.


Constructor Summary
GadgetProcessorImpl(com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.plugin.webresource.WebResourceManager webResourceManager, com.atlassian.sal.api.message.LocaleResolver localeResolver, com.atlassian.sal.api.message.I18nResolver i18nResolver)
          Constructor.
 
Method Summary
 void process(InputStream in, OutputStream out)
          Applies an implementation-defined transformation to the XML stream provided by the specified InputStream while writing the result to the specified OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetProcessorImpl

public GadgetProcessorImpl(com.atlassian.sal.api.ApplicationProperties applicationProperties,
                           com.atlassian.plugin.webresource.WebResourceManager webResourceManager,
                           com.atlassian.sal.api.message.LocaleResolver localeResolver,
                           com.atlassian.sal.api.message.I18nResolver i18nResolver)
Constructor.

Parameters:
applicationProperties - provides the application-specific base URL
webResourceManager - used to insert links to web resources into the gadget
localeResolver - used to find supported Locales
i18nResolver - used to retrieve all i18n properties that match a specified prefix
Method Detail

process

public void process(InputStream in,
                    OutputStream out)
             throws GadgetParsingException
Description copied from interface: GadgetProcessor
Applies an implementation-defined transformation to the XML stream provided by the specified InputStream while writing the result to the specified OutputStream. The InputStream is guaranteed to be read at most once in this implementation. Neither the InputStream nor the OutputStream may be null.

Specified by:
process in interface GadgetProcessor
Parameters:
in - source of the gadget spec XML to process
out - destination for the processed XML
Throws:
GadgetParsingException - if an error is detected in the gadget XML


Copyright © 2009 Atlassian. All Rights Reserved.