Module bus.gitlab

Class NotesApi

java.lang.Object
org.miaixz.bus.gitlab.AbstractApi
org.miaixz.bus.gitlab.NotesApi
All Implemented Interfaces:
Constants

public class NotesApi extends AbstractApi
  • Constructor Details

    • NotesApi

      public NotesApi(GitLabApi gitLabApi)
  • Method Details

    • getIssueNotes

      public List<Note> getIssueNotes(Object projectIdOrPath, 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 List<Note> getIssueNotes(Object projectIdOrPath, 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(Object projectIdOrPath, 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 Stream<Note> getIssueNotesStream(Object projectIdOrPath, 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(Object projectIdOrPath, Long issueIid, 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(Object projectIdOrPath, Long issueIid, 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(Object projectIdOrPath, Long issueIid, String body, 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(Object projectIdOrPath, Long issueIid, String body, Date createdAt, 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(Object projectIdOrPath, Long issueIid, Long noteId, 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(Object projectIdOrPath, Long issueIid, 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 List<Note> getMergeRequestNotes(Object projectIdOrPath, 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 List<Note> getMergeRequestNotes(Object projectIdOrPath, 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 List<Note> getMergeRequestNotes(Object projectIdOrPath, 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 List<Note> getMergeRequestNotes(Object projectIdOrPath, 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(Object projectIdOrPath, 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 Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, 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(Object projectIdOrPath, 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 Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, 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(Object projectIdOrPath, Long mergeRequestIid, 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(Object projectIdOrPath, Long mergeRequestIid, String body, Date createdAt, Boolean internal) 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
      createdAt - date the discussion was created (requires admin or project/group owner rights) (Optional)
      Returns:
      the created Note instance
      Throws:
      GitLabApiException - if any exception occurs
    • updateMergeRequestNote

      public Note updateMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId, 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(Object projectIdOrPath, Long mergeRequestIid, 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
    • getEpicNotes

      public List<Note> getEpicNotes(Object groupIdOrPath, Long epicId) throws GitLabApiException
      Get a list of the epics's notes.
       GitLab Endpoint: GET /groups/:id/epics/:epic_id/notes
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the IID!) to get the notes for
      Returns:
      a list of the epics's notes
      Throws:
      GitLabApiException - if any exception occurs
    • getEpicNotes

      public List<Note> getEpicNotes(Object groupIdOrPath, Long epicId, int page, int perPage) throws GitLabApiException
      Get a list of the epic's notes using the specified page and per page settings.
       GitLab Endpoint: GET /groups/:id/epics/:epic_id/notes
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the 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
    • getEpicNotes

      public Pager<Note> getEpicNotes(Object groupIdOrPath, Long epicId, int itemsPerPage) throws GitLabApiException
      Get a Pager of epics's notes.
       GitLab Endpoint: GET /groups/:id/epics/:epic_id/notes
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the 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
    • getEpicNotesStream

      public Stream<Note> getEpicNotesStream(Object groupIdOrPath, Long epicId) throws GitLabApiException
      Get a Stream of the epics's notes.
       GitLab Endpoint: GET /groups/:id/epics/:epic_id/notes
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the IID!) to get the notes for
      Returns:
      a Stream of the epics's notes
      Throws:
      GitLabApiException - if any exception occurs
    • getEpicNote

      public Note getEpicNote(Object groupIdOrPath, Long epicId, Long noteId) throws GitLabApiException
      Get the specified epics's note.
       GitLab Endpoint: GET /groups/:id/epics/:epic_id/notes/:note_id
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the 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
    • createEpicNote

      public Note createEpicNote(Object groupIdOrPath, Long epicId, String body) throws GitLabApiException
      Create a epics's note.
       GitLab Endpoint: POST /groups/:id/epics/:epic_id/notes/:note_id
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance @param groupIdOrPath the group ID to create the epics for
      epicId - the epic ID (not the IID!) to create the notes for
      body - the content of note
      Returns:
      the created Note instance
      Throws:
      GitLabApiException - if any exception occurs
    • createEpicNote

      public Note createEpicNote(Object groupIdOrPath, Long epicId, String body, Date createdAt) throws GitLabApiException
      Create a epics's note.
       GitLab Endpoint: POST /groups/:id/epics/:epic_id/notes/:note_id
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the 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
    • createEpicNote

      public Note createEpicNote(Object groupIdOrPath, Long epicId, String body, Date createdAt, Boolean internal) throws GitLabApiException
      Create a epics's note.
       GitLab Endpoint: POST /groups/:id/epics/:epic_id/notes/:note_id
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the 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
    • updateEpicNote

      public Note updateEpicNote(Object groupIdOrPath, Long epicId, Long noteId, String body) throws GitLabApiException
      Update the specified epics's note.
       GitLab Endpoint: PUT /groups/:id/epics/:epic_id/notes/:note_id
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the 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
    • deleteEpicNote

      public void deleteEpicNote(Object groupIdOrPath, Long epicId, Long noteId) throws GitLabApiException
      Delete the specified epics's note.
       GitLab Endpoint: DELETE /groups/:id/epics/:epic_id/notes/:note_id
       
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      epicId - the epic ID (not the IID!) to delete the notes for
      noteId - the ID of the node to delete
      Throws:
      GitLabApiException - if any exception occurs