Class DelegatingLinkMarshaller
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.DelegatingLinkMarshaller
-
- All Implemented Interfaces:
Marshaller<Link>
public class DelegatingLinkMarshaller extends Object implements Marshaller<Link>
-
-
Constructor Summary
Constructors Constructor Description DelegatingLinkMarshaller(Map<String,Marshaller<Link>> marshallersByClassSimpleName, ResourceIdentifierContextUtility resourceIdentifierContextUtility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Marshaller<Link>
getMarshallerForResourceIdentifier(ResourceIdentifier ri)
protected ResourceIdentifier
getResourceIdentifier(Link link, ConversionContext conversionContext)
Streamable
marshal(Link link, ConversionContext conversionContext)
Marshals an object to XML.
-
-
-
Constructor Detail
-
DelegatingLinkMarshaller
public DelegatingLinkMarshaller(Map<String,Marshaller<Link>> marshallersByClassSimpleName, ResourceIdentifierContextUtility resourceIdentifierContextUtility)
- Parameters:
marshallersByClassSimpleName
- a Map where the keys are the simple names (Class.getSimpleName()
) ofResourceIdentifier
and the values are the Marshaller suitable for handling that type of resource identifier.resourceIdentifierContextUtility
- a utility capable of converting relative ResourceIdentifiers to being absolute.
-
-
Method Detail
-
marshal
public Streamable marshal(Link link, ConversionContext conversionContext) throws XhtmlException
Description copied from interface:Marshaller
Marshals an object to XML.- Specified by:
marshal
in interfaceMarshaller<Link>
- Parameters:
link
- object to marshalconversionContext
- the conversion context- Returns:
- the XML representation of the object
- Throws:
XhtmlException
- if an error occurs during marshalling
-
getResourceIdentifier
protected ResourceIdentifier getResourceIdentifier(Link link, ConversionContext conversionContext) throws XhtmlException
- Throws:
XhtmlException
-
getMarshallerForResourceIdentifier
protected Marshaller<Link> getMarshallerForResourceIdentifier(ResourceIdentifier ri)
-
-