Package org.gitlab4j.api
Class NotesApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.NotesApi
- All Implemented Interfaces:
Constants
public class NotesApi extends AbstractApi
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Note
createIssueNote(Object projectIdOrPath, Integer issueIid, String body)
Create a issues's note.Note
createIssueNote(Object projectIdOrPath, Integer issueIid, String body, Date createdAt)
Create a issues's note.Note
createMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, String body)
Create a merge request's note.void
deleteIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId)
Delete the specified issues's note.void
deleteMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId)
Delete the specified merge request's note.Note
getIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId)
Get the specified issues's note.List<Note>
getIssueNotes(Object projectIdOrPath, Integer issueIid)
Get a list of the issues's notes.Pager<Note>
getIssueNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage)
Get a Pager of issues's notes.List<Note>
getIssueNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage)
Get a list of the issue's notes using the specified page and per page settings.Stream<Note>
getIssueNotesStream(Object projectIdOrPath, Integer issueIid)
Get a Stream of the issues's notes.Note
getMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId)
Get the specified merge request's note.List<Note>
getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid)
Gets a list of all notes for a single merge requestPager<Note>
getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage)
Get a Pager of all notes for a single merge requestList<Note>
getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage)
Gets a list of all notes for a single merge request using the specified page and per page settings.List<Note>
getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy)
Gets a list of all notes for a single merge request.Pager<Note>
getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy, int itemsPerPage)
Get a Pager of all notes for a single merge requestList<Note>
getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy, int page, int perPage)
Gets a list of all notes for a single merge request using the specified page and per page settings.Stream<Note>
getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid)
Gets a Stream of all notes for a single merge requestStream<Note>
getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy)
Gets a Stream of all notes for a single merge request.List<Note>
getNotes(Object projectIdOrPath, Integer issueIid)
Deprecated.Pager<Note>
getNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage)
Deprecated.As of release 4.7.0, replaced bygetIssueNotes(Object, Integer, int)
List<Note>
getNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage)
Deprecated.As of release 4.7.0, replaced bygetIssueNotes(Object, Integer, int, int)
Note
updateIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId, String body)
Update the specified issues's note.Note
updateMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, String body)
Update the specified merge request's note.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
NotesApi
-
-
Method Details
-
getNotes
@Deprecated public List<Note> getNotes(Object projectIdOrPath, Integer issueIid) throws GitLabApiExceptionDeprecated.As of release 4.7.0, replaced bygetIssueNotes(Object, Integer)
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 Integer(ID), String(path), or Project instanceissueIid
- the issue ID to get the notes for- Returns:
- a list of the issues's notes
- Throws:
GitLabApiException
- if any exception occurs
-
getNotes
@Deprecated public List<Note> getNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiExceptionDeprecated.As of release 4.7.0, replaced bygetIssueNotes(Object, Integer, int, int)
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 Integer(ID), String(path), or Project instanceissueIid
- the issue IID to get the notes forpage
- the page to getperPage
- the number of notes per page- Returns:
- the list of notes in the specified range
- Throws:
GitLabApiException
- if any exception occurs
-
getNotes
@Deprecated public Pager<Note> getNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiExceptionDeprecated.As of release 4.7.0, replaced bygetIssueNotes(Object, Integer, int)
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 Integer(ID), String(path), or Project instanceissueIid
- the issue IID to get the notes foritemsPerPage
- the number of notes per page- Returns:
- the list of notes in the specified range
- Throws:
GitLabApiException
- if any exception occurs
-
getIssueNotes
public List<Note> getIssueNotes(Object projectIdOrPath, Integer issueIid) throws GitLabApiExceptionGet 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 Integer(ID), String(path), or Project instanceissueIid
- 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, Integer issueIid, int page, int perPage) throws GitLabApiExceptionGet 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 Integer(ID), String(path), or Project instanceissueIid
- the issue IID to get the notes forpage
- the page to getperPage
- 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, Integer issueIid, int itemsPerPage) throws GitLabApiExceptionGet a Pager of issues's notes.GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceissueIid
- the issue IID to get the notes foritemsPerPage
- 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, Integer issueIid) throws GitLabApiExceptionGet 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 Integer(ID), String(path), or Project instanceissueIid
- 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, Integer issueIid, Integer noteId) throws GitLabApiExceptionGet the specified issues's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceissueIid
- the issue IID to get the notes fornoteId
- 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, Integer issueIid, String body) throws GitLabApiExceptionCreate a issues's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues forissueIid
- the issue IID to create the notes forbody
- the content of note- Returns:
- the created Note instance
- Throws:
GitLabApiException
- if any exception occurs
-
createIssueNote
public Note createIssueNote(Object projectIdOrPath, Integer issueIid, String body, Date createdAt) throws GitLabApiExceptionCreate a issues's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceissueIid
- the issue IID to create the notes forbody
- the content of notecreatedAt
- the created time of note- Returns:
- the created Note instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateIssueNote
public Note updateIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId, String body) throws GitLabApiExceptionUpdate the specified issues's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceissueIid
- the issue IID to update the notes fornoteId
- the ID of the node to updatebody
- the update content for the Note- Returns:
- the modified Note instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteIssueNote
public void deleteIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiExceptionDelete the specified issues's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceissueIid
- the issue IID to delete the notes fornoteId
- the ID of the node to delete- Throws:
GitLabApiException
- if any exception occurs
-
getMergeRequestNotes
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiExceptionGets a list of all notes for a single merge requestGitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- 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, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiExceptionGets 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 Integer(ID), String(path), or Project instancemergeRequestIid
- the issue ID to get the notes forsortOrder
- return merge request notes sorted in the specified sort order, default is DESCorderBy
- 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, Integer mergeRequestIid, int page, int perPage) throws GitLabApiExceptionGets 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 Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to get the notes forpage
- the page to getperPage
- 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, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy, int page, int perPage) throws GitLabApiExceptionGets 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 Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to get the notes forsortOrder
- return merge request notes sorted in the specified sort order, default is DESCorderBy
- return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_ATpage
- the page to getperPage
- 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, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiExceptionGet a Pager of all notes for a single merge requestGitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to get the notes foritemsPerPage
- 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, Integer mergeRequestIid) throws GitLabApiExceptionGets a Stream of all notes for a single merge requestGitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- 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, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy, int itemsPerPage) throws GitLabApiExceptionGet a Pager of all notes for a single merge requestGitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to get the notes forsortOrder
- return merge request notes sorted in the specified sort order, default is DESCorderBy
- return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_ATitemsPerPage
- 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, Integer mergeRequestIid, Constants.SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiExceptionGets 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 Integer(ID), String(path), or Project instancemergeRequestIid
- the issue ID to get the notes forsortOrder
- return merge request notes sorted in the specified sort order, default is DESCorderBy
- 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, Integer mergeRequestIid, Integer noteId) throws GitLabApiExceptionGet the specified merge request's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to get the notes fornoteId
- 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, Integer mergeRequestIid, String body) throws GitLabApiExceptionCreate a merge request's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to create the notes forbody
- the content of note- Returns:
- the created Note instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateMergeRequestNote
public Note updateMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, String body) throws GitLabApiExceptionUpdate the specified merge request's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to update the notes fornoteId
- the ID of the node to updatebody
- the update content for the Note- Returns:
- the modified Note instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteMergeRequestNote
public void deleteMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiExceptionDelete the specified merge request's note.- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancemergeRequestIid
- the merge request IID to delete the notes fornoteId
- the ID of the node to delete- Throws:
GitLabApiException
- if any exception occurs
-
getIssueNotes(Object, Integer)