com.atlassian.confluence.content.render.xhtml.editor.macro
Class EditorBodilessMacroMarshaller

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.editor.macro.EditorBodilessMacroMarshaller
All Implemented Interfaces:
MacroMarshaller
Direct Known Subclasses:
EditorUnknownMacroMarshaller

public class EditorBodilessMacroMarshaller
extends Object
implements MacroMarshaller

Marshal macros that don't have a body to editor format.


Field Summary
protected  CommonMacroAttributeWriter commonAttributeWriter
           
protected  PlaceholderUrlFactory placeholderUrlFactory
           
protected  XMLOutputFactory xmlOutputFactory
           
 
Constructor Summary
EditorBodilessMacroMarshaller(CommonMacroAttributeWriter commonAttributeWriter, PlaceholderUrlFactory placeholderUrlFactory, XMLOutputFactory xmlOutputFactory)
           
 
Method Summary
protected  String getCssClass(MacroDefinition definition)
           
protected  String getImageSource(MacroDefinition definition)
           
 boolean handles(Macro macro)
           
 String marshal(Macro macro, MacroDefinition macroDefinition, ConversionContext conversionContext)
          Marshall the supplied macro.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commonAttributeWriter

protected final CommonMacroAttributeWriter commonAttributeWriter

placeholderUrlFactory

protected final PlaceholderUrlFactory placeholderUrlFactory

xmlOutputFactory

protected final XMLOutputFactory xmlOutputFactory
Constructor Detail

EditorBodilessMacroMarshaller

public EditorBodilessMacroMarshaller(CommonMacroAttributeWriter commonAttributeWriter,
                                     PlaceholderUrlFactory placeholderUrlFactory,
                                     XMLOutputFactory xmlOutputFactory)
Method Detail

handles

public boolean handles(Macro macro)
Specified by:
handles in interface MacroMarshaller
Parameters:
macro - the macro to check. This may be null.
Returns:
true if the MacroMarshaller can handle this macro.

marshal

public String marshal(Macro macro,
                      MacroDefinition macroDefinition,
                      ConversionContext conversionContext)
               throws XhtmlException
Description copied from interface: MacroMarshaller
Marshall the supplied macro.

Specified by:
marshal in interface MacroMarshaller
Parameters:
macro - the macro to be marshalled. It may be null, such as in the case where a Macro has not been identified by the system.
Returns:
Throws:
XhtmlException

getCssClass

protected String getCssClass(MacroDefinition definition)

getImageSource

protected String getImageSource(MacroDefinition definition)


Copyright © 2003-2012 Atlassian. All Rights Reserved.