com.atlassian.confluence.content.render.xhtml.storage.resource.identifiers
Class MakeRelativeAndDelegateResourceIdentifierMarshaller

java.lang.Object
  extended by 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
MakeRelativeAndDelegateResourceIdentifierMarshaller(Marshaller<ResourceIdentifier> delegate, ResourceIdentifierContextUtility resourceIdentifierContextUtility)
           
 
Method Summary
 String marshal(ResourceIdentifier resourceId, 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

MakeRelativeAndDelegateResourceIdentifierMarshaller

public MakeRelativeAndDelegateResourceIdentifierMarshaller(Marshaller<ResourceIdentifier> delegate,
                                                           ResourceIdentifierContextUtility resourceIdentifierContextUtility)
Method Detail

marshal

public String marshal(ResourceIdentifier resourceId,
                      ConversionContext conversionContext)
               throws XhtmlException
Description copied from interface: Marshaller
Marshals an object to XML.

Specified by:
marshal in interface Marshaller<ResourceIdentifier>
Parameters:
resourceId - object to marshal
conversionContext - the conversion context
Returns:
the XML representation of the object
Throws:
XhtmlException


Copyright © 2003-2013 Atlassian. All Rights Reserved.