com.atlassian.confluence.content.render.xhtml.storage.link
Class StorageLinkBodyMarshaller

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.storage.link.StorageLinkBodyMarshaller
All Implemented Interfaces:
Marshaller<LinkBody<?>>

public class StorageLinkBodyMarshaller
extends Object
implements Marshaller<LinkBody<?>>

Marshall a LinkBody to storage format.

RichTextLinkBody instances are assumed to already be XHTML formatted and are written unchanged.

PlainTextLinkBody instances are HTMLencoded before being written.

EmbeddedImageLinkBody instances will be delegated to the configured embeddedImageMarshaller for writing.


Constructor Summary
StorageLinkBodyMarshaller(Marshaller<EmbeddedImage> embeddedImageMarshaller, XmlStreamWriterTemplate xmlStreamWriterTemplate)
           
 
Method Summary
 String marshal(LinkBody<?> linkBody, ConversionContext conversionContext)
          Marshals an object to XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageLinkBodyMarshaller

public StorageLinkBodyMarshaller(Marshaller<EmbeddedImage> embeddedImageMarshaller,
                                 XmlStreamWriterTemplate xmlStreamWriterTemplate)
Method Detail

marshal

public String marshal(LinkBody<?> linkBody,
                      ConversionContext conversionContext)
               throws XhtmlException
Description copied from interface: Marshaller
Marshals an object to XML.

Specified by:
marshal in interface Marshaller<LinkBody<?>>
Parameters:
linkBody -
conversionContext - the conversion context
Returns:
the marshalled body or null if link body is null.
Throws:
XhtmlException


Copyright © 2003-2012 Atlassian. All Rights Reserved.