Class NotesApi

    • Constructor Detail

      • NotesApi

        public NotesApi​(GitLabApi gitLabApi)
    • Method Detail

      • getIssueNotes

        public java.util.List<Note> getIssueNotes​(java.lang.Object projectIdOrPath,
                                                  java.lang.Long issueIid)
                                           throws GitLabApiException
        Get a list of the issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue ID to get the notes for
        Returns:
        a list of the issues's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotes

        public java.util.List<Note> getIssueNotes​(java.lang.Object projectIdOrPath,
                                                  java.lang.Long issueIid,
                                                  int page,
                                                  int perPage)
                                           throws GitLabApiException
        Get a list of the issue's notes using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotes

        public Pager<Note> getIssueNotes​(java.lang.Object projectIdOrPath,
                                         java.lang.Long issueIid,
                                         int itemsPerPage)
                                  throws GitLabApiException
        Get a Pager of issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotesStream

        public java.util.stream.Stream<Note> getIssueNotesStream​(java.lang.Object projectIdOrPath,
                                                                 java.lang.Long issueIid)
                                                          throws GitLabApiException
        Get a Stream of the issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue ID to get the notes for
        Returns:
        a Stream of the issues's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNote

        public Note getIssueNote​(java.lang.Object projectIdOrPath,
                                 java.lang.Long issueIid,
                                 java.lang.Long noteId)
                          throws GitLabApiException
        Get the specified issues's note.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        noteId - the ID of the Note to get
        Returns:
        a Note instance for the specified IDs
        Throws:
        GitLabApiException - if any exception occurs
      • createIssueNote

        public Note createIssueNote​(java.lang.Object projectIdOrPath,
                                    java.lang.Long issueIid,
                                    java.lang.String body)
                             throws GitLabApiException
        Create a issues's note.
        GitLab Endpoint: POST /projects/:id/issues/:issue_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues for
        issueIid - the issue IID to create the notes for
        body - the content of note
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • createIssueNote

        public Note createIssueNote​(java.lang.Object projectIdOrPath,
                                    java.lang.Long issueIid,
                                    java.lang.String body,
                                    java.util.Date createdAt)
                             throws GitLabApiException
        Create a issues's note.
        GitLab Endpoint: POST /projects/:id/issues/:issue_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to create the notes for
        body - the content of note
        createdAt - the created time of note
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • createIssueNote

        public Note createIssueNote​(java.lang.Object projectIdOrPath,
                                    java.lang.Long issueIid,
                                    java.lang.String body,
                                    java.util.Date createdAt,
                                    java.lang.Boolean internal)
                             throws GitLabApiException
        Create a issues's note.
        GitLab Endpoint: POST /projects/:id/issues/:issue_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to create the notes for
        body - the content of note
        createdAt - the created time of note
        internal - whether the note shall be marked 'internal'
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • updateIssueNote

        public Note updateIssueNote​(java.lang.Object projectIdOrPath,
                                    java.lang.Long issueIid,
                                    java.lang.Long noteId,
                                    java.lang.String body)
                             throws GitLabApiException
        Update the specified issues's note.
        GitLab Endpoint: PUT /projects/:id/issues/:issue_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to update the notes for
        noteId - the ID of the node to update
        body - the update content for the Note
        Returns:
        the modified Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • deleteIssueNote

        public void deleteIssueNote​(java.lang.Object projectIdOrPath,
                                    java.lang.Long issueIid,
                                    java.lang.Long noteId)
                             throws GitLabApiException
        Delete the specified issues's note.
        GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        issueIid - the issue IID to delete the notes for
        noteId - the ID of the node to delete
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public java.util.List<Note> getMergeRequestNotes​(java.lang.Object projectIdOrPath,
                                                         java.lang.Long mergeRequestIid)
                                                  throws GitLabApiException
        Gets a list of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        Returns:
        a list of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public java.util.List<Note> getMergeRequestNotes​(java.lang.Object projectIdOrPath,
                                                         java.lang.Long mergeRequestIid,
                                                         Constants.SortOrder sortOrder,
                                                         Note.OrderBy orderBy)
                                                  throws GitLabApiException
        Gets a list of all notes for a single merge request.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        Returns:
        a list of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public java.util.List<Note> getMergeRequestNotes​(java.lang.Object projectIdOrPath,
                                                         java.lang.Long mergeRequestIid,
                                                         int page,
                                                         int perPage)
                                                  throws GitLabApiException
        Gets a list of all notes for a single merge request using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public java.util.List<Note> getMergeRequestNotes​(java.lang.Object projectIdOrPath,
                                                         java.lang.Long mergeRequestIid,
                                                         Constants.SortOrder sortOrder,
                                                         Note.OrderBy orderBy,
                                                         int page,
                                                         int perPage)
                                                  throws GitLabApiException
        Gets a list of all notes for a single merge request using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public Pager<Note> getMergeRequestNotes​(java.lang.Object projectIdOrPath,
                                                java.lang.Long mergeRequestIid,
                                                int itemsPerPage)
                                         throws GitLabApiException
        Get a Pager of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotesStream

        public java.util.stream.Stream<Note> getMergeRequestNotesStream​(java.lang.Object projectIdOrPath,
                                                                        java.lang.Long mergeRequestIid)
                                                                 throws GitLabApiException
        Gets a Stream of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        Returns:
        a Stream of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public Pager<Note> getMergeRequestNotes​(java.lang.Object projectIdOrPath,
                                                java.lang.Long mergeRequestIid,
                                                Constants.SortOrder sortOrder,
                                                Note.OrderBy orderBy,
                                                int itemsPerPage)
                                         throws GitLabApiException
        Get a Pager of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotesStream

        public java.util.stream.Stream<Note> getMergeRequestNotesStream​(java.lang.Object projectIdOrPath,
                                                                        java.lang.Long mergeRequestIid,
                                                                        Constants.SortOrder sortOrder,
                                                                        Note.OrderBy orderBy)
                                                                 throws GitLabApiException
        Gets a Stream of all notes for a single merge request.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        Returns:
        a Stream of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNote

        public Note getMergeRequestNote​(java.lang.Object projectIdOrPath,
                                        java.lang.Long mergeRequestIid,
                                        java.lang.Long noteId)
                                 throws GitLabApiException
        Get the specified merge request's note.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        noteId - the ID of the Note to get
        Returns:
        a Note instance for the specified IDs
        Throws:
        GitLabApiException - if any exception occurs
      • createMergeRequestNote

        public Note createMergeRequestNote​(java.lang.Object projectIdOrPath,
                                           java.lang.Long mergeRequestIid,
                                           java.lang.String body)
                                    throws GitLabApiException
        Create a merge request's note.
        GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to create the notes for
        body - the content of note
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • updateMergeRequestNote

        public Note updateMergeRequestNote​(java.lang.Object projectIdOrPath,
                                           java.lang.Long mergeRequestIid,
                                           java.lang.Long noteId,
                                           java.lang.String body)
                                    throws GitLabApiException
        Update the specified merge request's note.
        GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to update the notes for
        noteId - the ID of the node to update
        body - the update content for the Note
        Returns:
        the modified Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • deleteMergeRequestNote

        public void deleteMergeRequestNote​(java.lang.Object projectIdOrPath,
                                           java.lang.Long mergeRequestIid,
                                           java.lang.Long noteId)
                                    throws GitLabApiException
        Delete the specified merge request's note.
        GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to delete the notes for
        noteId - the ID of the node to delete
        Throws:
        GitLabApiException - if any exception occurs