Class CommentRenderServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.tinymceplugin.service.impl.CommentRenderServiceImpl
-
- All Implemented Interfaces:
CommentRenderService
public class CommentRenderServiceImpl extends Object implements CommentRenderService
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERIALIZED_HIGHLIGHTS_JSON_PROPA new Json PropertyJsonContentPropertykey 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 CommentResultrender(Comment comment, boolean hasActions, javax.servlet.http.HttpServletRequest httpRequest)CommentResultrender(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 PropertyJsonContentPropertykey 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:
renderin interfaceCommentRenderService- Throws:
XMLStreamExceptionXhtmlException
-
render
public CommentResult render(Comment comment, boolean hasActions, javax.servlet.http.HttpServletRequest httpRequest, int maxLength, boolean plainTextOnly) throws XMLStreamException, XhtmlException
Description copied from interface:CommentRenderServiceCreate the JSON representation of a Comment- Specified by:
renderin 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:
XMLStreamExceptionXhtmlException
-
-