@@ -26,6 +26,7 @@ public ServicesApi(GitLabApi gitLabApi) {
26
26
* @param token for authentication
27
27
* @param projectCIUrl URL of the GitLab-CI project
28
28
* @throws GitLabApiException if any exception occurs
29
+ * @deprecated No longer supported
29
30
*/
30
31
public void setGitLabCI (Object projectIdOrPath , String token , String projectCIUrl ) throws GitLabApiException {
31
32
final Form formData = new Form ();
@@ -41,6 +42,7 @@ public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUr
41
42
*
42
43
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
43
44
* @throws GitLabApiException if any exception occurs
45
+ * @deprecated No longer supported
44
46
*/
45
47
public void deleteGitLabCI (Object projectIdOrPath ) throws GitLabApiException {
46
48
Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
@@ -56,7 +58,7 @@ public void deleteGitLabCI(Object projectIdOrPath) throws GitLabApiException {
56
58
* @return a HipChatService instance holding the HipChatService notification settings
57
59
* @throws GitLabApiException if any exception occurs
58
60
*/
59
- public HipChatService getHipChat (Object projectIdOrPath ) throws GitLabApiException {
61
+ public HipChatService getHipChatService (Object projectIdOrPath ) throws GitLabApiException {
60
62
Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "hipchat" );
61
63
return (response .readEntity (HipChatService .class ));
62
64
}
@@ -89,7 +91,7 @@ public HipChatService getHipChat(Object projectIdOrPath) throws GitLabApiExcepti
89
91
* @return a HipChatService instance holding the newly updated settings
90
92
* @throws GitLabApiException if any exception occurs
91
93
*/
92
- public HipChatService updateHipChat (Object projectIdOrPath , HipChatService hipChat ) throws GitLabApiException {
94
+ public HipChatService updateHipChatService (Object projectIdOrPath , HipChatService hipChat ) throws GitLabApiException {
93
95
GitLabApiForm formData = new GitLabApiForm ()
94
96
.withParam ("push_events" , hipChat .getPushEvents ())
95
97
.withParam ("issues_events" , hipChat .getIssuesEvents ())
@@ -137,12 +139,25 @@ public void setHipChat(Object projectIdOrPath, String token, String room, String
137
139
*
138
140
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
139
141
* @throws GitLabApiException if any exception occurs
142
+ * @deprecated replaced with {@link #deleteHipChatService(Object) updateHipChat} method
140
143
*/
141
144
public void deleteHipChat (Object projectIdOrPath ) throws GitLabApiException {
145
+ deleteHipChatService (projectIdOrPath );
146
+ }
147
+
148
+ /**
149
+ * Deletes the HipChatService service for a project.
150
+ *
151
+ * DELETE /projects/:id/services/hipchat
152
+ *
153
+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
154
+ * @throws GitLabApiException if any exception occurs
155
+ */
156
+ public void deleteHipChatService (Object projectIdOrPath ) throws GitLabApiException {
142
157
Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
143
158
delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "hipchat" );
144
159
}
145
-
160
+
146
161
/**
147
162
* Get the Slack notification settings for a project.
148
163
*
@@ -152,7 +167,7 @@ public void deleteHipChat(Object projectIdOrPath) throws GitLabApiException {
152
167
* @return a SlackService instance holding the Slack notification settings
153
168
* @throws GitLabApiException if any exception occurs
154
169
*/
155
- public SlackService getSlackNotifications (Object projectIdOrPath ) throws GitLabApiException {
170
+ public SlackService getSlackService (Object projectIdOrPath ) throws GitLabApiException {
156
171
Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "slack" );
157
172
return (response .readEntity (SlackService .class ));
158
173
}
@@ -193,7 +208,7 @@ public SlackService getSlackNotifications(Object projectIdOrPath) throws GitLabA
193
208
* @return a SlackService instance holding the newly updated settings
194
209
* @throws GitLabApiException if any exception occurs
195
210
*/
196
- public SlackService updateSlackNotifications (Object projectIdOrPath , SlackService slackNotifications ) throws GitLabApiException {
211
+ public SlackService updateSlackService (Object projectIdOrPath , SlackService slackNotifications ) throws GitLabApiException {
197
212
GitLabApiForm formData = new GitLabApiForm ()
198
213
.withParam ("webhook" , slackNotifications .getWebhook (), true )
199
214
.withParam ("username" , slackNotifications .getUsername ())
@@ -230,7 +245,7 @@ public SlackService updateSlackNotifications(Object projectIdOrPath, SlackServic
230
245
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
231
246
* @throws GitLabApiException if any exception occurs
232
247
*/
233
- public void deleteSlackNotifications (Object projectIdOrPath ) throws GitLabApiException {
248
+ public void deleteSlackService (Object projectIdOrPath ) throws GitLabApiException {
234
249
Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
235
250
delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "slack" );
236
251
}
@@ -244,7 +259,7 @@ public void deleteSlackNotifications(Object projectIdOrPath) throws GitLabApiExc
244
259
* @return a JiraService instance holding the JIRA service settings
245
260
* @throws GitLabApiException if any exception occurs
246
261
*/
247
- public JiraService getJira (Object projectIdOrPath ) throws GitLabApiException {
262
+ public JiraService getJiraService (Object projectIdOrPath ) throws GitLabApiException {
248
263
Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "jira" );
249
264
return (response .readEntity (JiraService .class ));
250
265
}
@@ -270,7 +285,7 @@ public JiraService getJira(Object projectIdOrPath) throws GitLabApiException {
270
285
* @return a JiraService instance holding the newly updated settings
271
286
* @throws GitLabApiException if any exception occurs
272
287
*/
273
- public JiraService updateJira (Object projectIdOrPath , JiraService jira ) throws GitLabApiException {
288
+ public JiraService updateJiraService (Object projectIdOrPath , JiraService jira ) throws GitLabApiException {
274
289
GitLabApiForm formData = new GitLabApiForm ()
275
290
.withParam ("merge_requests_events" , jira .getMergeRequestsEvents ())
276
291
.withParam ("commit_events" , jira .getCommitEvents ())
@@ -292,7 +307,7 @@ public JiraService updateJira(Object projectIdOrPath, JiraService jira) throws G
292
307
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
293
308
* @throws GitLabApiException if any exception occurs
294
309
*/
295
- public void deleteJira (Object projectIdOrPath ) throws GitLabApiException {
310
+ public void deleteJiraService (Object projectIdOrPath ) throws GitLabApiException {
296
311
Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
297
312
delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "jira" );
298
313
}
0 commit comments