public class

EditorMacroUnmarshaller

extends Object
implements Unmarshaller<T>
java.lang.Object
   ↳ com.atlassian.confluence.content.render.xhtml.editor.macro.EditorMacroUnmarshaller

Class Overview

Transform the macro definition from the XHTML received from the editor into a holding object which can then be output into different formats such as storage format.

StorageMacroMarshaller is used to actually output the canonical storage form.

Summary

Public Constructors
EditorMacroUnmarshaller(XMLOutputFactory xmlFragmentOutputFactory, XMLEventFactory xmlEventFactory, MacroNameAndParameterSubParser macroNameAndParameterSubParser, XmlEventReaderFactory xmlEventReaderFactory, XmlEntityExpander xmlEntityExpander)
Public Methods
boolean handles(StartElement startElement, ConversionContext conversionContext)
Determines whether or not this unmarshaller should be applied to a fragment with the specified start element.
MacroDefinition unmarshal(XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)
Unmarshalls a StAX event stream to an object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.content.render.xhtml.Unmarshaller

Public Constructors

public EditorMacroUnmarshaller (XMLOutputFactory xmlFragmentOutputFactory, XMLEventFactory xmlEventFactory, MacroNameAndParameterSubParser macroNameAndParameterSubParser, XmlEventReaderFactory xmlEventReaderFactory, XmlEntityExpander xmlEntityExpander)

Public Methods

public boolean handles (StartElement startElement, ConversionContext conversionContext)

Determines whether or not this unmarshaller should be applied to a fragment with the specified start element.

Parameters
startElement start element
conversionContext the conversion context
Returns
  • true if this unmarshaller can be applied, false otherwise

public MacroDefinition unmarshal (XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)

Unmarshalls a StAX event stream to an object.

Parameters
reader a reader over the fragment to unmarshall
mainFragmentTransformer TODO
conversionContext the conversion context
Returns
  • the unmarshalled object