Interface CommentService

    • Method Detail

      • getComments

        java.util.List<CommentModel> getComments​(UserModel user,
                                                 DomainModel domain,
                                                 int offset,
                                                 int count)
        Returns all comments in the specified domain where user is a participant.
        Parameters:
        user - comment participant
        domain - comment domain
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getComments

        java.util.List<CommentModel> getComments​(UserModel user,
                                                 java.util.Collection<ComponentModel> components,
                                                 int offset,
                                                 int count)
        Returns all comments in the specified domain components where user is a participant.
        Parameters:
        user - comment participant
        components - domain components
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getComments

        java.util.List<CommentModel> getComments​(UserModel user,
                                                 DomainModel domain,
                                                 java.util.Collection<CommentTypeModel> types,
                                                 int offset,
                                                 int count)
        Returns all comments in the specified domain which are of the specified types and where user is a participant.
        Parameters:
        user - comment participant
        domain - comment domain
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getComments

        java.util.List<CommentModel> getComments​(UserModel user,
                                                 java.util.Collection<ComponentModel> components,
                                                 java.util.Collection<CommentTypeModel> types,
                                                 int offset,
                                                 int count)
        Returns all comments in the specified domain components which are of the specified types and where user is a participant.
        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
      • getItemComments

        java.util.List<CommentModel> getItemComments​(ItemModel item,
                                                     UserModel user,
                                                     DomainModel domain,
                                                     int offset,
                                                     int count)
        Returns all item comments for the specified item, which are in the specified domain and where user is a participant.
        Parameters:
        item - related item
        user - comment participant
        domain - comment domain
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getItemComments

        java.util.List<CommentModel> getItemComments​(ItemModel item,
                                                     UserModel user,
                                                     java.util.Collection<ComponentModel> components,
                                                     int offset,
                                                     int count)
        Returns all item comments for the specified item, which are in the specified domain components and where user is a participant.
        Parameters:
        item - related item
        user - comment participant
        components - domain components
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getItemComments

        java.util.List<CommentModel> getItemComments​(ItemModel item,
                                                     UserModel user,
                                                     DomainModel domain,
                                                     java.util.Collection<CommentTypeModel> types,
                                                     int offset,
                                                     int count)
        Returns all item comments for the specified item, which are in the specified domain, of the specified types and where user is a participant.
        Parameters:
        item - related item
        user - comment participant
        domain - comment domain
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getItemComments

        java.util.List<CommentModel> getItemComments​(ItemModel item,
                                                     UserModel user,
                                                     java.util.Collection<ComponentModel> components,
                                                     java.util.Collection<CommentTypeModel> types,
                                                     int offset,
                                                     int count)
        Returns all item comments for the specified item, which are in the specified domain components, of the specified types and where user is a participant.
        Parameters:
        item - related item
        user - comment participant
        components - domain components
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getDirectReplies

        java.util.List<ReplyModel> getDirectReplies​(CommentModel comment,
                                                    int offset,
                                                    int count)
        Returns all direct comment replies for the specified comment.
        Parameters:
        comment - the comment
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • getDomainForCode

        DomainModel getDomainForCode​(java.lang.String domainCode)
        Returns the domain with specified code.
        Parameters:
        domainCode - domain code
        Returns:
        domain with the specified code or null if no domain with the code could be found
      • getComponentForCode

        ComponentModel getComponentForCode​(DomainModel domain,
                                           java.lang.String componentCode)
        Returns the domain component with the specified code.
        Parameters:
        domain - domain
        componentCode - domain component code
        Returns:
        component in the specified domain with the specified code or null if component could not be found
      • getCommentTypeForCode

        CommentTypeModel getCommentTypeForCode​(ComponentModel component,
                                               java.lang.String commentTypeCode)
        Returns the comment type with the specified code.
        Parameters:
        component - domain component
        commentTypeCode - comment type code
        Returns:
        comment type in the specified domain component with the specified code or null if type could not be found
      • createReply

        ReplyModel createReply​(UserModel author,
                               AbstractCommentModel comment,
                               java.lang.String text)
        Creates and returns a new comment reply.
        Parameters:
        author - reply author
        comment - comment to reply to
        text - reply content
        Returns:
        created reply
      • getAvailableCommentTypes

        java.util.Collection<CommentTypeModel> getAvailableCommentTypes​(ComponentModel component)
        Returns the available comment types for a given component.