java.lang.Object |
↳ |
com.atlassian.confluence.content.render.xhtml.storage.link.StoragePlainTextLinkBodyUnmarshaller |
Class Overview
Handle a link body that is expected to contain only HTML encoded character data. This data will
be decoded and returned in the PlainTextLinkBody.
Any events encountered with the reader that are not characters or entity data are ignored.
Summary
Public Methods |
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 Constructors
public
StoragePlainTextLinkBodyUnmarshaller
()
Public Methods
public
boolean
handles
(StartElement startElementEvent, ConversionContext conversionContext)
Determines whether or not this unmarshaller should be applied to a fragment with the specified start element.
Parameters
startElementEvent
| start element |
conversionContext
| the conversion context |
Returns
- true if this unmarshaller can be applied, false otherwise
Implementation Note: In actual use this Unmarshaller will be operating on a 'storage reader'. The
storage reader
(com.atlassian.confluence.content.render.xhtml.DefaultXmlEventReaderFactory.createXmlEventReaderWithNamespaces(Reader, 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.
Parameters
reader
| a reader over the fragment to unmarshall |
mainFragmentTransformer
| TODO |
conversionContext
| the conversion context |
Returns
- the decoded PlainTextLinkBody