Class DiffInlineTaskMarshaller
- java.lang.Object
-
- com.atlassian.confluence.diff.marshallers.DiffInlineTaskMarshaller
-
- All Implemented Interfaces:
Marshaller<InlineTaskList>
public class DiffInlineTaskMarshaller extends Object implements Marshaller<InlineTaskList>
This DiffInlineTaskMarshaller outputs inline task lists in a diffable way:- As little whitespace/CRs as possible, because it disturbs the diff,
- DaisyDiff doesn't diffs lists properly when they contain multiple spans, and it puts spans outside the LI and inside the UL, which doesn't produce a workable output. Thus, we don't use UL and LI.
- Use <inline-task-list-ul/> in place of UL. Keeps the css class on it so that it presents nicely when diff-cleanup.xsl transforms it back to UL.
- Use <inline-task-list-li/> in lieu of LI. No task ID on it, as the diff purpose isn't to compare task ids.
- Use <inline-task-check-marker class="inline-task [checked]"> </inline-task-check-marker> for the tick, so that it can be compared separately
-
-
Constructor Summary
Constructors Constructor Description DiffInlineTaskMarshaller(XMLOutputFactory xmlOutputFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Streamable
marshal(InlineTaskList inlineTaskList, ConversionContext conversionContext)
Marshals an object to XML.protected void
writeInlineTaskImage(XMLStreamWriter xmlStreamWriter, InlineTaskListItem listItem)
-
-
-
Constructor Detail
-
DiffInlineTaskMarshaller
public DiffInlineTaskMarshaller(XMLOutputFactory xmlOutputFactory)
-
-
Method Detail
-
marshal
public Streamable marshal(InlineTaskList inlineTaskList, ConversionContext conversionContext) throws XhtmlException
Description copied from interface:Marshaller
Marshals an object to XML.- Specified by:
marshal
in interfaceMarshaller<InlineTaskList>
- Parameters:
inlineTaskList
- object to marshalconversionContext
- the conversion context- Returns:
- the XML representation of the object
- Throws:
XhtmlException
- if an error occurs during marshalling
-
writeInlineTaskImage
protected void writeInlineTaskImage(XMLStreamWriter xmlStreamWriter, InlineTaskListItem listItem) throws XMLStreamException
- Throws:
XMLStreamException
-
-