public class ProjectApi extends AbstractApi
Modifier and Type | Method and Description |
---|---|
ProjectHook |
addHook(Integer projectId,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents)
Adds a hook to project.
|
ProjectHook |
addHook(Project project,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents)
Adds a hook to project.
|
Member |
addMember(Integer projectId,
Integer userId,
Integer accessLevel)
Adds a user to a project team.
|
Project |
createProject(Integer groupId,
String projectName)
Create a new project in the specified group.
|
Project |
createProject(Project project)
Creates new project owned by the current user.
|
Project |
createProject(Project project,
String importUrl)
Creates new project owned by the current user.
|
Project |
createProject(String name,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean wallEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Boolean publik,
Integer visibilityLevel,
String importUrl)
Creates a Project
|
void |
deleteHook(Integer projectId,
Integer hookId)
Deletes a hook from the project.
|
void |
deleteHook(ProjectHook hook)
Deletes a hook from the project.
|
void |
deleteProject(Integer projectId)
Removes project with all resources(issues, merge requests etc).
|
void |
deleteProject(Project project)
Removes project with all resources(issues, merge requests etc).
|
List<Project> |
getAllProjects()
Get a list of all GitLab projects (admin only).
|
ProjectHook |
getHook(Integer projectId,
Integer hookId)
Get a specific hook for project.
|
List<ProjectHook> |
getHooks(Integer projectId)
Get list of project hooks.
|
List<Issue> |
getIssues(Integer projectId)
Get a list of project's issues.
|
Member |
getMember(Integer projectId,
Integer userId)
Gets a project team member.
|
List<Member> |
getMembers(Integer projectId)
Get a list of project team members.
|
List<Project> |
getOwnedProjects()
Get a list of projects owned by the authenticated user.
|
Project |
getProject(Integer projectId)
Get a specific project, which is owned by the authentication user.
|
Project |
getProject(String namespace,
String project)
Get a specific project, which is owned by the authentication user.
|
List<Event> |
getProjectEvents(Integer projectId)
Get a project events for specific project.
|
List<Project> |
getProjects()
Get a list of projects accessible by the authenticated user.
|
ProjectHook |
modifyHook(ProjectHook hook)
Modifies a hook for project.
|
void |
removeMember(Integer projectId,
Integer userId)
Removes user from project team.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, handle, post, post, post, put, put, validate
public List<Project> getProjects() throws GitLabApiException
GitLabApiException
public List<Project> getAllProjects() throws GitLabApiException
GitLabApiException
public List<Project> getOwnedProjects() throws GitLabApiException
GitLabApiException
public Project getProject(Integer projectId) throws GitLabApiException
projectId
- GitLabApiException
public Project getProject(String namespace, String project) throws GitLabApiException
namespace
- the name of the project namespace or groupproject
- GitLabApiException
public Project createProject(Integer groupId, String projectName) throws GitLabApiException
groupId
- projectName
- GitLabApiException
public Project createProject(Project project) throws GitLabApiException
project
- the Project instance with the configuration for the new projectGitLabApiException
public Project createProject(Project project, String importUrl) throws GitLabApiException
project
- the Project instance with the configuration for the new projectimportUrl
- GitLabApiException
public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean wallEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean publik, Integer visibilityLevel, String importUrl) throws GitLabApiException
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultwallEnabled
- Whether The Wall should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultpublik
- Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise nullGitLabApiException
public void deleteProject(Integer projectId) throws GitLabApiException
projectId
- GitLabApiException
public void deleteProject(Project project) throws GitLabApiException
project
- GitLabApiException
public List<Member> getMembers(Integer projectId) throws GitLabApiException
projectId
- GitLabApiException
public Member getMember(Integer projectId, Integer userId) throws GitLabApiException
projectId
- userId
- GitLabApiException
public Member addMember(Integer projectId, Integer userId, Integer accessLevel) throws GitLabApiException
projectId
- userId
- accessLevel
- GitLabApiException
public void removeMember(Integer projectId, Integer userId) throws GitLabApiException
projectId
- userId
- GitLabApiException
public List<Event> getProjectEvents(Integer projectId) throws GitLabApiException
projectId
- GitLabApiException
public List<ProjectHook> getHooks(Integer projectId) throws GitLabApiException
projectId
- GitLabApiException
public ProjectHook getHook(Integer projectId, Integer hookId) throws GitLabApiException
projectId
- hookId
- GitLabApiException
public ProjectHook addHook(Project project, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException
project
- url
- doPushEvents
- doIssuesEvents
- doMergeRequestsEvents
- GitLabApiException
public ProjectHook addHook(Integer projectId, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException
projectId
- url
- doPushEvents
- doIssuesEvents
- doMergeRequestsEvents
- GitLabApiException
public void deleteHook(Integer projectId, Integer hookId) throws GitLabApiException
projectId
- hookId
- GitLabApiException
public void deleteHook(ProjectHook hook) throws GitLabApiException
hook
- GitLabApiException
public ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException
hook
- GitLabApiException
public List<Issue> getIssues(Integer projectId) throws GitLabApiException
projectId
- GitLabApiException
Copyright © 2017. All rights reserved.