com.atlassian.confluence.content.render.xhtml.view.link
Class ViewDraftLinkMarshaller

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.view.link.ViewDraftLinkMarshaller
All Implemented Interfaces:
Marshaller<Link>

public class ViewDraftLinkMarshaller
extends java.lang.Object
implements Marshaller<Link>

In the Editor, if you are working on a new page then the context object is the Draft for this page. This means that any self links (e.g. anchor links) will have a DraftResourceIdentifier and it therefore must be possible to render such a ResourceIdentifier.

Marshalling links to a Draft is a scenario that can only occur in the Editor. There is no view mode equivalent.


Constructor Summary
ViewDraftLinkMarshaller(Marshaller<Link> linkBodyMarshaller, XmlStreamWriterTemplate xmlStreamWriterTemplate, StaxStreamMarshaller<Link> linkStaxStreamMarshaller, ModelToRenderedClassMapper mapper)
           
 
Method Summary
 Streamable marshal(Link link, 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

ViewDraftLinkMarshaller

public ViewDraftLinkMarshaller(Marshaller<Link> linkBodyMarshaller,
                               XmlStreamWriterTemplate xmlStreamWriterTemplate,
                               StaxStreamMarshaller<Link> linkStaxStreamMarshaller,
                               ModelToRenderedClassMapper mapper)
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 interface Marshaller<Link>
Parameters:
link - object to marshal
conversionContext - the conversion context
Returns:
the XML representation of the object
Throws:
XhtmlException - if an error occurs during marshalling


Copyright © 2003-2014 Atlassian. All Rights Reserved.