Class StorageLinkBodyMarshaller
java.lang.Object
com.atlassian.confluence.content.render.xhtml.storage.link.StorageLinkBodyMarshaller
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionStorageLinkBodyMarshaller
(Marshaller<EmbeddedImage> embeddedImageMarshaller, XmlStreamWriterTemplate xmlStreamWriterTemplate) -
Method Summary
Modifier and TypeMethodDescriptionmarshal
(LinkBody<?> linkBody, ConversionContext conversionContext) Marshals an object to XML.
-
Constructor Details
-
StorageLinkBodyMarshaller
public StorageLinkBodyMarshaller(Marshaller<EmbeddedImage> embeddedImageMarshaller, XmlStreamWriterTemplate xmlStreamWriterTemplate)
-
-
Method Details
-
marshal
public Streamable marshal(LinkBody<?> linkBody, ConversionContext conversionContext) throws XhtmlException Description copied from interface:Marshaller
Marshals an object to XML.- Specified by:
marshal
in interfaceMarshaller<LinkBody<?>>
- Parameters:
linkBody
-conversionContext
- the conversion context- Returns:
- the marshalled body or null if link body is null.
- Throws:
XhtmlException
-