Class CommentServiceImpl
- java.lang.Object
-
- org.exoplatform.task.service.impl.CommentServiceImpl
-
- All Implemented Interfaces:
CommentService
public class CommentServiceImpl extends Object implements CommentService
-
-
Field Summary
-
Fields inherited from interface org.exoplatform.task.service.CommentService
TASK_COMMENT_CREATION
-
-
Constructor Summary
Constructors Constructor Description CommentServiceImpl(TaskStorage taskStorage, CommentStorage commentStorage, DAOHandler daoHandler, org.exoplatform.services.listener.ListenerService listenerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommentDtoaddComment(TaskDto task, long parentCommentId, String username, String comment)CommentDtoaddComment(TaskDto task, String username, String comment)intcountComments(long taskId)CommentDtogetComment(long commentId)List<CommentDto>getComments(long taskId, int offset, int limit)List<CommentDto>getCommentsWithSubs(long taskId, int offset, int limit)List<CommentDto>loadSubComments(List<CommentDto> listComments)Fetch sub comments of designed commentsvoidremoveComment(long commentId)
-
-
-
Constructor Detail
-
CommentServiceImpl
public CommentServiceImpl(TaskStorage taskStorage, CommentStorage commentStorage, DAOHandler daoHandler, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Detail
-
getComment
public CommentDto getComment(long commentId)
- Specified by:
getCommentin interfaceCommentService
-
getComments
public List<CommentDto> getComments(long taskId, int offset, int limit)
- Specified by:
getCommentsin interfaceCommentService
-
getCommentsWithSubs
public List<CommentDto> getCommentsWithSubs(long taskId, int offset, int limit)
- Specified by:
getCommentsWithSubsin interfaceCommentService
-
countComments
public int countComments(long taskId)
- Specified by:
countCommentsin interfaceCommentService
-
loadSubComments
public List<CommentDto> loadSubComments(List<CommentDto> listComments)
Description copied from interface:CommentServiceFetch sub comments of designed comments- Specified by:
loadSubCommentsin interfaceCommentService- Parameters:
listComments- the given list of comments.- Returns:
- List of sub comments
-
addComment
public CommentDto addComment(TaskDto task, long parentCommentId, String username, String comment) throws EntityNotFoundException
- Specified by:
addCommentin interfaceCommentService- Throws:
EntityNotFoundException
-
addComment
public CommentDto addComment(TaskDto task, String username, String comment) throws EntityNotFoundException
- Specified by:
addCommentin interfaceCommentService- Throws:
EntityNotFoundException
-
removeComment
public void removeComment(long commentId) throws EntityNotFoundException- Specified by:
removeCommentin interfaceCommentService- Throws:
EntityNotFoundException
-
-