Unverified Commit 09ed795b authored by Gautier de Saint Martin Lacaze's avatar Gautier de Saint Martin Lacaze Committed by GitHub
Browse files

Merge pull request #811 from gitlab4j/issue-810

Fix #810 : Change all model Ids to Long
parents 594bc6c2 f237167c
...@@ -46,8 +46,8 @@ public abstract class AbstractApi implements Constants { ...@@ -46,8 +46,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Project) { } else if (obj instanceof Project) {
Integer id = ((Project) obj).getId(); Long id = ((Project) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
...@@ -81,8 +81,8 @@ public abstract class AbstractApi implements Constants { ...@@ -81,8 +81,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Group) { } else if (obj instanceof Group) {
Integer id = ((Group) obj).getId(); Long id = ((Group) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
...@@ -116,8 +116,8 @@ public abstract class AbstractApi implements Constants { ...@@ -116,8 +116,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof User) { } else if (obj instanceof User) {
Integer id = ((User) obj).getId(); Long id = ((User) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
...@@ -151,8 +151,8 @@ public abstract class AbstractApi implements Constants { ...@@ -151,8 +151,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Label) { } else if (obj instanceof Label) {
Integer id = ((Label) obj).getId(); Long id = ((Label) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
......
...@@ -37,7 +37,7 @@ public class ApplicationSettingsApi extends AbstractApi { ...@@ -37,7 +37,7 @@ public class ApplicationSettingsApi extends AbstractApi {
} }
/** /**
* Update the application settings of the GitLab instance with the settings in the * Update the application settings of the GitLab instance with the settings in the
* provided ApplicationSettings instance. * provided ApplicationSettings instance.
* *
* <pre><code>GitLab Endpoint: PUT /api/v4/application/settings</code></pre> * <pre><code>GitLab Endpoint: PUT /api/v4/application/settings</code></pre>
...@@ -117,7 +117,7 @@ public class ApplicationSettingsApi extends AbstractApi { ...@@ -117,7 +117,7 @@ public class ApplicationSettingsApi extends AbstractApi {
String fieldName = fieldNames.next(); String fieldName = fieldNames.next();
switch (fieldName) { switch (fieldName) {
case "id": case "id":
appSettings.setId(root.path(fieldName).asInt()); appSettings.setId(root.path(fieldName).asLong());
break; break;
case "created_at": case "created_at":
......
...@@ -126,7 +126,7 @@ public class ApplicationsApi extends AbstractApi { ...@@ -126,7 +126,7 @@ public class ApplicationsApi extends AbstractApi {
* @param applicationId the ID of the OUAUTH Application to delete * @param applicationId the ID of the OUAUTH Application to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteApplication(Integer applicationId) throws GitLabApiException { public void deleteApplication(Long applicationId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "applications", applicationId); delete(Response.Status.NO_CONTENT, null, "applications", applicationId);
} }
} }
...@@ -32,7 +32,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -32,7 +32,7 @@ public class AuditEventApi extends AbstractApi {
* @return a List of group Audit events * @return a List of group Audit events
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException { public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException {
return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).all()); return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).all());
} }
...@@ -49,7 +49,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -49,7 +49,7 @@ public class AuditEventApi extends AbstractApi {
* @return a Pager of group Audit events * @return a Pager of group Audit events
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId, int itemsPerPage) throws GitLabApiException { public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId, int itemsPerPage) throws GitLabApiException {
Form form = new GitLabApiForm() Form form = new GitLabApiForm()
.withParam("created_before", ISO8601.toString(created_before, false)) .withParam("created_before", ISO8601.toString(created_before, false))
.withParam("created_after", ISO8601.toString(created_after, false)) .withParam("created_after", ISO8601.toString(created_after, false))
...@@ -70,7 +70,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -70,7 +70,7 @@ public class AuditEventApi extends AbstractApi {
* @return a Stream of group Audit events * @return a Stream of group Audit events
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException { public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException {
return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).stream()); return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).stream());
} }
...@@ -83,7 +83,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -83,7 +83,7 @@ public class AuditEventApi extends AbstractApi {
* @return the group Audit event * @return the group Audit event
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AuditEvent getAuditEvent(Integer auditEventId) throws GitLabApiException { public AuditEvent getAuditEvent(Long auditEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "audit_events", auditEventId); Response response = get(Response.Status.OK, null, "audit_events", auditEventId);
return (response.readEntity(AuditEvent.class)); return (response.readEntity(AuditEvent.class));
} }
......
...@@ -29,7 +29,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -29,7 +29,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified issue * @return a list of AwardEmoji for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getIssueAwardEmojis(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<AwardEmoji> getIssueAwardEmojis(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -45,7 +45,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -45,7 +45,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified merge request * @return a list of AwardEmoji for the specified merge request
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getMergeRequestAwardEmojis(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { public List<AwardEmoji> getMergeRequestAwardEmojis(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -61,7 +61,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -61,7 +61,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified snippet * @return a list of AwardEmoji for the specified snippet
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getSnippetAwardEmojis(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { public List<AwardEmoji> getSnippetAwardEmojis(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -78,7 +78,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -78,7 +78,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified note * @return a list of AwardEmoji for the specified note
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getIssueNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { public List<AwardEmoji> getIssueNoteAwardEmojis(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -95,7 +95,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -95,7 +95,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified note * @return a list of AwardEmoji for the specified note
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { public List<AwardEmoji> getNoteAwardEmojis(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException {
return getIssueNoteAwardEmojis(projectIdOrPath, issueIid, noteId); return getIssueNoteAwardEmojis(projectIdOrPath, issueIid, noteId);
} }
...@@ -110,7 +110,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -110,7 +110,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified note * @return a list of AwardEmoji for the specified note
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getMergeRequestNoteAwardEmojis(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException { public List<AwardEmoji> getMergeRequestNoteAwardEmojis(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -127,7 +127,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -127,7 +127,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji getIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException { public AwardEmoji getIssueAwardEmoji(Object projectIdOrPath, Long issueIid, Long awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -144,7 +144,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -144,7 +144,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException { public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -161,7 +161,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -161,7 +161,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException { public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Long snippetId, Long awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -179,7 +179,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -179,7 +179,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji getIssueNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { public AwardEmoji getIssueNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -196,10 +196,10 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -196,10 +196,10 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to get * @param awardId the ID of the award emoji to get
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated use {@link #getIssueNoteAwardEmoji(Object, Integer, Integer, Integer)} instead * @deprecated use {@link #getIssueNoteAwardEmoji(Object, Long, Long, Long)} instead
*/ */
@Deprecated @Deprecated
public AwardEmoji getNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { public AwardEmoji getNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException {
return getIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId); return getIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId);
} }
...@@ -215,7 +215,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -215,7 +215,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji getMergeRequestNoteAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, Integer awardId) throws GitLabApiException { public AwardEmoji getMergeRequestNoteAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long noteId, Long awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -232,7 +232,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -232,7 +232,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji addIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, String name) throws GitLabApiException { public AwardEmoji addIssueAwardEmoji(Object projectIdOrPath, Long issueIid, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji");
...@@ -250,7 +250,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -250,7 +250,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji addMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, String name) throws GitLabApiException { public AwardEmoji addMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji");
...@@ -268,7 +268,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -268,7 +268,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji addSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, String name) throws GitLabApiException { public AwardEmoji addSnippetAwardEmoji(Object projectIdOrPath, Long snippetId, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji");
...@@ -287,7 +287,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -287,7 +287,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public AwardEmoji addIssueNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, String name) throws GitLabApiException { public AwardEmoji addIssueNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji");
...@@ -305,10 +305,10 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -305,10 +305,10 @@ public class AwardEmojiApi extends AbstractApi {
* @param name the name of the award emoji to add * @param name the name of the award emoji to add
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated use {@link #addIssueNoteAwardEmoji(Object, Integer, Integer, String)} * @deprecated use {@link #addIssueNoteAwardEmoji(Object, Long, Long, String)}
*/ */
@Deprecated @Deprecated
public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, String name) throws GitLabApiException { public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, String name) throws GitLabApiException {
return addIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, name); return addIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, name);
} }
...@@ -341,7 +341,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -341,7 +341,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException { public void deleteIssueAwardEmoji(Object projectIdOrPath, Long issueIid, Long awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId);
} }
...@@ -356,7 +356,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -356,7 +356,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException { public void deleteMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId);
} }
...@@ -371,7 +371,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -371,7 +371,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException { public void deleteSnippetAwardEmoji(Object projectIdOrPath, Long snippetId, Long awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId);
} }
...@@ -387,7 +387,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -387,7 +387,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteIssueNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { public void deleteIssueNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId);
} }
...@@ -402,10 +402,10 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -402,10 +402,10 @@ public class AwardEmojiApi extends AbstractApi {
* @param noteId the note ID of the note to delete the award emoji from * @param noteId the note ID of the note to delete the award emoji from
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated use {@link #deleteIssueNoteAwardEmoji(Object, Integer, Integer, Integer)} instead * @deprecated use {@link #deleteIssueNoteAwardEmoji(Object, Long, Long, Long)} instead
*/ */
@Deprecated @Deprecated
public void deleteNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { public void deleteNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException {
deleteIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId); deleteIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId);
} }
...@@ -420,7 +420,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -420,7 +420,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteMergeRequestNoteAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, Integer awardId) throws GitLabApiException { public void deleteMergeRequestNoteAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long noteId, Long awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId);
} }
......
...@@ -12,10 +12,10 @@ import org.gitlab4j.api.models.BoardList; ...@@ -12,10 +12,10 @@ import org.gitlab4j.api.models.BoardList;
/** /**
* This class implements the client side API for the GitLab Issue Boards API calls. * This class implements the client side API for the GitLab Issue Boards API calls.
* *
* NOTE: If a user is not a member of a group and the group is private, * NOTE: If a user is not a member of a group and the group is private,
* a GET request on that group will result to a 404 status code. * a GET request on that group will result to a 404 status code.
* *
* @see <a href="https://docs.gitlab.com/ce/api/boards.html">GitLab Issue Boards API Documentaion</a> * @see <a href="https://docs.gitlab.com/ce/api/boards.html">GitLab Issue Boards API Documentaion</a>
*/ */
public class BoardsApi extends AbstractApi { public class BoardsApi extends AbstractApi {
...@@ -29,7 +29,7 @@ public class BoardsApi extends AbstractApi { ...@@ -29,7 +29,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of project's issue boards * @return a list of project's issue boards
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -42,7 +42,7 @@ public class BoardsApi extends AbstractApi { ...@@ -42,7 +42,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param page the page to get * @param page the page to get
* @param perPage the number of items per page * @param perPage the number of items per page
* @return a list of project's Boards in the specified range * @return a list of project's Boards in the specified range
...@@ -59,7 +59,7 @@ public class BoardsApi extends AbstractApi { ...@@ -59,7 +59,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param itemsPerPage the number of items per page * @param itemsPerPage the number of items per page
* @return a Pager of project's issue boards * @return a Pager of project's issue boards
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -74,7 +74,7 @@ public class BoardsApi extends AbstractApi { ...@@ -74,7 +74,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a Stream of project's issue boards * @return a Stream of project's issue boards
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -87,13 +87,13 @@ public class BoardsApi extends AbstractApi { ...@@ -87,13 +87,13 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @return a Board instance for the specified board ID * @return a Board instance for the specified board ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Board getBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public Board getBoard(Object projectIdOrPath, Long boardId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
return (response.readEntity(Board.class)); return (response.readEntity(Board.class));
} }
...@@ -101,13 +101,13 @@ public class BoardsApi extends AbstractApi { ...@@ -101,13 +101,13 @@ public class BoardsApi extends AbstractApi {
/** /**
* Get an issue board as an Optional instance. * Get an issue board as an Optional instance.
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @return the Board instance for the specified board ID as an Optional instance * @return the Board instance for the specified board ID as an Optional instance
*/ */
public Optional<Board> getOptionalBoard(Object projectIdOrPath, Integer boardId) { public Optional<Board> getOptionalBoard(Object projectIdOrPath, Long boardId) {
try { try {
return (Optional.ofNullable(getBoard(projectIdOrPath, boardId))); return (Optional.ofNullable(getBoard(projectIdOrPath, boardId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -122,7 +122,7 @@ public class BoardsApi extends AbstractApi { ...@@ -122,7 +122,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the new board * @param name the name for the new board
* @return the created Board instance * @return the created Board instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -140,7 +140,7 @@ public class BoardsApi extends AbstractApi { ...@@ -140,7 +140,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param boardId the ID of the board, required * @param boardId the ID of the board, required
* @param name the new name of the board, optional (can be null) * @param name the new name of the board, optional (can be null)
* @param assigneeId the assignee the board should be scoped to, optional (can be null) * @param assigneeId the assignee the board should be scoped to, optional (can be null)
...@@ -150,8 +150,8 @@ public class BoardsApi extends AbstractApi { ...@@ -150,8 +150,8 @@ public class BoardsApi extends AbstractApi {
* @return the updated Board instance * @return the updated Board instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public BoardList updateBoard(Object projectIdOrPath, Integer boardId, String name, public BoardList updateBoard(Object projectIdOrPath, Long boardId, String name,
Integer assigneeId, Integer milestoneId, String labels, Integer weight) throws GitLabApiException { Long assigneeId, Long milestoneId, String labels, Integer weight) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("name", name) .withParam("name", name)
.withParam("assignee_id", assigneeId) .withParam("assignee_id", assigneeId)
...@@ -170,11 +170,11 @@ public class BoardsApi extends AbstractApi { ...@@ -170,11 +170,11 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public void deleteBoard(Object projectIdOrPath, Long boardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId); delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
} }
...@@ -183,12 +183,12 @@ public class BoardsApi extends AbstractApi { ...@@ -183,12 +183,12 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @return a list of the issue board's lists * @return a list of the issue board's lists
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<BoardList> getBoardLists(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public List<BoardList> getBoardLists(Object projectIdOrPath, Long boardId) throws GitLabApiException {
return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).all()); return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).all());
} }
...@@ -198,14 +198,14 @@ public class BoardsApi extends AbstractApi { ...@@ -198,14 +198,14 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param page the page to get * @param page the page to get
* @param perPage the number of Boards per page * @param perPage the number of Boards per page
* @return a list of the issue board's lists in the specified range * @return a list of the issue board's lists in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<BoardList> getBoardLists(Object projectIdOrPath, Integer boardId, int page, int perPage) throws GitLabApiException { public List<BoardList> getBoardLists(Object projectIdOrPath, Long boardId, int page, int perPage) throws GitLabApiException {
Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage), Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists");
return (response.readEntity(new GenericType<List<BoardList>>() {})); return (response.readEntity(new GenericType<List<BoardList>>() {}));
...@@ -216,13 +216,13 @@ public class BoardsApi extends AbstractApi { ...@@ -216,13 +216,13 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param itemsPerPage the number of Board instances that will be fetched per page * @param itemsPerPage the number of Board instances that will be fetched per page
* @return a Pager of the issue board's lists * @return a Pager of the issue board's lists
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<BoardList> getBoardLists(Object projectIdOrPath, Integer boardId, int itemsPerPage) throws GitLabApiException { public Pager<BoardList> getBoardLists(Object projectIdOrPath, Long boardId, int itemsPerPage) throws GitLabApiException {
return (new Pager<BoardList>(this, BoardList.class, itemsPerPage, null, return (new Pager<BoardList>(this, BoardList.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists")); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"));
} }
...@@ -232,12 +232,12 @@ public class BoardsApi extends AbstractApi { ...@@ -232,12 +232,12 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @return a Stream of the issue board's lists * @return a Stream of the issue board's lists
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<BoardList> getBoardsListsStream(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public Stream<BoardList> getBoardsListsStream(Object projectIdOrPath, Long boardId) throws GitLabApiException {
return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).stream()); return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).stream());
} }
...@@ -246,14 +246,14 @@ public class BoardsApi extends AbstractApi { ...@@ -246,14 +246,14 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param listId the ID of the board lists to get * @param listId the ID of the board lists to get
* @return a BoardList instance for the specified board ID and list ID * @return a BoardList instance for the specified board ID and list ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { public BoardList getBoardList(Object projectIdOrPath, Long boardId, Long listId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
return (response.readEntity(BoardList.class)); return (response.readEntity(BoardList.class));
} }
...@@ -261,14 +261,14 @@ public class BoardsApi extends AbstractApi { ...@@ -261,14 +261,14 @@ public class BoardsApi extends AbstractApi {
/** /**
* Get a single issue board list as an Optional instance. * Get a single issue board list as an Optional instance.
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param listId the ID of the board lists to get * @param listId the ID of the board lists to get
* @return a BoardList instance for the specified board ID and list ID as an Optional instance * @return a BoardList instance for the specified board ID and list ID as an Optional instance
*/ */
public Optional<BoardList> getOptionalBoardList(Object projectIdOrPath, Integer boardId, Integer listId) { public Optional<BoardList> getOptionalBoardList(Object projectIdOrPath, Long boardId, Long listId) {
try { try {
return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId))); return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -279,15 +279,15 @@ public class BoardsApi extends AbstractApi { ...@@ -279,15 +279,15 @@ public class BoardsApi extends AbstractApi {
/** /**
* Creates a new Issue Board list. * Creates a new Issue Board list.
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param labelId the ID of the label * @param labelId the ID of the label
* @return the created BoardList instance * @return the created BoardList instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public BoardList createBoardList(Object projectIdOrPath, Integer boardId, Integer labelId) throws GitLabApiException { public BoardList createBoardList(Object projectIdOrPath, Long boardId, Long labelId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("label_id", labelId, true); .withParam("label_id", labelId, true);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists");
...@@ -297,16 +297,16 @@ public class BoardsApi extends AbstractApi { ...@@ -297,16 +297,16 @@ public class BoardsApi extends AbstractApi {
/** /**
* Updates an existing Issue Board list. This call is used to change list position. * Updates an existing Issue Board list. This call is used to change list position.
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param listId the ID of the list * @param listId the ID of the list
* @param position the new position for the list * @param position the new position for the list
* @return the updated BoardList instance * @return the updated BoardList instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public BoardList updateBoardList(Object projectIdOrPath, Integer boardId, Integer listId, Integer position) throws GitLabApiException { public BoardList updateBoardList(Object projectIdOrPath, Long boardId, Long listId, Integer position) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true); GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true);
Response response = putWithFormData(Response.Status.OK, formData, Response response = putWithFormData(Response.Status.OK, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
...@@ -316,14 +316,14 @@ public class BoardsApi extends AbstractApi { ...@@ -316,14 +316,14 @@ public class BoardsApi extends AbstractApi {
/** /**
* Soft deletes an existing Issue Board list. Only for admins and project owners. * Soft deletes an existing Issue Board list. Only for admins and project owners.
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param boardId the ID of the board * @param boardId the ID of the board
* @param listId the ID of the list * @param listId the ID of the list
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { public void deleteBoardList(Object projectIdOrPath, Long boardId, Long listId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
} }
} }
...@@ -49,7 +49,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -49,7 +49,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of pages in the project's registry repositories * @return a list of pages in the project's registry repositories
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -62,7 +62,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -62,7 +62,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param page the page to get * @param page the page to get
* @param perPage the number of Package instances per page * @param perPage the number of Package instances per page
* @return a list of registry repositories for the specified range * @return a list of registry repositories for the specified range
...@@ -80,7 +80,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -80,7 +80,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param itemsPerPage the number of RegistryRepository instances per page * @param itemsPerPage the number of RegistryRepository instances per page
* @return a Pager of registry repositories for the specified range * @return a Pager of registry repositories for the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -95,7 +95,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -95,7 +95,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a Stream of pages in the project's registry repositories * @return a Stream of pages in the project's registry repositories
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -110,11 +110,11 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -110,11 +110,11 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteRepository(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { public void deleteRepository(Object projectIdOrPath, Long repositoryId) throws GitLabApiException {
if (repositoryId == null) { if (repositoryId == null) {
throw new RuntimeException("repositoryId cannot be null"); throw new RuntimeException("repositoryId cannot be null");
...@@ -128,12 +128,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -128,12 +128,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @return a list of Repository Tags for the specified repository ID * @return a list of Repository Tags for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { public List<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Long repositoryId) throws GitLabApiException {
return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).all(); return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).all();
} }
...@@ -142,13 +142,13 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -142,13 +142,13 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @param itemsPerPage the number of RegistryRepositoryTag instances per page * @param itemsPerPage the number of RegistryRepositoryTag instances per page
* @return a Pager of Repository Tags for the specified repository ID * @return a Pager of Repository Tags for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Integer repositoryId, int itemsPerPage) throws GitLabApiException { public Pager<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Long repositoryId, int itemsPerPage) throws GitLabApiException {
return (new Pager<>(this, RegistryRepositoryTag.class, itemsPerPage, null, return (new Pager<>(this, RegistryRepositoryTag.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags")); "projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags"));
} }
...@@ -158,12 +158,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -158,12 +158,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @return a list of Repository Tags for the specified repository ID * @return a list of Repository Tags for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<RegistryRepositoryTag> getRepositoryTagsStream(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { public Stream<RegistryRepositoryTag> getRepositoryTagsStream(Object projectIdOrPath, Long repositoryId) throws GitLabApiException {
return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).stream(); return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).stream();
} }
...@@ -172,13 +172,13 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -172,13 +172,13 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @param tagName the name of tag * @param tagName the name of tag
* @return the Repository Tag for the specified repository ID * @return the Repository Tag for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public RegistryRepositoryTag getRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) throws GitLabApiException { public RegistryRepositoryTag getRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) throws GitLabApiException {
Response response = get(Response.Status.OK, null, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags", tagName); "projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags", tagName);
return response.readEntity(new GenericType<RegistryRepositoryTag>() { return response.readEntity(new GenericType<RegistryRepositoryTag>() {
...@@ -190,12 +190,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -190,12 +190,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @param tagName the name of tag * @param tagName the name of tag
* @return the Repository Tag for the specified repository ID as the value of the Optional * @return the Repository Tag for the specified repository ID as the value of the Optional
*/ */
public Optional<RegistryRepositoryTag> getOptionalRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) { public Optional<RegistryRepositoryTag> getOptionalRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) {
try { try {
return (Optional.ofNullable(getRepositoryTag(projectIdOrPath, repositoryId, tagName))); return (Optional.ofNullable(getRepositoryTag(projectIdOrPath, repositoryId, tagName)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -208,12 +208,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -208,12 +208,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @param tagName the name of the tag to delete * @param tagName the name of the tag to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) throws GitLabApiException { public void deleteRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) throws GitLabApiException {
if (repositoryId == null) { if (repositoryId == null) {
throw new RuntimeException("repositoryId cannot be null"); throw new RuntimeException("repositoryId cannot be null");
...@@ -241,7 +241,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -241,7 +241,7 @@ public class ContainerRegistryApi extends AbstractApi {
* These operations are executed asynchronously and it might take time to get executed. You can run this at most * These operations are executed asynchronously and it might take time to get executed. You can run this at most
* once an hour for a given container repository. * once an hour for a given container repository.
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param repositoryId the ID of registry repository * @param repositoryId the ID of registry repository
* @param nameRegex the regex of the name to delete. To delete all tags specify <code>.*</code>. * @param nameRegex the regex of the name to delete. To delete all tags specify <code>.*</code>.
* @param keepN the amount of latest tags of given name to keep. * @param keepN the amount of latest tags of given name to keep.
...@@ -249,7 +249,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -249,7 +249,7 @@ public class ContainerRegistryApi extends AbstractApi {
* <code>1h</code>, <code>1d</code>, <code>1month</code>. * <code>1h</code>, <code>1d</code>, <code>1month</code>.
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteRepositoryTags(Object projectIdOrPath, Integer repositoryId, String nameRegex, Integer keepN, String olderThan) throws GitLabApiException { public void deleteRepositoryTags(Object projectIdOrPath, Long repositoryId, String nameRegex, Integer keepN, String olderThan) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("name_regex", nameRegex, true) .withParam("name_regex", nameRegex, true)
......
...@@ -77,7 +77,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -77,7 +77,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of DeployKey * @return a list of DeployKey
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -91,7 +91,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -91,7 +91,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param page the page to get * @param page the page to get
* @param perPage the number of deploy keys per page * @param perPage the number of deploy keys per page
* @return the list of DeployKey in the specified range * @return the list of DeployKey in the specified range
...@@ -108,7 +108,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -108,7 +108,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance@param projectId the ID of the project * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance@param projectId the ID of the project
* @param itemsPerPage the number of DeployKey instances that will be fetched per page * @param itemsPerPage the number of DeployKey instances that will be fetched per page
* @return a Pager of DeployKey * @return a Pager of DeployKey
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -123,7 +123,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -123,7 +123,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of DeployKey * @return a list of DeployKey
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -136,12 +136,12 @@ public class DeployKeysApi extends AbstractApi { ...@@ -136,12 +136,12 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param keyId the ID of the deploy key to delete * @param keyId the ID of the deploy key to delete
* @return the DeployKey instance for the specified project ID and key ID * @return the DeployKey instance for the specified project ID and key ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public DeployKey getDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { public DeployKey getDeployKey(Object projectIdOrPath, Long keyId) throws GitLabApiException {
if (keyId == null) { if (keyId == null) {
throw new RuntimeException("keyId cannot be null"); throw new RuntimeException("keyId cannot be null");
...@@ -157,11 +157,11 @@ public class DeployKeysApi extends AbstractApi { ...@@ -157,11 +157,11 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param keyId the ID of the deploy key to delete * @param keyId the ID of the deploy key to delete
* @return the DeployKey for the specified project ID and key ID as an Optional instance * @return the DeployKey for the specified project ID and key ID as an Optional instance
*/ */
public Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Integer keyId) { public Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Long keyId) {
try { try {
return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId))); return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -174,7 +174,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -174,7 +174,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param title the new deploy key's title, required * @param title the new deploy key's title, required
* @param key the new deploy key, required * @param key the new deploy key, required
* @param canPush can deploy key push to the project's repository, optional * @param canPush can deploy key push to the project's repository, optional
...@@ -197,14 +197,14 @@ public class DeployKeysApi extends AbstractApi { ...@@ -197,14 +197,14 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deployKeyId the ID of the deploy key to update, required * @param deployKeyId the ID of the deploy key to update, required
* @param title the title for the deploy key, optional * @param title the title for the deploy key, optional
* @param canPush can deploy key push to the project's repository, optional * @param canPush can deploy key push to the project's repository, optional
* @return an updated DeployKey instance * @return an updated DeployKey instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public DeployKey updateDeployKey(Object projectIdOrPath, Integer deployKeyId, String title, Boolean canPush) throws GitLabApiException { public DeployKey updateDeployKey(Object projectIdOrPath, Long deployKeyId, String title, Boolean canPush) throws GitLabApiException {
if (deployKeyId == null) { if (deployKeyId == null) {
throw new RuntimeException("deployKeyId cannot be null"); throw new RuntimeException("deployKeyId cannot be null");
...@@ -224,11 +224,11 @@ public class DeployKeysApi extends AbstractApi { ...@@ -224,11 +224,11 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param keyId the ID of the deploy key to delete * @param keyId the ID of the deploy key to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { public void deleteDeployKey(Object projectIdOrPath, Long keyId) throws GitLabApiException {
if (keyId == null) { if (keyId == null) {
throw new RuntimeException("keyId cannot be null"); throw new RuntimeException("keyId cannot be null");
...@@ -242,12 +242,12 @@ public class DeployKeysApi extends AbstractApi { ...@@ -242,12 +242,12 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param keyId the ID of the deploy key to enable * @param keyId the ID of the deploy key to enable
* @return an DeployKey instance with info on the enabled deploy key * @return an DeployKey instance with info on the enabled deploy key
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public DeployKey enableDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { public DeployKey enableDeployKey(Object projectIdOrPath, Long keyId) throws GitLabApiException {
if (keyId == null) { if (keyId == null) {
throw new RuntimeException("keyId cannot be null"); throw new RuntimeException("keyId cannot be null");
......
...@@ -26,7 +26,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -26,7 +26,7 @@ public class DeployTokensApi extends AbstractApi {
/** /**
* Get a list of all deploy tokens across the GitLab instance. This endpoint requires admin access. * Get a list of all deploy tokens across the GitLab instance. This endpoint requires admin access.
* *
* <pre><code>GitLab Endpoint: GET /deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /deploy_tokens</code></pre>
* *
* @return a list of DeployToken * @return a list of DeployToken
...@@ -70,7 +70,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -70,7 +70,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of DeployToken * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -83,7 +83,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -83,7 +83,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance@param projectId the ID of the project * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance@param projectId the ID of the project
* @param itemsPerPage the number of DeployToken instances that will be fetched per page * @param itemsPerPage the number of DeployToken instances that will be fetched per page
* @return a Pager of DeployToken * @return a Pager of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -98,7 +98,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -98,7 +98,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of DeployToken * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -111,7 +111,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -111,7 +111,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the new deploy token’s name, required * @param name the new deploy token’s name, required
* @param expiresAt expiration date for the deploy token. Currently documented as not required but api fails if not provided. Does not expire if no value is provided. * @param expiresAt expiration date for the deploy token. Currently documented as not required but api fails if not provided. Does not expire if no value is provided.
* @param username the username for deploy token. Currently documented as not required but api fails if not provided. Default is gitlab+deploy-token-{n} * @param username the username for deploy token. Currently documented as not required but api fails if not provided. Default is gitlab+deploy-token-{n}
...@@ -132,14 +132,14 @@ public class DeployTokensApi extends AbstractApi { ...@@ -132,14 +132,14 @@ public class DeployTokensApi extends AbstractApi {
/** /**
* Removes a deploy token from the group. * Removes a deploy token from the group.
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_tokens/:token_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_tokens/:token_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param tokenId the ID of the deploy token to delete * @param tokenId the ID of the deploy token to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteProjectDeployToken(Object projectIdOrPath, Integer tokenId) throws GitLabApiException { public void deleteProjectDeployToken(Object projectIdOrPath, Long tokenId) throws GitLabApiException {
if (tokenId == null) { if (tokenId == null) {
throw new RuntimeException("tokenId cannot be null"); throw new RuntimeException("tokenId cannot be null");
...@@ -157,7 +157,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -157,7 +157,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre>
* *
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @return a list of DeployToken * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -170,7 +170,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -170,7 +170,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre>
* *
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance@param groupId the ID of the group * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance@param groupId the ID of the group
* @param itemsPerPage the number of DeployToken instances that will be fetched per page * @param itemsPerPage the number of DeployToken instances that will be fetched per page
* @return a Pager of DeployToken * @return a Pager of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -185,7 +185,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -185,7 +185,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre>
* *
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @return a list of DeployToken * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -198,7 +198,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -198,7 +198,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/deploy_tokens</code></pre>
* *
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param name the new deploy token’s name, required * @param name the new deploy token’s name, required
* @param expiresAt expiration date for the deploy token. Currently documented as not required but api fails if not provided. Does not expire if no value is provided. * @param expiresAt expiration date for the deploy token. Currently documented as not required but api fails if not provided. Does not expire if no value is provided.
* @param username the username for deploy token. Currently documented as not required but api fails if not provided. Default is gitlab+deploy-token-{n} * @param username the username for deploy token. Currently documented as not required but api fails if not provided. Default is gitlab+deploy-token-{n}
...@@ -222,11 +222,11 @@ public class DeployTokensApi extends AbstractApi { ...@@ -222,11 +222,11 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /groups/:id/deploy_tokens/:token_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /groups/:id/deploy_tokens/:token_id</code></pre>
* *
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param tokenId the ID of the deploy token to delete * @param tokenId the ID of the deploy token to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteGroupDeployToken(Object groupIdOrPath, Integer tokenId) throws GitLabApiException { public void deleteGroupDeployToken(Object groupIdOrPath, Long tokenId) throws GitLabApiException {
if (tokenId == null) { if (tokenId == null) {
throw new RuntimeException("tokenId cannot be null"); throw new RuntimeException("tokenId cannot be null");
......
...@@ -26,7 +26,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -26,7 +26,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of Deployments * @return a list of Deployments
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -39,7 +39,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -39,7 +39,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param itemsPerPage the number of Deployments instances that will be fetched per page * @param itemsPerPage the number of Deployments instances that will be fetched per page
* @return a Pager of Deployment * @return a Pager of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -53,7 +53,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -53,7 +53,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings * @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings
* @return a Pager of Deployment * @return a Pager of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -67,7 +67,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -67,7 +67,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings * @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings
* @param itemsPerPage the number of Deployments instances that will be fetched per page * @param itemsPerPage the number of Deployments instances that will be fetched per page
* @return a Pager of Deployment * @return a Pager of Deployment
...@@ -84,7 +84,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -84,7 +84,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of Deployment * @return a list of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -97,7 +97,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -97,7 +97,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings * @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings
* @return a list of Deployment * @return a list of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -111,12 +111,12 @@ public class DeploymentsApi extends AbstractApi { ...@@ -111,12 +111,12 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deploymentId the ID of a project's deployment * @param deploymentId the ID of a project's deployment
* @return the specified Deployment instance * @return the specified Deployment instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Deployment getDeployment(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { public Deployment getDeployment(Object projectIdOrPath, Long deploymentId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId); "projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId);
return (response.readEntity(Deployment.class)); return (response.readEntity(Deployment.class));
...@@ -127,11 +127,11 @@ public class DeploymentsApi extends AbstractApi { ...@@ -127,11 +127,11 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deploymentId the ID of a project's deployment * @param deploymentId the ID of a project's deployment
* @return the specified Deployment as an Optional instance * @return the specified Deployment as an Optional instance
*/ */
public Optional<Deployment> getOptionalDeployment(Object projectIdOrPath, Integer deploymentId) { public Optional<Deployment> getOptionalDeployment(Object projectIdOrPath, Long deploymentId) {
try { try {
return (Optional.ofNullable(getDeployment(projectIdOrPath, deploymentId))); return (Optional.ofNullable(getDeployment(projectIdOrPath, deploymentId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -144,7 +144,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -144,7 +144,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param environment The name of the environment to create the deployment for, required * @param environment The name of the environment to create the deployment for, required
* @param sha The SHA of the commit that is deployed, required * @param sha The SHA of the commit that is deployed, required
* @param ref The name of the branch or tag that is deployed, required * @param ref The name of the branch or tag that is deployed, required
...@@ -172,13 +172,13 @@ public class DeploymentsApi extends AbstractApi { ...@@ -172,13 +172,13 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/deployments/:key_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/deployments/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deploymentId The ID of the deployment to update, required * @param deploymentId The ID of the deployment to update, required
* @param status The new status of the deployment, required * @param status The new status of the deployment, required
* @return an updated Deployment instance * @return an updated Deployment instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Deployment updateDeployment(Object projectIdOrPath, Integer deploymentId, DeploymentStatus status) throws GitLabApiException { public Deployment updateDeployment(Object projectIdOrPath, Long deploymentId, DeploymentStatus status) throws GitLabApiException {
if (deploymentId == null) { if (deploymentId == null) {
throw new RuntimeException("deploymentId cannot be null"); throw new RuntimeException("deploymentId cannot be null");
...@@ -197,12 +197,12 @@ public class DeploymentsApi extends AbstractApi { ...@@ -197,12 +197,12 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deploymentId The ID of the deployment to update, required * @param deploymentId The ID of the deployment to update, required
* @return a list containing the MergeRequest instances shipped with a given deployment * @return a list containing the MergeRequest instances shipped with a given deployment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
public List<MergeRequest> getMergeRequests(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { public List<MergeRequest> getMergeRequests(Object projectIdOrPath, Long deploymentId) throws GitLabApiException {
return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).all()); return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).all());
} }
...@@ -211,13 +211,13 @@ public class DeploymentsApi extends AbstractApi { ...@@ -211,13 +211,13 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deploymentId The ID of the deployment to update, required * @param deploymentId The ID of the deployment to update, required
* @param itemsPerPage the number of Commit instances that will be fetched per page * @param itemsPerPage the number of Commit instances that will be fetched per page
* @return a Pager containing the MergeRequest instances shipped with a given deployment * @return a Pager containing the MergeRequest instances shipped with a given deployment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
public Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, Integer deploymentId, int itemsPerPage) throws GitLabApiException { public Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, Long deploymentId, int itemsPerPage) throws GitLabApiException {
return (new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null, return (new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId, "merge_requests")); "projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId, "merge_requests"));
} }
...@@ -227,12 +227,12 @@ public class DeploymentsApi extends AbstractApi { ...@@ -227,12 +227,12 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param deploymentId The ID of the deployment to update, required * @param deploymentId The ID of the deployment to update, required
* @return a Stream containing the MergeRequest instances shipped with a given deployment * @return a Stream containing the MergeRequest instances shipped with a given deployment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
public Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { public Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, Long deploymentId) throws GitLabApiException {
return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).stream()); return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).stream());
} }
......
...@@ -69,7 +69,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -69,7 +69,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return an Environment instance * @return an Environment instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Environment getEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { public Environment getEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId);
return (response.readEntity(Environment.class)); return (response.readEntity(Environment.class));
...@@ -84,7 +84,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -84,7 +84,7 @@ public class EnvironmentsApi extends AbstractApi {
* @param environmentId the ID of the environment to get * @param environmentId the ID of the environment to get
* @return the Environment as an Optional instance * @return the Environment as an Optional instance
*/ */
public Optional<Environment> getOptionalEnvironment(Object projectIdOrPath, Integer environmentId) { public Optional<Environment> getOptionalEnvironment(Object projectIdOrPath, Long environmentId) {
try { try {
return (Optional.ofNullable(getEnvironment(projectIdOrPath, environmentId))); return (Optional.ofNullable(getEnvironment(projectIdOrPath, environmentId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -122,7 +122,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -122,7 +122,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return the created Environment instance * @return the created Environment instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Environment updateEnvironment(Object projectIdOrPath, Integer environmentId, String name, String externalUrl) throws GitLabApiException { public Environment updateEnvironment(Object projectIdOrPath, Long environmentId, String name, String externalUrl) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("name", name).withParam("external_url", externalUrl); GitLabApiForm formData = new GitLabApiForm().withParam("name", name).withParam("external_url", externalUrl);
Response response = putWithFormData(Response.Status.OK, formData, formData, Response response = putWithFormData(Response.Status.OK, formData, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId);
...@@ -139,7 +139,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -139,7 +139,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return the stopped Environment instance * @return the stopped Environment instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Environment stopEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { public Environment stopEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException {
Response response = post(Response.Status.OK, (GitLabApiForm) null, Response response = post(Response.Status.OK, (GitLabApiForm) null,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop"); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop");
return (response.readEntity(Environment.class)); return (response.readEntity(Environment.class));
...@@ -154,7 +154,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -154,7 +154,7 @@ public class EnvironmentsApi extends AbstractApi {
* @param environmentId the ID of the environment to delete * @param environmentId the ID of the environment to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { public void deleteEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException {
delete(Response.Status.OK, null, delete(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId);
} }
...@@ -169,7 +169,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -169,7 +169,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return the Environment instance of the stopped environment * @return the Environment instance of the stopped environment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Environment createEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { public Environment createEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm(); GitLabApiForm formData = new GitLabApiForm();
Response response = post(Response.Status.CREATED, formData, Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop"); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop");
......
...@@ -14,11 +14,11 @@ import org.gitlab4j.api.models.EpicIssue; ...@@ -14,11 +14,11 @@ import org.gitlab4j.api.models.EpicIssue;
/** /**
* This class implements the client side API for the GitLab Epics and Epic Issues API calls. * This class implements the client side API for the GitLab Epics and Epic Issues API calls.
* *
* NOTE: * NOTE:
* - If a user is not a member of a group and the group is private, a GET request on that group will result to a 404 status code. * - If a user is not a member of a group and the group is private, a GET request on that group will result to a 404 status code.
* - Epics are available only in Ultimate. If epics feature is not available a 403 status code will be returned. * - Epics are available only in Ultimate. If epics feature is not available a 403 status code will be returned.
* *
* @see <a href="https://docs.gitlab.com/ee/api/epics.html">GitLab Epics API Documentaion</a> * @see <a href="https://docs.gitlab.com/ee/api/epics.html">GitLab Epics API Documentaion</a>
* @see <a href="https://docs.gitlab.com/ee/api/epic_issues.html">GitLab Epic Issues API Documentation</a> * @see <a href="https://docs.gitlab.com/ee/api/epic_issues.html">GitLab Epic Issues API Documentation</a>
*/ */
...@@ -86,7 +86,7 @@ public class EpicsApi extends AbstractApi { ...@@ -86,7 +86,7 @@ public class EpicsApi extends AbstractApi {
/** /**
* Gets all epics of the requested group and its subgroups. * Gets all epics of the requested group and its subgroups.
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/epics</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/epics</code></pre>
* *
* @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
...@@ -99,7 +99,7 @@ public class EpicsApi extends AbstractApi { ...@@ -99,7 +99,7 @@ public class EpicsApi extends AbstractApi {
* @return a list of matching epics of the requested group and its subgroups * @return a list of matching epics of the requested group and its subgroups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, public List<Epic> getEpics(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy,
SortOrder sortOrder, String search) throws GitLabApiException { SortOrder sortOrder, String search) throws GitLabApiException {
return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).all()); return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).all());
} }
...@@ -121,7 +121,7 @@ public class EpicsApi extends AbstractApi { ...@@ -121,7 +121,7 @@ public class EpicsApi extends AbstractApi {
* @return a list of matching epics of the requested group and its subgroups in the specified range * @return a list of matching epics of the requested group and its subgroups in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, public List<Epic> getEpics(Object groupIdOrPath, Long authorId, String labels,
EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException { EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm(page, perPage) GitLabApiForm formData = new GitLabApiForm(page, perPage)
.withParam("author_id", authorId) .withParam("author_id", authorId)
...@@ -149,7 +149,7 @@ public class EpicsApi extends AbstractApi { ...@@ -149,7 +149,7 @@ public class EpicsApi extends AbstractApi {
* @return the Pager of matching epics of the requested group and its subgroups * @return the Pager of matching epics of the requested group and its subgroups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, public Pager<Epic> getEpics(Object groupIdOrPath, Long authorId, String labels,
EpicOrderBy orderBy, SortOrder sortOrder, String search, int itemsPerPage) throws GitLabApiException { EpicOrderBy orderBy, SortOrder sortOrder, String search, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("author_id", authorId) .withParam("author_id", authorId)
...@@ -175,7 +175,7 @@ public class EpicsApi extends AbstractApi { ...@@ -175,7 +175,7 @@ public class EpicsApi extends AbstractApi {
* @return a Stream of matching epics of the requested group and its subgroups * @return a Stream of matching epics of the requested group and its subgroups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Epic> getEpicsStream(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, public Stream<Epic> getEpicsStream(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy,
SortOrder sortOrder, String search) throws GitLabApiException { SortOrder sortOrder, String search) throws GitLabApiException {
return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).stream()); return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).stream());
} }
...@@ -190,7 +190,7 @@ public class EpicsApi extends AbstractApi { ...@@ -190,7 +190,7 @@ public class EpicsApi extends AbstractApi {
* @return an Epic instance for the specified Epic * @return an Epic instance for the specified Epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Epic getEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { public Epic getEpic(Object groupIdOrPath, Long epicIid) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid); Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
return (response.readEntity(Epic.class)); return (response.readEntity(Epic.class));
} }
...@@ -204,7 +204,7 @@ public class EpicsApi extends AbstractApi { ...@@ -204,7 +204,7 @@ public class EpicsApi extends AbstractApi {
* @param epicIid the IID of the epic to get * @param epicIid the IID of the epic to get
* @return an Optional instance with the specified Epic as a value * @return an Optional instance with the specified Epic as a value
*/ */
public Optional<Epic> getOptionalEpic(Object groupIdOrPath, Integer epicIid) { public Optional<Epic> getOptionalEpic(Object groupIdOrPath, Long epicIid) {
try { try {
return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid))); return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -240,14 +240,14 @@ public class EpicsApi extends AbstractApi { ...@@ -240,14 +240,14 @@ public class EpicsApi extends AbstractApi {
} }
/** /**
* Creates a new epic using the information contained in the provided Epic instance. Only the following * Creates a new epic using the information contained in the provided Epic instance. Only the following
* fields from the Epic instance are used: * fields from the Epic instance are used:
* <pre><code> * <pre><code>
* title - the title of the epic (required) * title - the title of the epic (required)
* labels - comma separated list of labels (optional) * labels - comma separated list of labels (optional)
* description - the description of the epic (optional) * description - the description of the epic (optional)
* startDate - the start date of the epic (optional) * startDate - the start date of the epic (optional)
* endDate - the end date of the epic (optional) * endDate - the end date of the epic (optional)
* </code></pre> * </code></pre>
* *
* <pre><code>GitLab Endpoint: POST /groups/:id/epics</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/epics</code></pre>
...@@ -284,7 +284,7 @@ public class EpicsApi extends AbstractApi { ...@@ -284,7 +284,7 @@ public class EpicsApi extends AbstractApi {
* @return an Epic instance containing info on the newly created epic * @return an Epic instance containing info on the newly created epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Epic updateEpic(Object groupIdOrPath, Integer epicIid, String title, String labels, String description, public Epic updateEpic(Object groupIdOrPath, Long epicIid, String title, String labels, String description,
Date startDate, Date endDate) throws GitLabApiException { Date startDate, Date endDate) throws GitLabApiException {
Form formData = new GitLabApiForm() Form formData = new GitLabApiForm()
.withParam("title", title, true) .withParam("title", title, true)
...@@ -298,14 +298,14 @@ public class EpicsApi extends AbstractApi { ...@@ -298,14 +298,14 @@ public class EpicsApi extends AbstractApi {
} }
/** /**
* Updates an epic using the information contained in the provided Epic instance. Only the following * Updates an epic using the information contained in the provided Epic instance. Only the following
* fields from the Epic instance are used: * fields from the Epic instance are used:
* <pre><code> * <pre><code>
* title - the title of the epic (optional) * title - the title of the epic (optional)
* labels - comma separated list of labels (optional) * labels - comma separated list of labels (optional)
* description - the description of the epic (optional) * description - the description of the epic (optional)
* startDate - the start date of the epic (optional) * startDate - the start date of the epic (optional)
* endDate - the end date of the epic (optional) * endDate - the end date of the epic (optional)
* </code></pre> * </code></pre>
* <pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid</code></pre> * <pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid</code></pre>
* *
...@@ -315,7 +315,7 @@ public class EpicsApi extends AbstractApi { ...@@ -315,7 +315,7 @@ public class EpicsApi extends AbstractApi {
* @return an Epic instance containing info on the updated epic * @return an Epic instance containing info on the updated epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Epic updateEpic(Object groupIdOrPath, Integer epicIid, Epic epic) throws GitLabApiException { public Epic updateEpic(Object groupIdOrPath, Long epicIid, Epic epic) throws GitLabApiException {
Form formData = new GitLabApiForm() Form formData = new GitLabApiForm()
.withParam("title", epic.getTitle(), true) .withParam("title", epic.getTitle(), true)
.withParam("labels", epic.getLabels()) .withParam("labels", epic.getLabels())
...@@ -336,7 +336,7 @@ public class EpicsApi extends AbstractApi { ...@@ -336,7 +336,7 @@ public class EpicsApi extends AbstractApi {
* @param epicIid the IID of the epic to delete * @param epicIid the IID of the epic to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { public void deleteEpic(Object groupIdOrPath, Long epicIid) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid); delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
} }
...@@ -350,7 +350,7 @@ public class EpicsApi extends AbstractApi { ...@@ -350,7 +350,7 @@ public class EpicsApi extends AbstractApi {
* @return a list of all epic issues belonging to the specified epic * @return a list of all epic issues belonging to the specified epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { public List<Epic> getEpicIssues(Object groupIdOrPath, Long epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all()); return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all());
} }
...@@ -367,7 +367,7 @@ public class EpicsApi extends AbstractApi { ...@@ -367,7 +367,7 @@ public class EpicsApi extends AbstractApi {
* @return a list of all epic issues belonging to the specified epic in the specified range * @return a list of all epic issues belonging to the specified epic in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException { public List<Epic> getEpicIssues(Object groupIdOrPath, Long epicIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"); Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues");
return (response.readEntity(new GenericType<List<Epic>>() { })); return (response.readEntity(new GenericType<List<Epic>>() { }));
} }
...@@ -383,7 +383,7 @@ public class EpicsApi extends AbstractApi { ...@@ -383,7 +383,7 @@ public class EpicsApi extends AbstractApi {
* @return the Pager of all epic issues belonging to the specified epic * @return the Pager of all epic issues belonging to the specified epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException { public Pager<Epic> getEpicIssues(Object groupIdOrPath, Long epicIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues")); return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"));
} }
...@@ -397,7 +397,7 @@ public class EpicsApi extends AbstractApi { ...@@ -397,7 +397,7 @@ public class EpicsApi extends AbstractApi {
* @return a Stream of all epic issues belonging to the specified epic * @return a Stream of all epic issues belonging to the specified epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Long epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream()); return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream());
} }
...@@ -413,7 +413,7 @@ public class EpicsApi extends AbstractApi { ...@@ -413,7 +413,7 @@ public class EpicsApi extends AbstractApi {
* @return an EpicIssue instance containing info on the newly assigned epic issue * @return an EpicIssue instance containing info on the newly assigned epic issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public EpicIssue assignIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { public EpicIssue assignIssue(Object groupIdOrPath, Long epicIid, Long issueIid) throws GitLabApiException {
Response response = post(Response.Status.CREATED, (Form)null, Response response = post(Response.Status.CREATED, (Form)null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(EpicIssue.class)); return (response.readEntity(EpicIssue.class));
...@@ -430,7 +430,7 @@ public class EpicsApi extends AbstractApi { ...@@ -430,7 +430,7 @@ public class EpicsApi extends AbstractApi {
* @return an EpicIssue instance containing info on the removed issue * @return an EpicIssue instance containing info on the removed issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { public EpicIssue removeIssue(Object groupIdOrPath, Long epicIid, Long issueIid) throws GitLabApiException {
Response response = delete(Response.Status.OK, null, Response response = delete(Response.Status.OK, null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(EpicIssue.class)); return (response.readEntity(EpicIssue.class));
...@@ -449,7 +449,7 @@ public class EpicsApi extends AbstractApi { ...@@ -449,7 +449,7 @@ public class EpicsApi extends AbstractApi {
* @return an EpicIssue instance containing info on the newly assigned epic issue * @return an EpicIssue instance containing info on the newly assigned epic issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public EpicIssue updateIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid, Integer moveBeforeId, Integer moveAfterId) throws GitLabApiException { public EpicIssue updateIssue(Object groupIdOrPath, Long epicIid, Long issueIid, Long moveBeforeId, Long moveAfterId) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm() GitLabApiForm form = new GitLabApiForm()
.withParam("move_before_id", moveBeforeId) .withParam("move_before_id", moveBeforeId)
.withParam("move_after_id", moveAfterId); .withParam("move_after_id", moveAfterId);
......
...@@ -296,7 +296,7 @@ public class EventsApi extends AbstractApi { ...@@ -296,7 +296,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param action include only events of a particular action type, optional * @param action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
...@@ -315,7 +315,7 @@ public class EventsApi extends AbstractApi { ...@@ -315,7 +315,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param action include only events of a particular action type, optional * @param action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
...@@ -326,7 +326,7 @@ public class EventsApi extends AbstractApi { ...@@ -326,7 +326,7 @@ public class EventsApi extends AbstractApi {
* @return a list of events for the specified project and matching the supplied parameters * @return a list of events for the specified project and matching the supplied parameters
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Event> getProjectEvents(Integer projectIdOrPath, ActionType action, TargetType targetType, public List<Event> getProjectEvents(Long projectIdOrPath, ActionType action, TargetType targetType,
Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException { Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
...@@ -348,7 +348,7 @@ public class EventsApi extends AbstractApi { ...@@ -348,7 +348,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param action include only events of a particular action type, optional * @param action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
...@@ -358,7 +358,7 @@ public class EventsApi extends AbstractApi { ...@@ -358,7 +358,7 @@ public class EventsApi extends AbstractApi {
* @return a Pager of events for the specified project and matching the supplied parameters * @return a Pager of events for the specified project and matching the supplied parameters
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Event> getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, public Pager<Event> getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after,
SortOrder sortOrder, int itemsPerPage) throws GitLabApiException { SortOrder sortOrder, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
...@@ -377,7 +377,7 @@ public class EventsApi extends AbstractApi { ...@@ -377,7 +377,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param action include only events of a particular action type, optional * @param action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
......
...@@ -449,7 +449,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -449,7 +449,7 @@ public class GitLabApi implements AutoCloseable {
*/ */
public final GitLabApi duplicate() { public final GitLabApi duplicate() {
Integer sudoUserId = this.getSudoAsId(); Long sudoUserId = this.getSudoAsId();
GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl, GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl,
getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties); getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties);
if (sudoUserId != null) { if (sudoUserId != null) {
...@@ -661,7 +661,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -661,7 +661,7 @@ public class GitLabApi implements AutoCloseable {
throw new GitLabApiException("the specified username was not found"); throw new GitLabApiException("the specified username was not found");
} }
Integer sudoAsId = user.getId(); Long sudoAsId = user.getId();
apiClient.setSudoAsId(sudoAsId); apiClient.setSudoAsId(sudoAsId);
} }
...@@ -679,7 +679,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -679,7 +679,7 @@ public class GitLabApi implements AutoCloseable {
* @param sudoAsId the ID of the user to sudo as, null will turn off sudo * @param sudoAsId the ID of the user to sudo as, null will turn off sudo
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void setSudoAsId(Integer sudoAsId) throws GitLabApiException { public void setSudoAsId(Long sudoAsId) throws GitLabApiException {
if (sudoAsId == null) { if (sudoAsId == null) {
apiClient.setSudoAsId(null); apiClient.setSudoAsId(null);
...@@ -700,7 +700,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -700,7 +700,7 @@ public class GitLabApi implements AutoCloseable {
* *
* @return the current sudo as ID, will return null if not in sudo mode * @return the current sudo as ID, will return null if not in sudo mode
*/ */
public Integer getSudoAsId() { public Long getSudoAsId() {
return (apiClient.getSudoAsId()); return (apiClient.getSudoAsId());
} }
......
...@@ -68,7 +68,7 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -68,7 +68,7 @@ public class GitLabApiClient implements AutoCloseable {
private boolean ignoreCertificateErrors; private boolean ignoreCertificateErrors;
private SSLContext openSslContext; private SSLContext openSslContext;
private HostnameVerifier openHostnameVerifier; private HostnameVerifier openHostnameVerifier;
private Integer sudoAsId; private Long sudoAsId;
private Integer connectTimeout; private Integer connectTimeout;
private Integer readTimeout; private Integer readTimeout;
...@@ -322,7 +322,7 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -322,7 +322,7 @@ public class GitLabApiClient implements AutoCloseable {
* Set the ID of the user to sudo as. * Set the ID of the user to sudo as.
* *
*/ */
Integer getSudoAsId() { Long getSudoAsId() {
return (sudoAsId); return (sudoAsId);
} }
...@@ -331,7 +331,7 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -331,7 +331,7 @@ public class GitLabApiClient implements AutoCloseable {
* *
* @param sudoAsId the ID of the user to sudo as * @param sudoAsId the ID of the user to sudo as
*/ */
void setSudoAsId(Integer sudoAsId) { void setSudoAsId(Long sudoAsId) {
this.sudoAsId = sudoAsId; this.sudoAsId = sudoAsId;
} }
...@@ -917,7 +917,8 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -917,7 +917,8 @@ public class GitLabApiClient implements AutoCloseable {
// Ignore differences between given hostname and certificate hostname // Ignore differences between given hostname and certificate hostname
HostnameVerifier hostnameVerifier = new HostnameVerifier() { HostnameVerifier hostnameVerifier = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) { @Override
public boolean verify(String hostname, SSLSession session) {
return true; return true;
} }
}; };
......
...@@ -32,7 +32,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -32,7 +32,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void scheduleExport(Object projectIdOrPath) throws GitLabApiException { public void scheduleExport(Object projectIdOrPath) throws GitLabApiException {
...@@ -44,7 +44,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -44,7 +44,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param description overrides the project description, optional * @param description overrides the project description, optional
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -57,7 +57,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -57,7 +57,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param description overrides the project description, optional * @param description overrides the project description, optional
* @param upload Mao that contains the information to upload the exported project to a web server * @param upload Mao that contains the information to upload the exported project to a web server
* @param uploadUrl the URL to upload the project * @param uploadUrl the URL to upload the project
...@@ -81,7 +81,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -81,7 +81,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return an ExportStatus instance holding information on the export status * @return an ExportStatus instance holding information on the export status
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -95,7 +95,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -95,7 +95,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param directory the File instance of the directory to save the export file to, if null will use "java.io.tmpdir" * @param directory the File instance of the directory to save the export file to, if null will use "java.io.tmpdir"
* @return a File instance pointing to the download of the project export file * @return a File instance pointing to the download of the project export file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -109,7 +109,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -109,7 +109,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre>
* *
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param directory the File instance of the directory to save the export file to, if null will use "java.io.tmpdir" * @param directory the File instance of the directory to save the export file to, if null will use "java.io.tmpdir"
* @param filename Name to give to the downloaded file. If null then we try to get from Content-Disposition header * @param filename Name to give to the downloaded file. If null then we try to get from Content-Disposition header
* or to compute one from parameters * or to compute one from parameters
...@@ -251,7 +251,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -251,7 +251,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/import</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/import</code></pre>
* *
* @param projectIdOrPath the new (imported) project identifier in the form of an Integer(ID), String(path), or Project instance * @param projectIdOrPath the new (imported) project identifier in the form of an Long(ID), String(path), or Project instance
* @return an ImportStatus instance holding information on the import status * @return an ImportStatus instance holding information on the import status
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment