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

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.editor.macro.CustomPlaceholderEditorMarshaller
All Implemented Interfaces:
MacroMarshaller

public class CustomPlaceholderEditorMarshaller
extends Object
implements MacroMarshaller

Marshal a macro that provides its own HTML representation for the editor.

This marshaller will perform a simple check to try and ensure that the generated placeholder is an IMG or OBJECT tag which is a current limitation on the custom placeholder accepted by the TinyMCE Editor.


Constructor Summary
CustomPlaceholderEditorMarshaller(CommonMacroAttributeWriter commonAttributeWriter, PlaceholderUrlFactory placeholderUrlFactory, XMLOutputFactory xmlOutputFactory)
           
 
Method Summary
 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
 

Constructor Detail

CustomPlaceholderEditorMarshaller

public CustomPlaceholderEditorMarshaller(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


Copyright © 2003-2013 Atlassian. All Rights Reserved.