com.atlassian.confluence.content.render.xhtml.editor.link
Class EditorLinkBodyUnmarshaller

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.editor.link.EditorLinkBodyUnmarshaller
All Implemented Interfaces:
Unmarshaller<LinkBody<?>>

public class EditorLinkBodyUnmarshaller
extends java.lang.Object
implements Unmarshaller<LinkBody<?>>

Unmarshal the body of a link


Constructor Summary
EditorLinkBodyUnmarshaller(Unmarshaller<EmbeddedImage> embeddedImageUnmarshaller, javax.xml.stream.XMLOutputFactory xmlFragmentOutputFactory, XmlEventReaderFactory xmlEventReaderFactory, XmlEntityExpander xmlEntityExpander)
           
 
Method Summary
 boolean handles(javax.xml.stream.events.StartElement startElementEvent, ConversionContext conversionContext)
          This unmarshaller needs to be applied intelligently on a reader with the actual body of a link.
 LinkBody unmarshal(javax.xml.stream.XMLEventReader linkFragmentReader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)
          Unmarshalls a StAX event stream to an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorLinkBodyUnmarshaller

public EditorLinkBodyUnmarshaller(Unmarshaller<EmbeddedImage> embeddedImageUnmarshaller,
                                  javax.xml.stream.XMLOutputFactory xmlFragmentOutputFactory,
                                  XmlEventReaderFactory xmlEventReaderFactory,
                                  XmlEntityExpander xmlEntityExpander)
Method Detail

unmarshal

public LinkBody unmarshal(javax.xml.stream.XMLEventReader linkFragmentReader,
                          FragmentTransformer mainFragmentTransformer,
                          ConversionContext conversionContext)
                   throws XhtmlException
Description copied from interface: Unmarshaller
Unmarshalls a StAX event stream to an object.

Specified by:
unmarshal in interface Unmarshaller<LinkBody<?>>
Parameters:
linkFragmentReader - a reader over the fragment to unmarshall
mainFragmentTransformer - TODO
conversionContext - the conversion context
Returns:
the unmarshalled object
Throws:
XhtmlException - if some other problem occurs

handles

public boolean handles(javax.xml.stream.events.StartElement startElementEvent,
                       ConversionContext conversionContext)
This unmarshaller needs to be applied intelligently on a reader with the actual body of a link. At this stage, there is no requirement for it to be added to a list of unmarshallers. Therefore, no proper handles implementation is required.

Specified by:
handles in interface Unmarshaller<LinkBody<?>>
Parameters:
startElementEvent - start element
conversionContext - the conversion context
Returns:
true if this unmarshaller can be applied, false otherwise


Copyright © 2003-2014 Atlassian. All Rights Reserved.