|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.content.render.xhtml.storage.InlineTasksUtils
public class InlineTasksUtils
Utilities to parse Inline Tasks
Field Summary | |
---|---|
static QName |
CSS_CLASS_ATTRIBUTE
|
static String |
CSS_CLASS_CHECKED
|
static String |
CSS_CLASS_INLINE_TASK
|
static QName |
INLINE_TASK_ID_DATA_ATTRIBUTE
|
static String |
INLINE_TASK_ID_DATA_ATTRIBUTE_NAME
|
static QName |
INLINE_TASK_STATUS_ATTRIBUTE
|
static String |
INLINE_TASK_STATUS_NAME
|
static QName |
LI_TAG
|
static QName |
P_TAG
|
static QName |
TABLE_TAG
|
static QName |
UL_TAG
|
Constructor Summary | |
---|---|
InlineTasksUtils()
|
Method Summary | |
---|---|
static List<DataSource> |
getRequiredResources(DataSourceFactory dataSourceFactory,
String htmlContent)
Returns the inline task DataSource resources required for the specified content. |
static boolean |
isStartOfInlineTask(XMLEvent event)
Returns true if the event is the start event of an Inline Task. |
static String |
parseTitle(XMLEventReader reader,
List<String> mentions,
UserAccessor userAccessor)
Assuming the last consumed element of the reader was the beginning of an Inline Task, consumes all events until the end of the title and returns the title and the mentions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final QName LI_TAG
public static final QName UL_TAG
public static final QName TABLE_TAG
public static final QName P_TAG
public static final QName CSS_CLASS_ATTRIBUTE
public static final String CSS_CLASS_CHECKED
public static final String CSS_CLASS_INLINE_TASK
public static final String INLINE_TASK_ID_DATA_ATTRIBUTE_NAME
public static final QName INLINE_TASK_ID_DATA_ATTRIBUTE
public static final String INLINE_TASK_STATUS_NAME
public static final QName INLINE_TASK_STATUS_ATTRIBUTE
Constructor Detail |
---|
public InlineTasksUtils()
Method Detail |
---|
public static boolean isStartOfInlineTask(XMLEvent event) throws XMLStreamException
XMLStreamException
public static String parseTitle(XMLEventReader reader, List<String> mentions, UserAccessor userAccessor) throws XMLStreamException
Assuming the last consumed element of the reader was the beginning of an Inline Task, consumes all events until the end of the title and returns the title and the mentions.
The behaviour is undetermined if the last consumed element wasn't the beginning of an Inline Task.
It leaves alone the first foreign element of the reader: the start event of a sublist, a table, etc. It consumes the </li> if it meets it and stops afterwards.
The returned title uses a pretty gross approximation that free text in the storage format leads to a user-facing description for the task.
reader
- the readermentions
- a modifiable list where the mentioned users will be added. Only the first mention should be
considered as the assignee.userAccessor
-
XMLStreamException
public static List<DataSource> getRequiredResources(DataSourceFactory dataSourceFactory, String htmlContent)
DiffInlineTaskMarshaller
dataSourceFactory
- DataSourceFactory to retrieve resourceshtmlContent
- html formatted content in which inline tasks may appear
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |