Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
java-gitlab-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
java-gitlab-api
Commits
de5ea04d
Commit
de5ea04d
authored
Jul 07, 2015
by
timols
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure methods that throw use
parent
28b40e68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+15
-5
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
de5ea04d
...
@@ -126,7 +126,7 @@ public class GitlabAPI {
...
@@ -126,7 +126,7 @@ public class GitlabAPI {
* @param can_create_group Can Create Group
* @param can_create_group Can Create Group
* @param skip_confirmation Skip Confirmation
* @param skip_confirmation Skip Confirmation
* @return A GitlabUser
* @return A GitlabUser
* @throws IOException
An
error
* @throws IOException
on gitlab api call
error
* @see <a href="http://doc.gitlab.com/ce/api/users.html">http://doc.gitlab.com/ce/api/users.html</a>
* @see <a href="http://doc.gitlab.com/ce/api/users.html">http://doc.gitlab.com/ce/api/users.html</a>
*/
*/
public
GitlabUser
createUser
(
String
email
,
String
password
,
String
username
,
public
GitlabUser
createUser
(
String
email
,
String
password
,
String
username
,
...
@@ -179,7 +179,7 @@ public class GitlabAPI {
...
@@ -179,7 +179,7 @@ public class GitlabAPI {
* @param can_create_group Can Create Group
* @param can_create_group Can Create Group
* @param skip_confirmation Skip Confirmation
* @param skip_confirmation Skip Confirmation
* @return The Updated User
* @return The Updated User
* @throws IOException
an
error
* @throws IOException
on gitlab api call
error
*/
*/
public
GitlabUser
updateUser
(
Integer
targetUserId
,
public
GitlabUser
updateUser
(
Integer
targetUserId
,
String
email
,
String
password
,
String
username
,
String
email
,
String
password
,
String
username
,
...
@@ -218,7 +218,7 @@ public class GitlabAPI {
...
@@ -218,7 +218,7 @@ public class GitlabAPI {
* @param title The title of the ssh key
* @param title The title of the ssh key
* @param key The public key
* @param key The public key
* @return The new GitlabSSHKey
* @return The new GitlabSSHKey
* @throws IOException
an
error
* @throws IOException
on gitlab api call
error
*/
*/
public
GitlabSSHKey
createSSHKey
(
Integer
targetUserId
,
String
title
,
String
key
)
throws
IOException
{
public
GitlabSSHKey
createSSHKey
(
Integer
targetUserId
,
String
title
,
String
key
)
throws
IOException
{
...
@@ -236,7 +236,7 @@ public class GitlabAPI {
...
@@ -236,7 +236,7 @@ public class GitlabAPI {
*
*
* @param targetUserId The id of the Gitlab user
* @param targetUserId The id of the Gitlab user
* @param targetKeyId The id of the Gitlab ssh key
* @param targetKeyId The id of the Gitlab ssh key
* @throws IOException
an
error
* @throws IOException
on gitlab api call
error
*/
*/
public
void
deleteSSHKey
(
Integer
targetUserId
,
Integer
targetKeyId
)
throws
IOException
{
public
void
deleteSSHKey
(
Integer
targetUserId
,
Integer
targetKeyId
)
throws
IOException
{
String
tailUrl
=
GitlabUser
.
USERS_URL
+
"/"
+
targetUserId
+
GitlabSSHKey
.
KEYS_URL
+
"/"
+
targetKeyId
;
String
tailUrl
=
GitlabUser
.
USERS_URL
+
"/"
+
targetUserId
+
GitlabSSHKey
.
KEYS_URL
+
"/"
+
targetKeyId
;
...
@@ -249,6 +249,7 @@ public class GitlabAPI {
...
@@ -249,6 +249,7 @@ public class GitlabAPI {
*
*
* @param targetUserId The id of the GitLab User
* @param targetUserId The id of the GitLab User
* @return The list of user ssh keys
* @return The list of user ssh keys
* @throws IOException on gitlab api call error
*/
*/
public
List
<
GitlabSSHKey
>
getSSHKeys
(
Integer
targetUserId
)
throws
IOException
{
public
List
<
GitlabSSHKey
>
getSSHKeys
(
Integer
targetUserId
)
throws
IOException
{
String
tailUrl
=
GitlabUser
.
USERS_URL
+
"/"
+
targetUserId
+
GitlabSSHKey
.
KEYS_URL
;
String
tailUrl
=
GitlabUser
.
USERS_URL
+
"/"
+
targetUserId
+
GitlabSSHKey
.
KEYS_URL
;
...
@@ -259,7 +260,7 @@ public class GitlabAPI {
...
@@ -259,7 +260,7 @@ public class GitlabAPI {
* Delete a user
* Delete a user
*
*
* @param targetUserId The target User ID
* @param targetUserId The target User ID
* @throws IOException
an
error
* @throws IOException
on gitlab api call
error
*/
*/
public
void
deleteUser
(
Integer
targetUserId
)
throws
IOException
{
public
void
deleteUser
(
Integer
targetUserId
)
throws
IOException
{
String
tailUrl
=
GitlabUser
.
USERS_URL
+
"/"
+
targetUserId
;
String
tailUrl
=
GitlabUser
.
USERS_URL
+
"/"
+
targetUserId
;
...
@@ -281,6 +282,7 @@ public class GitlabAPI {
...
@@ -281,6 +282,7 @@ public class GitlabAPI {
*
*
* @param group The GitLab Group
* @param group The GitLab Group
* @return The Group Members
* @return The Group Members
* @throws IOException on gitlab api call error
*/
*/
public
List
<
GitlabGroupMember
>
getGroupMembers
(
GitlabGroup
group
)
throws
IOException
{
public
List
<
GitlabGroupMember
>
getGroupMembers
(
GitlabGroup
group
)
throws
IOException
{
return
getGroupMembers
(
group
.
getId
());
return
getGroupMembers
(
group
.
getId
());
...
@@ -291,6 +293,7 @@ public class GitlabAPI {
...
@@ -291,6 +293,7 @@ public class GitlabAPI {
*
*
* @param groupId The id of the GitLab Group
* @param groupId The id of the GitLab Group
* @return The Group Members
* @return The Group Members
* @throws IOException on gitlab api call error
*/
*/
public
List
<
GitlabGroupMember
>
getGroupMembers
(
Integer
groupId
)
throws
IOException
{
public
List
<
GitlabGroupMember
>
getGroupMembers
(
Integer
groupId
)
throws
IOException
{
String
tailUrl
=
GitlabGroup
.
URL
+
"/"
+
groupId
+
GitlabGroupMember
.
URL
;
String
tailUrl
=
GitlabGroup
.
URL
+
"/"
+
groupId
+
GitlabGroupMember
.
URL
;
...
@@ -304,6 +307,7 @@ public class GitlabAPI {
...
@@ -304,6 +307,7 @@ public class GitlabAPI {
* name will also be used as the path
* name will also be used as the path
* of the group.
* of the group.
* @return The GitLab Group
* @return The GitLab Group
* @throws IOException on gitlab api call error
*/
*/
public
GitlabGroup
createGroup
(
String
name
)
throws
IOException
{
public
GitlabGroup
createGroup
(
String
name
)
throws
IOException
{
return
createGroup
(
name
,
name
);
return
createGroup
(
name
,
name
);
...
@@ -315,6 +319,7 @@ public class GitlabAPI {
...
@@ -315,6 +319,7 @@ public class GitlabAPI {
* @param name The name of the group
* @param name The name of the group
* @param path The path for the group
* @param path The path for the group
* @return The GitLab Group
* @return The GitLab Group
* @throws IOException on gitlab api call error
*/
*/
public
GitlabGroup
createGroup
(
String
name
,
String
path
)
throws
IOException
{
public
GitlabGroup
createGroup
(
String
name
,
String
path
)
throws
IOException
{
return
createGroup
(
name
,
path
,
null
,
null
);
return
createGroup
(
name
,
path
,
null
,
null
);
...
@@ -328,6 +333,7 @@ public class GitlabAPI {
...
@@ -328,6 +333,7 @@ public class GitlabAPI {
* @param ldapCn LDAP Group Name to sync with, null otherwise
* @param ldapCn LDAP Group Name to sync with, null otherwise
* @param ldapAccess Access level for LDAP group members, null otherwise
* @param ldapAccess Access level for LDAP group members, null otherwise
* @return The GitLab Group
* @return The GitLab Group
* @throws IOException on gitlab api call error
*/
*/
public
GitlabGroup
createGroup
(
String
name
,
String
path
,
String
ldapCn
,
GitlabAccessLevel
ldapAccess
)
throws
IOException
{
public
GitlabGroup
createGroup
(
String
name
,
String
path
,
String
ldapCn
,
GitlabAccessLevel
ldapAccess
)
throws
IOException
{
...
@@ -427,6 +433,7 @@ public class GitlabAPI {
...
@@ -427,6 +433,7 @@ public class GitlabAPI {
*
*
* @param name The name of the project
* @param name The name of the project
* @return The GitLab Project
* @return The GitLab Project
* @throws IOException on gitlab api call error
*/
*/
public
GitlabProject
createProject
(
String
name
)
throws
IOException
{
public
GitlabProject
createProject
(
String
name
)
throws
IOException
{
return
createProject
(
name
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
return
createProject
(
name
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
...
@@ -447,6 +454,7 @@ public class GitlabAPI {
...
@@ -447,6 +454,7 @@ public class GitlabAPI {
* @param visibilityLevel The visibility level of the project, otherwise null indicates to use GitLab default
* @param visibilityLevel The visibility level of the project, otherwise null indicates to use GitLab default
* @param importUrl The Import URL for the project, otherwise null
* @param importUrl The Import URL for the project, otherwise null
* @return the Gitlab Project
* @return the Gitlab Project
* @throws IOException on gitlab api call error
*/
*/
public
GitlabProject
createProject
(
String
name
,
Integer
namespaceId
,
String
description
,
Boolean
issuesEnabled
,
Boolean
wallEnabled
,
Boolean
mergeRequestsEnabled
,
Boolean
wikiEnabled
,
Boolean
snippetsEnabled
,
Boolean
publik
,
Integer
visibilityLevel
,
String
importUrl
)
throws
IOException
{
public
GitlabProject
createProject
(
String
name
,
Integer
namespaceId
,
String
description
,
Boolean
issuesEnabled
,
Boolean
wallEnabled
,
Boolean
mergeRequestsEnabled
,
Boolean
wikiEnabled
,
Boolean
snippetsEnabled
,
Boolean
publik
,
Integer
visibilityLevel
,
String
importUrl
)
throws
IOException
{
Query
query
=
new
Query
()
Query
query
=
new
Query
()
...
@@ -473,6 +481,7 @@ public class GitlabAPI {
...
@@ -473,6 +481,7 @@ public class GitlabAPI {
* @param userId The id of the user to create the project for
* @param userId The id of the user to create the project for
* @param name The name of the project
* @param name The name of the project
* @return The GitLab Project
* @return The GitLab Project
* @throws IOException on gitlab api call error
*/
*/
public
GitlabProject
createUserProject
(
Integer
userId
,
String
name
)
throws
IOException
{
public
GitlabProject
createUserProject
(
Integer
userId
,
String
name
)
throws
IOException
{
return
createUserProject
(
userId
,
name
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
return
createUserProject
(
userId
,
name
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
...
@@ -493,6 +502,7 @@ public class GitlabAPI {
...
@@ -493,6 +502,7 @@ public class GitlabAPI {
* @param publik Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab default
* @param publik Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab default
* @param visibilityLevel The visibility level of the project, otherwise null indicates to use GitLab default
* @param visibilityLevel The visibility level of the project, otherwise null indicates to use GitLab default
* @return The GitLab Project
* @return The GitLab Project
* @throws IOException on gitlab api call error
*/
*/
public
GitlabProject
createUserProject
(
Integer
userId
,
String
name
,
String
description
,
String
defaultBranch
,
Boolean
issuesEnabled
,
Boolean
wallEnabled
,
Boolean
mergeRequestsEnabled
,
Boolean
wikiEnabled
,
Boolean
snippetsEnabled
,
Boolean
publik
,
Integer
visibilityLevel
)
throws
IOException
{
public
GitlabProject
createUserProject
(
Integer
userId
,
String
name
,
String
description
,
String
defaultBranch
,
Boolean
issuesEnabled
,
Boolean
wallEnabled
,
Boolean
mergeRequestsEnabled
,
Boolean
wikiEnabled
,
Boolean
snippetsEnabled
,
Boolean
publik
,
Integer
visibilityLevel
)
throws
IOException
{
Query
query
=
new
Query
()
Query
query
=
new
Query
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment