@@ -26,6 +26,7 @@ public ServicesApi(GitLabApi gitLabApi) {
2626 * @param token for authentication
2727 * @param projectCIUrl URL of the GitLab-CI project
2828 * @throws GitLabApiException if any exception occurs
29+ * @deprecated No longer supported
2930 */
3031 public void setGitLabCI (Object projectIdOrPath , String token , String projectCIUrl ) throws GitLabApiException {
3132 final Form formData = new Form ();
@@ -41,6 +42,7 @@ public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUr
4142 *
4243 * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
4344 * @throws GitLabApiException if any exception occurs
45+ * @deprecated No longer supported
4446 */
4547 public void deleteGitLabCI (Object projectIdOrPath ) throws GitLabApiException {
4648 Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
@@ -56,7 +58,7 @@ public void deleteGitLabCI(Object projectIdOrPath) throws GitLabApiException {
5658 * @return a HipChatService instance holding the HipChatService notification settings
5759 * @throws GitLabApiException if any exception occurs
5860 */
59- public HipChatService getHipChat (Object projectIdOrPath ) throws GitLabApiException {
61+ public HipChatService getHipChatService (Object projectIdOrPath ) throws GitLabApiException {
6062 Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "hipchat" );
6163 return (response .readEntity (HipChatService .class ));
6264 }
@@ -89,7 +91,7 @@ public HipChatService getHipChat(Object projectIdOrPath) throws GitLabApiExcepti
8991 * @return a HipChatService instance holding the newly updated settings
9092 * @throws GitLabApiException if any exception occurs
9193 */
92- public HipChatService updateHipChat (Object projectIdOrPath , HipChatService hipChat ) throws GitLabApiException {
94+ public HipChatService updateHipChatService (Object projectIdOrPath , HipChatService hipChat ) throws GitLabApiException {
9395 GitLabApiForm formData = new GitLabApiForm ()
9496 .withParam ("push_events" , hipChat .getPushEvents ())
9597 .withParam ("issues_events" , hipChat .getIssuesEvents ())
@@ -137,12 +139,25 @@ public void setHipChat(Object projectIdOrPath, String token, String room, String
137139 *
138140 * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
139141 * @throws GitLabApiException if any exception occurs
142+ * @deprecated replaced with {@link #deleteHipChatService(Object) updateHipChat} method
140143 */
141144 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 {
142157 Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
143158 delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "hipchat" );
144159 }
145-
160+
146161 /**
147162 * Get the Slack notification settings for a project.
148163 *
@@ -152,7 +167,7 @@ public void deleteHipChat(Object projectIdOrPath) throws GitLabApiException {
152167 * @return a SlackService instance holding the Slack notification settings
153168 * @throws GitLabApiException if any exception occurs
154169 */
155- public SlackService getSlackNotifications (Object projectIdOrPath ) throws GitLabApiException {
170+ public SlackService getSlackService (Object projectIdOrPath ) throws GitLabApiException {
156171 Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "slack" );
157172 return (response .readEntity (SlackService .class ));
158173 }
@@ -193,7 +208,7 @@ public SlackService getSlackNotifications(Object projectIdOrPath) throws GitLabA
193208 * @return a SlackService instance holding the newly updated settings
194209 * @throws GitLabApiException if any exception occurs
195210 */
196- public SlackService updateSlackNotifications (Object projectIdOrPath , SlackService slackNotifications ) throws GitLabApiException {
211+ public SlackService updateSlackService (Object projectIdOrPath , SlackService slackNotifications ) throws GitLabApiException {
197212 GitLabApiForm formData = new GitLabApiForm ()
198213 .withParam ("webhook" , slackNotifications .getWebhook (), true )
199214 .withParam ("username" , slackNotifications .getUsername ())
@@ -230,7 +245,7 @@ public SlackService updateSlackNotifications(Object projectIdOrPath, SlackServic
230245 * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
231246 * @throws GitLabApiException if any exception occurs
232247 */
233- public void deleteSlackNotifications (Object projectIdOrPath ) throws GitLabApiException {
248+ public void deleteSlackService (Object projectIdOrPath ) throws GitLabApiException {
234249 Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
235250 delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "slack" );
236251 }
@@ -244,7 +259,7 @@ public void deleteSlackNotifications(Object projectIdOrPath) throws GitLabApiExc
244259 * @return a JiraService instance holding the JIRA service settings
245260 * @throws GitLabApiException if any exception occurs
246261 */
247- public JiraService getJira (Object projectIdOrPath ) throws GitLabApiException {
262+ public JiraService getJiraService (Object projectIdOrPath ) throws GitLabApiException {
248263 Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "jira" );
249264 return (response .readEntity (JiraService .class ));
250265 }
@@ -270,7 +285,7 @@ public JiraService getJira(Object projectIdOrPath) throws GitLabApiException {
270285 * @return a JiraService instance holding the newly updated settings
271286 * @throws GitLabApiException if any exception occurs
272287 */
273- public JiraService updateJira (Object projectIdOrPath , JiraService jira ) throws GitLabApiException {
288+ public JiraService updateJiraService (Object projectIdOrPath , JiraService jira ) throws GitLabApiException {
274289 GitLabApiForm formData = new GitLabApiForm ()
275290 .withParam ("merge_requests_events" , jira .getMergeRequestsEvents ())
276291 .withParam ("commit_events" , jira .getCommitEvents ())
@@ -292,7 +307,7 @@ public JiraService updateJira(Object projectIdOrPath, JiraService jira) throws G
292307 * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
293308 * @throws GitLabApiException if any exception occurs
294309 */
295- public void deleteJira (Object projectIdOrPath ) throws GitLabApiException {
310+ public void deleteJiraService (Object projectIdOrPath ) throws GitLabApiException {
296311 Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
297312 delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "services" , "jira" );
298313 }
0 commit comments