Package org.gitlab4j.api
Class MilestonesApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.MilestonesApi
-
- All Implemented Interfaces:
Constants
public class MilestonesApi extends AbstractApi
This class implements the client side API for the GitLab milestones calls.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
-
-
Field Summary
-
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
Constructors Constructor Description MilestonesApi(GitLabApi gitLabApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Milestone
activateGroupMilestone(Object groupIdOrPath, Integer milestoneId)
Activate a group milestone.Milestone
activateMilestone(Object projectIdOrPath, Integer milestoneId)
Activate a milestone.Milestone
closeGroupMilestone(Object groupIdOrPath, Integer milestoneId)
Close a group milestone.Milestone
closeMilestone(Object projectIdOrPath, Integer milestoneId)
Close a milestone.Milestone
createGroupMilestone(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate)
Create a group milestone.Milestone
createMilestone(Object projectIdOrPath, String title, String description, Date dueDate, Date startDate)
Create a milestone.List<Issue>
getGroupIssues(Object groupIdOrPath, Integer milestoneId)
Get the list of issues associated with the specified group milestone.List<MergeRequest>
getGroupMergeRequest(Object groupIdOrPath, Integer milestoneId)
Get the list of merge requests associated with the specified group milestone.Milestone
getGroupMilestone(Object groupIdOrPath, Integer milestoneId)
Get the specified group milestone.List<Milestone>
getGroupMilestones(Object groupIdOrPath)
Get a list of group milestones.Pager<Milestone>
getGroupMilestones(Object groupIdOrPath, int itemsPerPage)
Get a Page of group milestones.List<Milestone>
getGroupMilestones(Object groupIdOrPath, int page, int perPage)
Get a list of group milestones.List<Milestone>
getGroupMilestones(Object groupIdOrPath, String search)
Get a list of group milestones that have match the search string.List<Milestone>
getGroupMilestones(Object groupIdOrPath, Constants.MilestoneState state)
Get a list of group milestones that have the specified state.List<Milestone>
getGroupMilestones(Object groupIdOrPath, Constants.MilestoneState state, String search)
Get a list of group milestones that have the specified state and match the search string.Stream<Milestone>
getGroupMilestonesStream(Object groupIdOrPath)
Get a Stream of group milestones.List<Issue>
getIssues(Object projectIdOrPath, Integer milestoneId)
Get the list of issues associated with the specified milestone.List<MergeRequest>
getMergeRequest(Object projectIdOrPath, Integer milestoneId)
Get the list of merge requests associated with the specified milestone.Milestone
getMilestone(Object projectIdOrPath, Integer milestoneId)
Get the specified milestone.List<Milestone>
getMilestones(Object projectIdOrPath)
Get a list of project milestones.Pager<Milestone>
getMilestones(Object projectIdOrPath, int itemsPerPage)
Get a Page of project milestones.List<Milestone>
getMilestones(Object projectIdOrPath, int page, int perPage)
Get a list of project milestones.List<Milestone>
getMilestones(Object projectIdOrPath, String search)
Get a list of project milestones that have match the search string.List<Milestone>
getMilestones(Object projectIdOrPath, Constants.MilestoneState state)
Get a list of project milestones that have the specified state.List<Milestone>
getMilestones(Object projectIdOrPath, Constants.MilestoneState state, String search)
Get a list of project milestones that have the specified state and match the search string.Stream<Milestone>
getMilestonesStream(Object projectIdOrPath)
Get a Stream of project milestones.Milestone
updateGroupMilestone(Object groupIdOrPath, Integer milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState)
Update the specified group milestone.Milestone
updateMilestone(Object projectIdOrPath, Integer 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, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
-
-
-
-
Constructor Detail
-
MilestonesApi
public MilestonesApi(GitLabApi gitLabApi)
-
-
Method Detail
-
getGroupMilestones
public List<Milestone> getGroupMilestones(Object groupIdOrPath) throws GitLabApiException
Get a list of group milestones.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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
public Stream<Milestone> getGroupMilestonesStream(Object groupIdOrPath) throws GitLabApiException
Get a Stream of group milestones.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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, Integer milestoneId) throws GitLabApiException
Get the specified group milestone.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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
public List<Issue> getGroupIssues(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException
Get the list of issues associated with the specified group milestone.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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
-
getGroupMergeRequest
public List<MergeRequest> getGroupMergeRequest(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException
Get the list of merge requests associated with the specified group milestone.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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, Integer milestoneId) throws GitLabApiException
Close a group milestone.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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, Integer milestoneId) throws GitLabApiException
Activate a group milestone.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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, Integer milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState) throws GitLabApiException
Update the specified group milestone.- Parameters:
groupIdOrPath
- the group in the form of an Integer(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
public List<Milestone> getMilestones(Object projectIdOrPath) throws GitLabApiException
Get a list of project milestones.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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 Page of project milestones.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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
public Stream<Milestone> getMilestonesStream(Object projectIdOrPath) throws GitLabApiException
Get a Stream of project milestones.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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
public Milestone getMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException
Get the specified milestone.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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
public List<Issue> getIssues(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException
Get the list of issues associated with the specified milestone.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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
-
getMergeRequest
public List<MergeRequest> getMergeRequest(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException
Get the list of merge requests associated with the specified milestone.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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
public Milestone closeMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException
Close a milestone.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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, Integer milestoneId) throws GitLabApiException
Activate a milestone.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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, Integer milestoneId, String title, String description, Date dueDate, Date startDate, Constants.MilestoneState milestoneState) throws GitLabApiException
Update the specified milestone.- Parameters:
projectIdOrPath
- the project in the form of an Integer(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
-
-