com.atlassian.confluence.content.render.xhtml.storage.macro.inlinebody
Class InlineBodyMacroFixingTransformer

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.storage.macro.inlinebody.InlineBodyMacroFixingTransformer
All Implemented Interfaces:
Transformer

public class InlineBodyMacroFixingTransformer
extends Object
implements Transformer

Responsible for moving <ac:macro> fragments that output inline markup when rendered, into any nearby paragraphs.

For example:

 <p>foo<p>
 <ac:macro ac:name="highlight">
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
 </ac:macro>
 
To:
 <p>foo
 <ac:macro ac:name="highlight">
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
 </ac:macro>
 </p>
 
A user can mark a macro as one that outputs INLINE markup by toggling the INLINE button. This will set a macro parameter named atlassian-macro-output-type to the value Macro.OutputType#INLINE.

This transformer will only target <ac:macro> fragments that have this property.

Since:
4.0

Constructor Summary
InlineBodyMacroFixingTransformer(XMLOutputFactory xmlFragmentOutputFactory, XmlEventReaderFactory xmlEventReaderFactory, XMLEventFactory xmlEventFactory)
           
 
Method Summary
 String transform(Reader input, ConversionContext conversionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineBodyMacroFixingTransformer

public InlineBodyMacroFixingTransformer(XMLOutputFactory xmlFragmentOutputFactory,
                                        XmlEventReaderFactory xmlEventReaderFactory,
                                        XMLEventFactory xmlEventFactory)
Method Detail

transform

public String transform(Reader input,
                        ConversionContext conversionContext)
                 throws XhtmlException
Specified by:
transform in interface Transformer
Returns:
Throws:
XhtmlParsingException - if there is a problem parsing the input parameter.
XhtmlException - for all other errors that may occur during transformation.


Copyright © 2003-2013 Atlassian. All Rights Reserved.