Class CommentRenderServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.tinymceplugin.service.impl.CommentRenderServiceImpl
-
- All Implemented Interfaces:
CommentRenderService
@Component public class CommentRenderServiceImpl extends Object implements CommentRenderService
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERIALIZED_HIGHLIGHTS_JSON_PROP
A new Json PropertyJsonContentProperty
key for the reference to the serialized string of the highlights
-
Constructor Summary
Constructors Constructor Description CommentRenderServiceImpl(XhtmlContent xhtmlContent, com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPropertyService contentPropertyService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommentResult
render(Comment comment, boolean hasActions, javax.servlet.http.HttpServletRequest httpRequest)
CommentResult
render(Comment comment, boolean hasActions, javax.servlet.http.HttpServletRequest httpRequest, int maxLength, boolean plainTextOnly)
Create the JSON representation of a Comment
-
-
-
Field Detail
-
SERIALIZED_HIGHLIGHTS_JSON_PROP
public static final String SERIALIZED_HIGHLIGHTS_JSON_PROP
A new Json PropertyJsonContentProperty
key for the reference to the serialized string of the highlights- Since:
- 5.7
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CommentRenderServiceImpl
public CommentRenderServiceImpl(XhtmlContent xhtmlContent, com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPropertyService contentPropertyService)
-
-
Method Detail
-
render
public CommentResult render(Comment comment, boolean hasActions, javax.servlet.http.HttpServletRequest httpRequest) throws XMLStreamException, XhtmlException
- Specified by:
render
in interfaceCommentRenderService
- Throws:
XMLStreamException
XhtmlException
-
render
public CommentResult render(Comment comment, boolean hasActions, javax.servlet.http.HttpServletRequest httpRequest, int maxLength, boolean plainTextOnly) throws XMLStreamException, XhtmlException
Description copied from interface:CommentRenderService
Create the JSON representation of a Comment- Specified by:
render
in interfaceCommentRenderService
- Parameters:
comment
- the comment to be renderedhasActions
- determine whether the returned object includes the action informationmaxLength
- the maximum length of the rendered comment's contentplainTextOnly
- the content will be rendered as plain text if this flag is true- Returns:
- the transfer object (to be serialized to JSON)
- Throws:
XMLStreamException
XhtmlException
-
-