Class ImageLinkEmoticonUnmarshaller
java.lang.Object
com.atlassian.confluence.content.render.xhtml.image.ImageLinkEmoticonUnmarshaller
- All Implemented Interfaces:
Unmarshaller<Emoticon>
Due to CONFSERVER-52441, instances may have emoticons which have been incorrectly stored as images.
This unmarshaller will handle such content by converting it to a valid emoticon object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
handles
(StartElement startElementEvent, ConversionContext conversionContext) Handle elements with the "emoticon" class and the emoticon-[type] attribute where [type] is a valid Confluence emoticonunmarshal
(XMLEventReader xmlEventReader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext) Unmarshalls a StAX event stream to an object.
-
Constructor Details
-
ImageLinkEmoticonUnmarshaller
public ImageLinkEmoticonUnmarshaller()
-
-
Method Details
-
handles
Handle elements with the "emoticon" class and the emoticon-[type] attribute where [type] is a valid Confluence emoticon- Specified by:
handles
in interfaceUnmarshaller<Emoticon>
- Parameters:
startElementEvent
- start elementconversionContext
- the conversion context- Returns:
- true if this unmarshaller can be applied, false otherwise
-
unmarshal
public Emoticon unmarshal(XMLEventReader xmlEventReader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext) throws XhtmlException Description copied from interface:Unmarshaller
Unmarshalls a StAX event stream to an object.- Specified by:
unmarshal
in interfaceUnmarshaller<Emoticon>
- Parameters:
xmlEventReader
- a reader over the fragment to unmarshallmainFragmentTransformer
- TODOconversionContext
- the conversion context- Returns:
- the emoticon represented in the supplied XMLEventReader or throws an exception if no Emoticon can be created.
- Throws:
XhtmlException
- if some other problem occurs
-