Class ImageLinkEmoticonUnmarshaller
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.image.ImageLinkEmoticonUnmarshaller
-
- All Implemented Interfaces:
Unmarshaller<Emoticon>
public class ImageLinkEmoticonUnmarshaller extends Object implements 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
Constructors Constructor Description ImageLinkEmoticonUnmarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
handles(StartElement startElementEvent, ConversionContext conversionContext)
Handle elements with the "emoticon" class and the emoticon-[type] attribute where [type] is a valid Confluence emoticonEmoticon
unmarshal(XMLEventReader xmlEventReader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)
Unmarshalls a StAX event stream to an object.
-
-
-
Method Detail
-
handles
public boolean handles(StartElement startElementEvent, ConversionContext conversionContext)
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
-
-