Package org.gitlab4j.api
Class MilestonesApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.MilestonesApi
- All Implemented Interfaces:
Constants
This class implements the client side API for the GitLab milestones calls.
- See Also:
-
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.ContributorOrderBy, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, 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.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, 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 TypeMethodDescriptionactivateGroupMilestone
(Object groupIdOrPath, Long milestoneId) Activate a group milestone.activateMilestone
(Object projectIdOrPath, Long milestoneId) Activate a milestone.closeGroupMilestone
(Object groupIdOrPath, Long milestoneId) Close a group milestone.closeMilestone
(Object projectIdOrPath, Long milestoneId) Close a milestone.createGroupMilestone
(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate) Create a group milestone.createMilestone
(Object projectIdOrPath, String title, String description, Date dueDate, Date startDate) Create a milestone.void
deleteMilestone
(Object projectIdOrPath, Long milestoneId) Delete a project milestone.getGroupIssues
(Object groupIdOrPath, Long milestoneId) Get the list of issues associated with the specified group milestone.getGroupIssues
(Object groupIdOrPath, Long milestoneId, int itemsPerPage) Get the Pager of issues associated with the specified group milestone.getGroupIssuesStream
(Object groupIdOrPath, Long milestoneId) Get a Stream of issues associated with the specified group milestone.getGroupMergeRequest
(Object groupIdOrPath, Long milestoneId) Get the list of merge requests associated with the specified group milestone.getGroupMilestone
(Object groupIdOrPath, Long milestoneId) Get the specified group milestone.getGroupMilestones
(Object groupIdOrPath) Get a list of group milestones.getGroupMilestones
(Object groupIdOrPath, int itemsPerPage) Get a Page of group milestones.getGroupMilestones
(Object groupIdOrPath, int page, int perPage) Get a list of group milestones.getGroupMilestones
(Object groupIdOrPath, String search) Get a list of group milestones that have match the search string.getGroupMilestones
(Object groupIdOrPath, Constants.MilestoneState state) Get a list of group milestones that have the specified state.getGroupMilestones
(Object groupIdOrPath, Constants.MilestoneState state, String search) Get a list of group milestones that have the specified state and match the search string.getGroupMilestonesStream
(Object groupIdOrPath) Get a Stream of group milestones.Get the list of issues associated with the specified milestone.Get a Pager of issues associated with the specified milestone.getIssuesStream
(Object projectIdOrPath, Long milestoneId) Get a Stream of issues associated with the specified milestone.getMergeRequest
(Object projectIdOrPath, Long milestoneId) Get the list of merge requests associated with the specified milestone.getMilestone
(Object projectIdOrPath, Long milestoneId) Get the specified milestone.getMilestones
(Object projectIdOrPath) Get a list of project milestones.getMilestones
(Object projectIdOrPath, int itemsPerPage) Get a Pager of project milestones.getMilestones
(Object projectIdOrPath, int page, int perPage) Get a list of project milestones.getMilestones
(Object projectIdOrPath, String search) Get a list of project milestones that have match the search string.getMilestones
(Object projectIdOrPath, Constants.MilestoneState state) Get a list of project milestones that have the specified state.getMilestones
(Object projectIdOrPath, Constants.MilestoneState state, String search) Get a list of project milestones that have the specified state and match the search string.getMilestonesStream
(Object projectIdOrPath) Get a Stream of project milestones.updateGroupMilestone
(Object groupIdOrPath, Long milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState) Update the specified group milestone.updateMilestone
(Object projectIdOrPath, Long milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState) Update the specified milestone.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, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
MilestonesApi
-
-
Method Details
-
getGroupMilestones
Get a list of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instance- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public List<Milestone> getGroupMilestones(Object groupIdOrPath, int page, int perPage) throws GitLabApiException Get a list of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancepage
- the page number to getperPage
- how many milestones per page- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public Pager<Milestone> getGroupMilestones(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException Get a Page of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instanceitemsPerPage
- The number of Milestone instances that will be fetched per page- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestonesStream
Get a Stream of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instance- Returns:
- a Stream of the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public List<Milestone> getGroupMilestones(Object groupIdOrPath, Constants.MilestoneState state) throws GitLabApiException Get a list of group milestones that have the specified state.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancestate
- the milestone state- Returns:
- the milestones associated with the specified group and state
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public List<Milestone> getGroupMilestones(Object groupIdOrPath, String search) throws GitLabApiException Get a list of group milestones that have match the search string.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancesearch
- the search string- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public List<Milestone> getGroupMilestones(Object groupIdOrPath, Constants.MilestoneState state, String search) throws GitLabApiException Get a list of group milestones that have the specified state and match the search string.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancestate
- the milestone statesearch
- the search string- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestone
public Milestone getGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException Get the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the ID of the milestone tp get- Returns:
- a Milestone instance for the specified IDs
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupIssues
Get the list of issues associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a List of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupIssues
public Pager<Issue> getGroupIssues(Object groupIdOrPath, Long milestoneId, int itemsPerPage) throws GitLabApiException Get the Pager of issues associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the issues foritemsPerPage
- The number of Milestone instances that will be fetched per page- Returns:
- a Pager of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupIssuesStream
public Stream<Issue> getGroupIssuesStream(Object groupIdOrPath, Long milestoneId) throws GitLabApiException Get a Stream of issues associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a Stream of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMergeRequest
public List<MergeRequest> getGroupMergeRequest(Object groupIdOrPath, Long milestoneId) throws GitLabApiException Get the list of merge requests associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/merge_requests
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the merge requests for- Returns:
- a list of merge requests associated with the specified milestone
- Throws:
GitLabApiException
- if any exception occurs
-
createGroupMilestone
public Milestone createGroupMilestone(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException Create a group milestone.GitLab Endpoint: POST /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancetitle
- the title for the milestonedescription
- the description for the milestonedueDate
- the due date for the milestonestartDate
- the start date for the milestone- Returns:
- the created Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
closeGroupMilestone
public Milestone closeGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException Close a group milestone.GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to close- Returns:
- the closed Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
activateGroupMilestone
public Milestone activateGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException Activate a group milestone.GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to activate- Returns:
- the activated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateGroupMilestone
public Milestone updateGroupMilestone(Object groupIdOrPath, Long milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState) throws GitLabApiException Update the specified group milestone.GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to updatetitle
- the updated title for the milestonedescription
- the updated description for the milestonedueDate
- the updated due date for the milestonestartDate
- the updated start date for the milestonemilestoneState
- the updated milestone state- Returns:
- the updated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
Get a list of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public List<Milestone> getMilestones(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get a list of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepage
- the page number to getperPage
- how many milestones per page- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public Pager<Milestone> getMilestones(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- The number of Milestone instances that will be fetched per page- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestonesStream
Get a Stream of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public List<Milestone> getMilestones(Object projectIdOrPath, Constants.MilestoneState state) throws GitLabApiException Get a list of project milestones that have the specified state.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancestate
- the milestone state- Returns:
- the milestones associated with the specified project and state
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public List<Milestone> getMilestones(Object projectIdOrPath, String search) throws GitLabApiException Get a list of project milestones that have match the search string.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancesearch
- the search string- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public List<Milestone> getMilestones(Object projectIdOrPath, Constants.MilestoneState state, String search) throws GitLabApiException Get a list of project milestones that have the specified state and match the search string.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancestate
- the milestone statesearch
- the search string- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestone
Get the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the ID of the milestone tp get- Returns:
- a Milestone instance for the specified IDs
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
Get the list of issues associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a List of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
public Pager<Issue> getIssues(Object projectIdOrPath, Long milestoneId, int itemsPerPage) throws GitLabApiException Get a Pager of issues associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the issues foritemsPerPage
- the number of Milestone instances that will be fetched per page- Returns:
- a Pager of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getIssuesStream
public Stream<Issue> getIssuesStream(Object projectIdOrPath, Long milestoneId) throws GitLabApiException Get a Stream of issues associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a Stream of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getMergeRequest
public List<MergeRequest> getMergeRequest(Object projectIdOrPath, Long milestoneId) throws GitLabApiException Get the list of merge requests associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/merge_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the merge requests for- Returns:
- a list of merge requests associated with the specified milestone
- Throws:
GitLabApiException
- if any exception occurs
-
createMilestone
public Milestone createMilestone(Object projectIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException Create a milestone.GitLab Endpoint: POST /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancetitle
- the title for the milestonedescription
- the description for the milestonedueDate
- the due date for the milestonestartDate
- the start date for the milestone- Returns:
- the created Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
closeMilestone
Close a milestone.GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to close- Returns:
- the closed Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
activateMilestone
public Milestone activateMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException Activate a milestone.GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to activate- Returns:
- the activated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateMilestone
public Milestone updateMilestone(Object projectIdOrPath, Long milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState) throws GitLabApiException Update the specified milestone.GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to updatetitle
- the updated title for the milestonedescription
- the updated description for the milestonedueDate
- the updated due date for the milestonestartDate
- the updated start date for the milestonemilestoneState
- the updated milestone state- Returns:
- the updated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteMilestone
Delete a project milestone.- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to delete- Throws:
GitLabApiException
- if any exception occurs
-