Class DefaultCockpitCommentService

    • Constructor Detail

      • DefaultCockpitCommentService

        public DefaultCockpitCommentService()
    • Method Detail

      • getItemComments

        public java.util.List<CommentModel> getItemComments​(ItemModel item,
                                                            UserModel user,
                                                            java.util.Collection<ComponentModel> components,
                                                            java.util.Collection<CommentTypeModel> types,
                                                            int offset,
                                                            int count)
        Description copied from interface: CockpitCommentService
        Gets comments.
        Specified by:
        getItemComments in interface CockpitCommentService
        Parameters:
        item - the item that has been commented on
        user - the author
        components - the related comment components
        types - the comment type
        offset - the search offset
        count - the maximum number of comments to return
        Returns:
        list of all the comments matching the specified criteria
      • getItemCommentsQuery

        public Query getItemCommentsQuery​(ItemModel item,
                                          UserModel user,
                                          java.util.Collection<ComponentModel> components,
                                          java.util.Collection<CommentTypeModel> types)
        Description copied from interface: CockpitCommentService
        Get item comments query.
        Specified by:
        getItemCommentsQuery in interface CockpitCommentService
        Parameters:
        item - the item that has been commented on
        user - the author or the watcher or the user assigned to the comment
        components - the related comment components
        types - the comment type
        Returns:
        query for getting all comments matching the specified criteria
      • getDirectReplies

        public java.util.List<ReplyModel> getDirectReplies​(CommentModel comment,
                                                           int offset,
                                                           int count)
        Description copied from interface: CockpitCommentService
        Returns all direct comment replies for the specified comment.
        Specified by:
        getDirectReplies in interface CockpitCommentService
        Parameters:
        comment - the comment
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getComments

        public java.util.List<CommentModel> getComments​(UserModel user,
                                                        java.util.Collection<ComponentModel> components,
                                                        java.util.Collection<CommentTypeModel> types,
                                                        int offset,
                                                        int count)
        Description copied from interface: CockpitCommentService
        Returns all comments in the specified domain components which are of the specified types and where user is a participant.
        Specified by:
        getComments in interface CockpitCommentService
        Parameters:
        user - comment participant
        components - domain components
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getCurrentUserComments

        public java.util.List<CommentModel> getCurrentUserComments()
        Description copied from interface: CockpitCommentService
        Returns all comments in the default domain components which are of the default types and where the current user is a participant.
        Specified by:
        getCurrentUserComments in interface CockpitCommentService
        Returns:
        all found comments in the default range
      • getCurrentUserComments

        public java.util.List<CommentModel> getCurrentUserComments​(org.zkoss.zk.ui.Desktop desktop)
        Description copied from interface: CockpitCommentService
        Returns all comments in the default domain components which are of the default types and where the current user is a participant.
        Specified by:
        getCurrentUserComments in interface CockpitCommentService
        Returns:
        all found comments in the default range
      • setRead

        public void setRead​(TypedObject commentItem,
                            boolean read)
        Description copied from interface: CockpitCommentService
        Sets the read status of the specified commentItem for the current user
        Specified by:
        setRead in interface CockpitCommentService
        Parameters:
        commentItem - the commentItem (comment or reply)
        read - true, if commentItem should be marked as read, false otherwise
      • getCommentService

        @Deprecated
        public CommentService getCommentService()
        Deprecated.
        since 6.3
      • setCommentService

        public void setCommentService​(CommentService commentService)
      • getUserService

        @Deprecated
        public UserService getUserService()
        Deprecated.
        since 6.3
      • setUserService

        public void setUserService​(UserService userService)