Package | Description |
---|---|
org.gitlab4j.api | |
org.gitlab4j.api.webhook |
Modifier and Type | Method and Description |
---|---|
protected GitLabApiException |
AbstractApi.handle(Exception thrown)
Wraps an exception in a GitLabApiException if needed.
|
Modifier and Type | Method and Description |
---|---|
void |
GroupApi.addGroup(String name,
String path)
Creates a new project group.
|
ProjectHook |
ProjectApi.addHook(Integer projectId,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents)
Adds a hook to project.
|
ProjectHook |
ProjectApi.addHook(Integer projectId,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken)
Adds a hook to project.
|
ProjectHook |
ProjectApi.addHook(Project project,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents)
Adds a hook to project.
|
ProjectHook |
ProjectApi.addHook(Project project,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken)
Adds a hook to project.
|
ProjectHook |
ProjectApi.addHook(String projectName,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken)
Adds a hook to project.
|
Member |
ProjectApi.addMember(Integer projectId,
Integer userId,
Integer accessLevel)
Adds a user to a project team.
|
Member |
GroupApi.addMember(Integer groupId,
Integer userId,
Integer accessLevel)
Adds a user to the list of group members.
|
static GitLabApi |
GitLabApi.create(String url,
String username,
String password)
Logs into GitLab using provided
username and password , and creates a new GitLabApi instance using returned private token |
Branch |
RepositoryApi.createBranch(Integer projectId,
String branchName,
String ref)
Creates a branch for the project.
|
RepositoryFile |
RepositoryFileApi.createFile(RepositoryFile file,
Integer projectId,
String branchName,
String commitMessage)
Create new file in repository
POST /projects/:id/repository/files
file_path (required) - Full path to new file.
|
MergeRequest |
MergeRequestApi.createMergeRequest(Integer projectId,
String sourceBranch,
String targetBranch,
String title,
String description,
Integer assigneeId)
Creates a merge request and optionally assigns a reviewer to it.
|
Project |
ProjectApi.createProject(Integer groupId,
String projectName)
Create a new project in the specified group.
|
Project |
ProjectApi.createProject(Project project)
Creates new project owned by the current user.
|
Project |
ProjectApi.createProject(Project project,
String importUrl)
Creates new project owned by the current user.
|
Project |
ProjectApi.createProject(String projectName)
Create a new project with the current user's namespace.
|
Project |
ProjectApi.createProject(String name,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Boolean isPublic,
String importUrl)
Creates a Project
|
Tag |
RepositoryApi.createTag(Integer projectId,
String tagName,
String ref,
String message,
File releaseNotesFile)
Creates a tag on a particular ref of a given project.
|
Tag |
RepositoryApi.createTag(Integer projectId,
String tagName,
String ref,
String message,
String releaseNotes)
Creates a tag on a particular ref of the given project.
|
User |
UserApi.createUser(User user,
String password,
Integer projectsLimit)
Creates a new user.
|
protected javax.ws.rs.core.Response |
AbstractApi.delete(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
Object... pathArgs)
Perform an HTTP DELETE call with the specified form data and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
|
protected javax.ws.rs.core.Response |
AbstractApi.delete(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
URL url)
Perform an HTTP DELETE call with the specified form data and URL, returning
a ClientResponse instance with the data returned from the endpoint.
|
void |
RepositoryApi.deleteBranch(Integer projectId,
String branchName)
Delete a single project repository branch.
|
void |
RepositoryFileApi.deleteFile(String filePath,
Integer projectId,
String branchName,
String commitMessage)
Delete existing file in repository
DELETE /projects/:id/repository/files
file_path (required) - Full path to file.
|
void |
ServicesApi.deleteGitLabCI(Integer projectId)
Deletes the gitlab-ci service.
|
void |
ServicesApi.deleteGitLabCI(Project project)
DELETE /projects/:id/services/gitlab-ci
|
void |
GroupApi.deleteGroup(Group group)
Removes group with all projects inside.
|
void |
GroupApi.deleteGroup(Integer groupId)
Removes group with all projects inside.
|
void |
ServicesApi.deleteHipChat(Integer projectId)
Deletes the gitlab-ci service.
|
void |
ServicesApi.deleteHipChat(Project project)
Deletes the gitlab-ci service.
|
void |
ProjectApi.deleteHook(Integer projectId,
Integer hookId)
Deletes a hook from the project.
|
void |
ProjectApi.deleteHook(ProjectHook hook)
Deletes a hook from the project.
|
void |
ProjectApi.deleteProject(Integer projectId)
Removes project with all resources(issues, merge requests etc).
|
void |
ProjectApi.deleteProject(Project project)
Removes project with all resources(issues, merge requests etc).
|
void |
RepositoryApi.deleteTag(Integer projectId,
String tagName)
Deletes the tag from a project with the specified tag name.
|
void |
UserApi.deleteUser(Integer userId)
Deletes a user.
|
void |
UserApi.deleteUser(User user)
Deletes a user.
|
List<Namespace> |
NamespaceApi.findNamespaces(String query)
Get all namespaces that match a string in their name or path.
|
List<User> |
UserApi.findUsers(String emailOrUsername)
Search users by Email or username
GET /users?search=:email_or_username
|
protected javax.ws.rs.core.Response |
AbstractApi.get(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
Object... pathArgs)
Perform an HTTP GET call with the specified query parameters and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
|
protected javax.ws.rs.core.Response |
AbstractApi.get(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
URL url)
Perform an HTTP GET call with the specified query parameters and URL, returning
a ClientResponse instance with the data returned from the endpoint.
|
List<Project> |
ProjectApi.getAllProjects()
Get a list of all GitLab projects (admin only).
|
Branch |
RepositoryApi.getBranch(Integer projectId,
String branchName)
Get a single project repository branch.
|
List<Branch> |
RepositoryApi.getBranches(Integer projectId)
Get a list of repository branches from a project, sorted by name alphabetically.
|
List<Commit> |
CommitsApi.getCommits(int projectId)
Get a list of repository commits in a project.
|
Commit |
CommitsApi.getCommits(int projectId,
String sha)
Get a specific commit identified by the commit hash or name of a branch or tag.
|
Diff |
CommitsApi.getDiff(int projectId,
String sha)
Get the diff of a commit in a project.
|
RepositoryFile |
RepositoryFileApi.getFile(String filePath,
Integer projectId,
String ref)
Get file from repository.
|
Group |
GroupApi.getGroup(int groupId)
Get all details of a group.
|
List<Group> |
GroupApi.getGroups()
Get a list of groups.
|
ProjectHook |
ProjectApi.getHook(Integer projectId,
Integer hookId)
Get a specific hook for project.
|
List<ProjectHook> |
ProjectApi.getHooks(Integer projectId)
Get list of project hooks.
|
List<Issue> |
ProjectApi.getIssues(Integer projectId)
Get a list of project's issues.
|
Member |
ProjectApi.getMember(Integer projectId,
Integer userId)
Gets a project team member.
|
List<Member> |
GroupApi.getMembers(int groupId)
Get a list of group members viewable by the authenticated user.
|
List<Member> |
ProjectApi.getMembers(Integer projectId)
Get a list of project team members.
|
MergeRequest |
MergeRequestApi.getMergeRequest(Integer projectId,
Integer mergeRequestId)
Get information about a single merge request.
|
List<MergeRequest> |
MergeRequestApi.getMergeRequests(Integer projectId)
Get all merge requests for the specified project.
|
List<Namespace> |
NamespaceApi.getNamespaces()
Get a list of the namespaces of the authenticated user.
|
List<Project> |
ProjectApi.getOwnedProjects()
Get a list of projects owned by the authenticated user.
|
Project |
ProjectApi.getProject(Integer projectId)
Get a specific project, which is owned by the authentication user.
|
Project |
ProjectApi.getProject(String namespace,
String project)
Get a specific project, which is owned by the authentication user.
|
List<Event> |
ProjectApi.getProjectEvents(Integer projectId)
Get a project events for specific project.
|
List<Project> |
ProjectApi.getProjects()
Get a list of projects accessible by the authenticated user.
|
String |
RepositoryApi.getRawBlobCotent(Integer projectId,
String sha)
Get the raw file contents for a blob by blob SHA.
|
String |
RepositoryApi.getRawFileContent(Integer projectId,
String commitOrBranchName,
String filepath)
Get the raw file contents for a file by commit sha and path.
|
InputStream |
RepositoryApi.getRepositoryArchive(Integer projectId,
String sha)
Get an archive of the complete repository by SHA (optional).
|
File |
RepositoryApi.getRepositoryArchive(Integer projectId,
String sha,
File directory)
Get an archive of the complete repository by SHA (optional) and saves to the specified directory.
|
List<Tag> |
RepositoryApi.getTags(Integer projectId)
Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
|
List<TreeItem> |
RepositoryApi.getTree(Integer projectId)
Get a list of repository files and directories in a project.
|
List<TreeItem> |
RepositoryApi.getTree(Integer projectId,
String filePath,
String refName)
Get a list of repository files and directories in a project.
|
List<TreeItem> |
RepositoryApi.getTree(Integer projectId,
String filePath,
String refName,
Boolean recursive)
Get a list of repository files and directories in a project.
|
User |
UserApi.getUser(int userId)
Get a single user.
|
List<User> |
UserApi.getUsers()
Get a list of users.
|
List<User> |
UserApi.getUsers(int page,
int perPage)
Get a list of users using the specified page and per page settings.
|
Session |
SessionApi.login(String username,
String email,
String password)
Login to get private token.
|
ProjectHook |
ProjectApi.modifyHook(ProjectHook hook)
Modifies a hook for project.
|
User |
UserApi.modifyUser(User user,
String password,
Integer projectsLimit)
Modifies an existing user.
|
protected javax.ws.rs.core.Response |
AbstractApi.post(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.Form formData,
Object... pathArgs)
Perform an HTTP POST call with the specified form data and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
|
protected javax.ws.rs.core.Response |
AbstractApi.post(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.Form formData,
URL url)
Perform an HTTP POST call with the specified form data and URL, returning
a ClientResponse instance with the data returned from the endpoint.
|
protected javax.ws.rs.core.Response |
AbstractApi.post(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
Object... pathArgs)
Perform an HTTP POST call with the specified form data and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
|
Branch |
RepositoryApi.protectBranch(Integer projectId,
String branchName)
Protects a single project repository branch.
|
protected javax.ws.rs.core.Response |
AbstractApi.put(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
Object... pathArgs)
Perform an HTTP PUT call with the specified form data and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
|
protected javax.ws.rs.core.Response |
AbstractApi.put(javax.ws.rs.core.Response.Status expectedStatus,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
URL url)
Perform an HTTP PUT call with the specified form data and URL, returning
a ClientResponse instance with the data returned from the endpoint.
|
void |
ProjectApi.removeMember(Integer projectId,
Integer userId)
Removes user from project team.
|
void |
GroupApi.removeMember(Integer projectId,
Integer userId)
Removes member from the group team.
|
void |
ServicesApi.setGitLabCI(Integer projectId,
String token,
String projectCIUrl)
Activates the gitlab-ci service.
|
void |
ServicesApi.setGitLabCI(Project project,
String token,
String projectCIUrl)
Activates the gitlab-ci service.
|
void |
ServicesApi.setHipChat(Integer projectId,
String token,
String room,
String server)
Activates HipChat notifications.
|
void |
ServicesApi.setHipChat(Project project,
String token,
String room,
String server)
Activates HipChat notifications.
|
Branch |
RepositoryApi.unprotectBranch(Integer projectId,
String branchName)
Unprotects a single project repository branch.
|
RepositoryFile |
RepositoryFileApi.updateFile(RepositoryFile file,
Integer projectId,
String branchName,
String commitMessage)
Update existing file in repository
PUT /projects/:id/repository/files
file_path (required) - Full path to new file.
|
MergeRequest |
MergeRequestApi.updateMergeRequest(Integer projectId,
Integer mergeRequestId,
String sourceBranch,
String targetBranch,
String title,
String description,
Integer assigneeId)
Updates an existing merge request.
|
protected javax.ws.rs.core.Response |
AbstractApi.validate(javax.ws.rs.core.Response response,
javax.ws.rs.core.Response.Status expected)
Validates response the response from the server against the expected HTTP status and
the returned secret token, if either is not correct will throw a GitLabApiException.
|
Modifier and Type | Method and Description |
---|---|
void |
WebHookManager.fireEvent(Event event)
Fire the event to the registered listeners.
|
void |
WebHookManager.handleEvent(Event event)
Verifies the provided Event and fires it off to the registered listeners.
|
void |
WebHookManager.handleEvent(javax.servlet.http.HttpServletRequest request)
Parses and verifies an Event instance from the HTTP request and
fires it off to the registered listeners.
|
Copyright © 2017. All rights reserved.