Interface Comments

  • All Known Implementing Classes:
    CommentsImpl

    public interface Comments
    Offers access to all Comments of all Books.
    Author:
    Maximilian Schiedermeier
    • Method Detail

      • getAllCommentsForBook

        Map<Long,​String> getAllCommentsForBook​(long isbn)
        Returns all comments stored for a specific book.
        Parameters:
        isbn - as the identifier of the book in question
        Returns:
        a map of commentIds to comments.
      • addComment

        void addComment​(long isbn,
                        String comment)
        Add a comment to an existing book. Comments for non-indexed books (isbn not listed in assortmentMap) are rejected.
        Parameters:
        isbn - as the identifier of the book in question
        comment - as a string representing the comment to be added
      • deleteComment

        void deleteComment​(long isbn,
                           long commentId)
        Removes a previously stored comment for a specific book.
        Parameters:
        isbn - as the identifier of the book in question
        commentId - as the id of the comment to be removed
      • removeAllCommentsForBook

        void removeAllCommentsForBook​(long isbn)
        Removes all previously stored comments for a specific book.
        Parameters:
        isbn - as the identifier of the book in question
      • editComment

        void editComment​(long isbn,
                         long commentId,
                         String updatedComment)
        Overwrites an already existing specific comment for a specific book.
        Parameters:
        isbn - as the identifier of the book in question
        commentId - as the id of the comment to be overwritten
        updatedComment - as a string representing the updated comment