com.atlassian.confluence.content.render.xhtml.storage
Class InlineTasksUtils

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.storage.InlineTasksUtils

public class InlineTasksUtils
extends java.lang.Object

Utilities to parse Inline Tasks

Since:
4.3

Field Summary
static javax.xml.namespace.QName CSS_CLASS_ATTRIBUTE
          Deprecated. 
static java.lang.String CSS_CLASS_CHECKED
          Deprecated. 
static java.lang.String CSS_CLASS_INLINE_TASK
          Deprecated. 
static javax.xml.namespace.QName INLINE_TASK_ID_DATA_ATTRIBUTE
          Deprecated. 
static java.lang.String INLINE_TASK_ID_DATA_ATTRIBUTE_NAME
           
static javax.xml.namespace.QName INLINE_TASK_STATUS_ATTRIBUTE
          Deprecated. 
static java.lang.String INLINE_TASK_STATUS_NAME
           
static javax.xml.namespace.QName LI_TAG
           
static javax.xml.namespace.QName P_TAG
           
static javax.xml.namespace.QName TABLE_TAG
           
static javax.xml.namespace.QName UL_TAG
           
 
Constructor Summary
InlineTasksUtils()
           
 
Method Summary
static java.util.List<javax.activation.DataSource> getRequiredResources(DataSourceFactory dataSourceFactory, java.lang.String htmlContent)
          Returns the inline task DataSource resources required for the specified content.
static boolean isStartOfInlineTask(javax.xml.stream.events.XMLEvent event)
          Deprecated. Since 5.2. Functionality has moved to the confluence-inline-tasks plugin.
static java.lang.String parseTitle(javax.xml.stream.XMLEventReader reader, java.util.List<java.lang.String> mentions, UserAccessor userAccessor)
          Deprecated. Since 5.2. Functionality has moved to the confluence-inline-tasks plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LI_TAG

public static final javax.xml.namespace.QName LI_TAG

UL_TAG

public static final javax.xml.namespace.QName UL_TAG

TABLE_TAG

public static final javax.xml.namespace.QName TABLE_TAG

P_TAG

public static final javax.xml.namespace.QName P_TAG

CSS_CLASS_ATTRIBUTE

@Deprecated
public static final javax.xml.namespace.QName CSS_CLASS_ATTRIBUTE
Deprecated. 

CSS_CLASS_CHECKED

@Deprecated
public static final java.lang.String CSS_CLASS_CHECKED
Deprecated. 

CSS_CLASS_INLINE_TASK

@Deprecated
public static final java.lang.String CSS_CLASS_INLINE_TASK
Deprecated. 

INLINE_TASK_ID_DATA_ATTRIBUTE_NAME

public static final java.lang.String INLINE_TASK_ID_DATA_ATTRIBUTE_NAME

INLINE_TASK_ID_DATA_ATTRIBUTE

@Deprecated
public static final javax.xml.namespace.QName INLINE_TASK_ID_DATA_ATTRIBUTE
Deprecated. 

INLINE_TASK_STATUS_NAME

public static final java.lang.String INLINE_TASK_STATUS_NAME

INLINE_TASK_STATUS_ATTRIBUTE

@Deprecated
public static final javax.xml.namespace.QName INLINE_TASK_STATUS_ATTRIBUTE
Deprecated. 
Constructor Detail

InlineTasksUtils

public InlineTasksUtils()
Method Detail

isStartOfInlineTask

@Deprecated
public static boolean isStartOfInlineTask(javax.xml.stream.events.XMLEvent event)
                                   throws javax.xml.stream.XMLStreamException
Deprecated. Since 5.2. Functionality has moved to the confluence-inline-tasks plugin.

Returns true if the event is the start event of an Inline Task.

Returns:
true if the event is the start event of an Inline Task, false otherwise.
Throws:
javax.xml.stream.XMLStreamException

parseTitle

@Deprecated
public static java.lang.String parseTitle(javax.xml.stream.XMLEventReader reader,
                                                     java.util.List<java.lang.String> mentions,
                                                     UserAccessor userAccessor)
                                   throws javax.xml.stream.XMLStreamException
Deprecated. Since 5.2. Functionality has moved to the confluence-inline-tasks plugin.

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.

Parameters:
reader - the reader
mentions - a modifiable list where the mentioned users will be added. Only the first mention should be considered as the assignee.
userAccessor -
Returns:
the title
Throws:
javax.xml.stream.XMLStreamException

getRequiredResources

public static java.util.List<javax.activation.DataSource> getRequiredResources(DataSourceFactory dataSourceFactory,
                                                                               java.lang.String htmlContent)
Returns the inline task DataSource resources required for the specified content. Can be used for:

Parameters:
dataSourceFactory - DataSourceFactory to retrieve resources
htmlContent - html formatted content in which inline tasks may appear
Returns:
a list of the inline task resources required by the specified content


Copyright © 2003-2014 Atlassian. All Rights Reserved.