com.atlassian.gadgets.publisher.internal.impl
Class GadgetProcessorImpl
java.lang.Object
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 |
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 URLwebResourceManager
- used to insert links to web resources into the gadgetlocaleResolver
- used to find supported Locale
si18nResolver
- used to retrieve all i18n properties that match a specified prefix
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 processout
- destination for the processed XML
- Throws:
GadgetParsingException
- if an error is detected in the gadget XML
Copyright © 2009 Atlassian. All Rights Reserved.