Class MakeRelativeAndDelegateResourceIdentifierMarshaller
java.lang.Object
com.atlassian.confluence.content.render.xhtml.storage.resource.identifiers.MakeRelativeAndDelegateResourceIdentifierMarshaller
- All Implemented Interfaces:
Marshaller<ResourceIdentifier>
public class MakeRelativeAndDelegateResourceIdentifierMarshaller
extends Object
implements Marshaller<ResourceIdentifier>
A Marshaller for ResourceIdentifiers which will first attempt to make the ResourceIdentifier as relative as
possible before delegating for actual marshalling.
A relative resource identifier could be either space relative meaning that it has no space key or may be 'entity relative' which means it is not required at all. In the latter case marshalling of the supplied ResourceIdentifier will produce an empty String.
-
Constructor Summary
ConstructorDescriptionMakeRelativeAndDelegateResourceIdentifierMarshaller
(Marshaller<ResourceIdentifier> delegate, ResourceIdentifierContextUtility resourceIdentifierContextUtility) -
Method Summary
Modifier and TypeMethodDescriptionmarshal
(ResourceIdentifier resourceId, ConversionContext conversionContext) Marshals an object to XML.
-
Constructor Details
-
MakeRelativeAndDelegateResourceIdentifierMarshaller
public MakeRelativeAndDelegateResourceIdentifierMarshaller(Marshaller<ResourceIdentifier> delegate, ResourceIdentifierContextUtility resourceIdentifierContextUtility)
-
-
Method Details
-
marshal
public Streamable marshal(ResourceIdentifier resourceId, ConversionContext conversionContext) throws XhtmlException Description copied from interface:Marshaller
Marshals an object to XML.- Specified by:
marshal
in interfaceMarshaller<ResourceIdentifier>
- Parameters:
resourceId
- object to marshalconversionContext
- the conversion context- Returns:
- the XML representation of the object
- Throws:
XhtmlException
- if an error occurs during marshalling
-