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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandles(StartElement startElementEvent, ConversionContext conversionContext) Handleelements with the "emoticon" class and the emoticon-[type] attribute where [type] is a valid Confluence emoticon
unmarshal(XMLEventReader xmlEventReader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext) Unmarshalls a StAX event stream to an object.
-
Constructor Details
-
ImageLinkEmoticonUnmarshaller
public ImageLinkEmoticonUnmarshaller()
-
-
Method Details
-
handles
Handleelements with the "emoticon" class and the emoticon-[type] attribute where [type] is a valid Confluence emoticon
- Specified by:
handlesin 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:UnmarshallerUnmarshalls a StAX event stream to an object.- Specified by:
unmarshalin 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
-