public class StoragePlainTextLinkBodyUnmarshaller extends Object implements Unmarshaller<PlainTextLinkBody>
Any events encountered with the reader that are not characters or entity data are ignored.
Constructor and Description |
---|
StoragePlainTextLinkBodyUnmarshaller() |
Modifier and Type | Method and Description |
---|---|
boolean |
handles(StartElement startElementEvent,
ConversionContext conversionContext)
Determines whether or not this unmarshaller should be applied to a fragment with the specified start element.
|
PlainTextLinkBody |
unmarshal(XMLEventReader reader,
FragmentTransformer mainFragmentTransformer,
ConversionContext conversionContext)
Implementation Note: In actual use this Unmarshaller will be operating on a 'storage reader'.
|
public StoragePlainTextLinkBodyUnmarshaller()
public PlainTextLinkBody unmarshal(XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext) throws XhtmlException
com.atlassian.confluence.content.render.xhtml.DefaultXmlEventReaderFactory#createXmlEventReaderWithNamespaces(java.io.Reader, java.util.List, boolean)
actually performs entity replacement automatically.
However to both allow for unit testing and for safety should the reader configuration change then this unmarshaller will also perform explicit HTML decoding on the link body read.
unmarshal
in interface Unmarshaller<PlainTextLinkBody>
reader
- a reader over the fragment to unmarshallmainFragmentTransformer
- TODOconversionContext
- the conversion contextXhtmlException
- if some other problem occurspublic boolean handles(StartElement startElementEvent, ConversionContext conversionContext)
Unmarshaller
handles
in interface Unmarshaller<PlainTextLinkBody>
startElementEvent
- start elementconversionContext
- the conversion contextCopyright © 2003–2019 Atlassian. All rights reserved.