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
...@@ -201,7 +201,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -201,7 +201,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a single job for the specified project ID * @return a single job for the specified project ID
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Job getJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job getJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId); Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId);
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
} }
...@@ -215,7 +215,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -215,7 +215,7 @@ public class JobApi extends AbstractApi implements Constants {
* @param jobId the job ID to get * @param jobId the job ID to get
* @return a single job for the specified project ID as an Optional intance * @return a single job for the specified project ID as an Optional intance
*/ */
public Optional<Job> getOptionalJob(Object projectIdOrPath, Integer jobId) { public Optional<Job> getOptionalJob(Object projectIdOrPath, Long jobId) {
try { try {
return (Optional.ofNullable(getJob(projectIdOrPath, jobId))); return (Optional.ofNullable(getJob(projectIdOrPath, jobId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -293,7 +293,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -293,7 +293,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a File instance pointing to the download of the specified job artifacts file * @return a File instance pointing to the download of the specified job artifacts file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, File directory) throws GitLabApiException { public File downloadArtifactsFile(Object projectIdOrPath, Long jobId, File directory) throws GitLabApiException {
Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD, Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
...@@ -324,7 +324,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -324,7 +324,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return an InputStream to read the specified job artifacts file * @return an InputStream to read the specified job artifacts file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public InputStream downloadArtifactsFile(Object projectIdOrPath, Long jobId) throws GitLabApiException {
Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD, Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
return (response.readEntity(InputStream.class)); return (response.readEntity(InputStream.class));
...@@ -344,7 +344,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -344,7 +344,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a File instance pointing to the download of the specified artifacts file * @return a File instance pointing to the download of the specified artifacts file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException { public File downloadArtifactsFile(Object projectIdOrPath, Long jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename()); "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename());
...@@ -378,7 +378,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -378,7 +378,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return an InputStream to read the specified artifacts file from * @return an InputStream to read the specified artifacts file from
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile) throws GitLabApiException { public InputStream downloadArtifactsFile(Object projectIdOrPath, Long jobId, ArtifactsFile artifactsFile) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename()); "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename());
return (response.readEntity(InputStream.class)); return (response.readEntity(InputStream.class));
...@@ -398,7 +398,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -398,7 +398,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a File instance pointing to the download of the specified artifacts file * @return a File instance pointing to the download of the specified artifacts file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public File downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath, File directory) throws GitLabApiException { public File downloadSingleArtifactsFile(Object projectIdOrPath, Long jobId, Path artifactPath, File directory) throws GitLabApiException {
String path = artifactPath.toString().replace("\\", "/"); String path = artifactPath.toString().replace("\\", "/");
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
...@@ -433,7 +433,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -433,7 +433,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return an InputStream to read the specified artifacts file from * @return an InputStream to read the specified artifacts file from
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException { public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Long jobId, Path artifactPath) throws GitLabApiException {
String path = artifactPath.toString().replace("\\", "/"); String path = artifactPath.toString().replace("\\", "/");
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", path); "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", path);
...@@ -451,7 +451,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -451,7 +451,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a String containing the specified job's trace * @return a String containing the specified job's trace
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public String getTrace(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public String getTrace(Object projectIdOrPath, Long jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "trace"); "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "trace");
return (response.readEntity(String.class)); return (response.readEntity(String.class));
...@@ -469,7 +469,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -469,7 +469,7 @@ public class JobApi extends AbstractApi implements Constants {
* @deprecated replaced by {@link #cancelJob(Object, Integer)} * @deprecated replaced by {@link #cancelJob(Object, Integer)}
*/ */
@Deprecated @Deprecated
public Job cancleJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job cancleJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
return (cancelJob(projectIdOrPath, jobId)); return (cancelJob(projectIdOrPath, jobId));
} }
...@@ -483,7 +483,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -483,7 +483,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just canceled * @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Job cancelJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job cancelJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null; GitLabApiForm formData = null;
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "cancel"); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "cancel");
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
...@@ -499,7 +499,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -499,7 +499,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just retried * @return job instance which just retried
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Job retryJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job retryJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null; GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "retry"); Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "retry");
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
...@@ -515,7 +515,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -515,7 +515,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just erased * @return job instance which just erased
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Job eraseJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job eraseJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null; GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "erase"); Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "erase");
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
...@@ -531,7 +531,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -531,7 +531,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just played * @return job instance which just played
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Job playJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job playJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null; GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play"); Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play");
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
...@@ -547,7 +547,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -547,7 +547,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return the Job instance that was just modified * @return the Job instance that was just modified
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Job keepArtifacts(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job keepArtifacts(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null; GitLabApiForm formData = null;
Response response = post(Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "keep"); Response response = post(Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "keep");
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
...@@ -562,7 +562,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -562,7 +562,7 @@ public class JobApi extends AbstractApi implements Constants {
* @param jobId the ID to delete artifacts for * @param jobId the ID to delete artifacts for
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public void deleteArtifacts(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public void deleteArtifacts(Object projectIdOrPath, Long jobId) throws GitLabApiException {
delete(Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); delete(Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
} }
} }
...@@ -24,7 +24,7 @@ public class LabelsApi extends AbstractApi { ...@@ -24,7 +24,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get all labels of the specified project. * Get all labels of the specified project.
* *
* @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 labels * @return a list of project's labels
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -35,7 +35,7 @@ public class LabelsApi extends AbstractApi { ...@@ -35,7 +35,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a Pager of all labels of the specified project. * Get a Pager of all labels of the specified project.
* *
* @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 list of project's labels in the specified range * @return a list of project's labels in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -48,7 +48,7 @@ public class LabelsApi extends AbstractApi { ...@@ -48,7 +48,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a Stream of all labels of the specified project. * Get a Stream of all labels of the specified project.
* *
* @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 labels * @return a Stream of project's labels
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -59,8 +59,8 @@ public class LabelsApi extends AbstractApi { ...@@ -59,8 +59,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a single project label. * Get a single project label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Label instance holding the information for the group label * @return a Label instance holding the information for the group label
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -73,8 +73,8 @@ public class LabelsApi extends AbstractApi { ...@@ -73,8 +73,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a single project label as the value of an Optional. * Get a single project label as the value of an Optional.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Optional instance with a Label instance as its value * @return a Optional instance with a Label instance as its value
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -101,7 +101,7 @@ public class LabelsApi extends AbstractApi { ...@@ -101,7 +101,7 @@ public class LabelsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /groups/:id/labels</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/labels</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 labelProperties a Label instance holding the properties for the new group label * @param labelProperties a Label instance holding the properties for the new group label
* @return the created Label instance * @return the created Label instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -126,8 +126,8 @@ public class LabelsApi extends AbstractApi { ...@@ -126,8 +126,8 @@ public class LabelsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/labels/:label_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/labels/:label_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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @param labelConfig a Label instance holding the label properties to update * @param labelConfig a Label instance holding the label properties to update
* @return the updated Label instance * @return the updated Label instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -142,8 +142,8 @@ public class LabelsApi extends AbstractApi { ...@@ -142,8 +142,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Delete the specified project label. * Delete the specified project label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException { public void deleteProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException {
...@@ -153,8 +153,8 @@ public class LabelsApi extends AbstractApi { ...@@ -153,8 +153,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Subscribe a specified project label. * Subscribe a specified project label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503 * @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -167,8 +167,8 @@ public class LabelsApi extends AbstractApi { ...@@ -167,8 +167,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Unsubscribe a specified project label. * Unsubscribe a specified project label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503 * @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -181,7 +181,7 @@ public class LabelsApi extends AbstractApi { ...@@ -181,7 +181,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get all labels of the specified group. * Get all labels of the specified group.
* *
* @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 group's labels * @return a list of group's labels
* @throws org.gitlab4j.api.GitLabApiException if any exception occurs * @throws org.gitlab4j.api.GitLabApiException if any exception occurs
*/ */
...@@ -192,7 +192,7 @@ public class LabelsApi extends AbstractApi { ...@@ -192,7 +192,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a Pager of all labels of the specified group. * Get a Pager of all labels of the specified group.
* *
* @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 itemsPerPage the number of items per page * @param itemsPerPage the number of items per page
* @return a list of group's labels in the specified range * @return a list of group's labels in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -205,7 +205,7 @@ public class LabelsApi extends AbstractApi { ...@@ -205,7 +205,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a Stream of all labels of the specified group. * Get a Stream of all labels of the specified group.
* *
* @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 Stream of group's labels * @return a Stream of group's labels
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -216,8 +216,8 @@ public class LabelsApi extends AbstractApi { ...@@ -216,8 +216,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a single group label. * Get a single group label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Label instance holding the information for the group label * @return a Label instance holding the information for the group label
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -230,8 +230,8 @@ public class LabelsApi extends AbstractApi { ...@@ -230,8 +230,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a single group label as the value of an Optional. * Get a single group label as the value of an Optional.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Optional instance with a Label instance as its value * @return a Optional instance with a Label instance as its value
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -256,7 +256,7 @@ public class LabelsApi extends AbstractApi { ...@@ -256,7 +256,7 @@ public class LabelsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /groups/:id/labels</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/labels</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 labelProperties a Label instance holding the properties for the new group label * @param labelProperties a Label instance holding the properties for the new group label
* @return the created Label instance * @return the created Label instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -281,8 +281,8 @@ public class LabelsApi extends AbstractApi { ...@@ -281,8 +281,8 @@ public class LabelsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /groups/:id/labels/:label_id</code></pre> * <pre><code>GitLab Endpoint: PUT /groups/:id/labels/:label_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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @param labelConfig a Label instance holding the label properties to update * @param labelConfig a Label instance holding the label properties to update
* @return the updated Label instance * @return the updated Label instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -297,8 +297,8 @@ public class LabelsApi extends AbstractApi { ...@@ -297,8 +297,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Delete the specified label * Delete the specified label
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException { public void deleteGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException {
...@@ -308,8 +308,8 @@ public class LabelsApi extends AbstractApi { ...@@ -308,8 +308,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Subscribe a specified group label. * Subscribe a specified group label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503 * @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -322,8 +322,8 @@ public class LabelsApi extends AbstractApi { ...@@ -322,8 +322,8 @@ public class LabelsApi extends AbstractApi {
/** /**
* Unsubscribe a specified group label. * Unsubscribe a specified group label.
* *
* @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 labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503 * @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -337,7 +337,7 @@ public class LabelsApi extends AbstractApi { ...@@ -337,7 +337,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get all labels of the specified project. * Get all labels of the specified project.
* *
* @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 labels * @return a list of project's labels
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #getProjectLabels(Object)} method. * @deprecated Replaced by the {@link #getProjectLabels(Object)} method.
...@@ -350,7 +350,7 @@ public class LabelsApi extends AbstractApi { ...@@ -350,7 +350,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get all labels of the specified project to using the specified page and per page setting * Get all labels of the specified project to using the specified page and per page setting
* *
* @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 labels in the specified range * @return a list of project's labels in the specified range
...@@ -367,7 +367,7 @@ public class LabelsApi extends AbstractApi { ...@@ -367,7 +367,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a Pager of all labels of the specified project. * Get a Pager of all labels of the specified project.
* *
* @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 list of project's labels in the specified range * @return a list of project's labels in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -382,7 +382,7 @@ public class LabelsApi extends AbstractApi { ...@@ -382,7 +382,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Get a Stream of all labels of the specified project. * Get a Stream of all labels of the specified project.
* *
* @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 labels * @return a Stream of project's labels
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #getProjectLabelsStream(Object)} method. * @deprecated Replaced by the {@link #getProjectLabelsStream(Object)} method.
...@@ -395,7 +395,7 @@ public class LabelsApi extends AbstractApi { ...@@ -395,7 +395,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Create a label * Create a label
* *
* @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 label * @param name the name for the label
* @param color the color for the label * @param color the color for the label
* @param description the description for the label * @param description the description for the label
...@@ -411,7 +411,7 @@ public class LabelsApi extends AbstractApi { ...@@ -411,7 +411,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Create a label * Create a label
* *
* @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 label * @param name the name for the label
* @param color the color for the label * @param color the color for the label
* @return the created Label instance * @return the created Label instance
...@@ -426,7 +426,7 @@ public class LabelsApi extends AbstractApi { ...@@ -426,7 +426,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Create a label * Create a label
* *
* @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 label * @param name the name for the label
* @param color the color for the label * @param color the color for the label
* @param priority the priority for the label * @param priority the priority for the label
...@@ -442,7 +442,7 @@ public class LabelsApi extends AbstractApi { ...@@ -442,7 +442,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Create a label * Create a label
* *
* @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 label * @param name the name for the label
* @param color the color for the label * @param color the color for the label
* @param description the description for the label * @param description the description for the label
...@@ -464,7 +464,7 @@ public class LabelsApi extends AbstractApi { ...@@ -464,7 +464,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Update the specified label * Update the specified label
* *
* @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 label * @param name the name for the label
* @param newName the new name for the label * @param newName the new name for the label
* @param description the description for the label * @param description the description for the label
...@@ -481,7 +481,7 @@ public class LabelsApi extends AbstractApi { ...@@ -481,7 +481,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Update the specified label * Update the specified label
* *
* @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 label * @param name the name for the label
* @param color the color for the label * @param color the color for the label
* @param description the description for the label * @param description the description for the label
...@@ -498,7 +498,7 @@ public class LabelsApi extends AbstractApi { ...@@ -498,7 +498,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Update the specified label * Update the specified label
* *
* @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 label * @param name the name for the label
* @param newName the new name for the label * @param newName the new name for the label
* @param color the color for the label * @param color the color for the label
...@@ -524,7 +524,7 @@ public class LabelsApi extends AbstractApi { ...@@ -524,7 +524,7 @@ public class LabelsApi extends AbstractApi {
/** /**
* Delete the specified label * Delete the specified label
* *
* @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 label * @param name the name for the label
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #deleteProjectLabel(Object, Object)} method. * @deprecated Replaced by the {@link #deleteProjectLabel(Object, Object)} method.
...@@ -538,28 +538,28 @@ public class LabelsApi extends AbstractApi { ...@@ -538,28 +538,28 @@ public class LabelsApi extends AbstractApi {
/** /**
* Subscribe a specified label * Subscribe a specified label
* *
* @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 labelId the label ID * @param labelId the label ID
* @return HttpStatusCode 503 * @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #subscribeProjectLabel(Object, Object)} method. * @deprecated Replaced by the {@link #subscribeProjectLabel(Object, Object)} method.
*/ */
@Deprecated @Deprecated
public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException { public Label subscribeLabel(Object projectIdOrPath, Long labelId) throws GitLabApiException {
return (subscribeProjectLabel(projectIdOrPath, labelId)); return (subscribeProjectLabel(projectIdOrPath, labelId));
} }
/** /**
* Unsubscribe a specified label * Unsubscribe a specified label
* *
* @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 labelId the label ID * @param labelId the label ID
* @return HttpStatusCode 503 * @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #unsubscribeProjectLabel(Object, Object)} method. * @deprecated Replaced by the {@link #unsubscribeProjectLabel(Object, Object)} method.
*/ */
@Deprecated @Deprecated
public Label unsubscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException { public Label unsubscribeLabel(Object projectIdOrPath, Long labelId) throws GitLabApiException {
return (unsubscribeProjectLabel(projectIdOrPath, labelId)); return (unsubscribeProjectLabel(projectIdOrPath, labelId));
} }
} }
...@@ -20,7 +20,7 @@ public class LicenseApi extends AbstractApi { ...@@ -20,7 +20,7 @@ public class LicenseApi extends AbstractApi {
/** /**
* Retrieve information about the current license. * Retrieve information about the current license.
* *
* <pre><code>GitLab Endpoint: GET /license</code></pre> * <pre><code>GitLab Endpoint: GET /license</code></pre>
* *
* @return a License instance holding info about the current license * @return a License instance holding info about the current license
...@@ -108,7 +108,7 @@ public class LicenseApi extends AbstractApi { ...@@ -108,7 +108,7 @@ public class LicenseApi extends AbstractApi {
* @return a License instance for the delete license * @return a License instance for the delete license
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public License deleteLicense(Integer licenseId) throws GitLabApiException { public License deleteLicense(Long licenseId) throws GitLabApiException {
Response response = delete(Response.Status.OK, null, "license", licenseId); Response response = delete(Response.Status.OK, null, "license", licenseId);
return (response.readEntity(License.class)); return (response.readEntity(License.class));
} }
......
...@@ -13,7 +13,7 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -13,7 +13,7 @@ public class NotificationSettingsApi extends AbstractApi {
/** /**
* Get the global notification settings. * Get the global notification settings.
* *
* <pre><code>GitLab Endpoint: GET /notification_settings</code></pre> * <pre><code>GitLab Endpoint: GET /notification_settings</code></pre>
* *
* @return a NotificationSettings instance containing the global notification settings * @return a NotificationSettings instance containing the global notification settings
...@@ -26,7 +26,7 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -26,7 +26,7 @@ public class NotificationSettingsApi extends AbstractApi {
/** /**
* Update the global notification settings. * Update the global notification settings.
* *
* <pre><code>GitLab Endpoint: PUT /notification_settings</code></pre> * <pre><code>GitLab Endpoint: PUT /notification_settings</code></pre>
* *
* @param settings a NotificationSettings instance with the new settings * @param settings a NotificationSettings instance with the new settings
...@@ -37,7 +37,7 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -37,7 +37,7 @@ public class NotificationSettingsApi extends AbstractApi {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel()) .withParam("level", settings.getLevel())
.withParam("email", settings.getEmail()); .withParam("email", settings.getEmail());
Events events = settings.getEvents(); Events events = settings.getEvents();
if (events != null) { if (events != null) {
...@@ -61,21 +61,21 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -61,21 +61,21 @@ public class NotificationSettingsApi extends AbstractApi {
/** /**
* Get the notification settings for a group. * Get the notification settings for a group.
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/notification_settings</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/notification_settings</code></pre>
* *
* @param groupId the group ID to get the notification settings for * @param groupId the group ID to get the notification settings for
* @return a NotificationSettings instance containing the specified group's notification settings * @return a NotificationSettings instance containing the specified group's notification settings
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public NotificationSettings getGroupNotificationSettings(int groupId) throws GitLabApiException { public NotificationSettings getGroupNotificationSettings(long groupId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", groupId, "notification_settings"); Response response = get(Response.Status.OK, null, "groups", groupId, "notification_settings");
return (response.readEntity(NotificationSettings.class)); return (response.readEntity(NotificationSettings.class));
} }
/** /**
* Update the notification settings for a group * Update the notification settings for a group
* *
* <pre><code>GitLab Endpoint: PUT /groups/:id/notification_settings</code></pre> * <pre><code>GitLab Endpoint: PUT /groups/:id/notification_settings</code></pre>
* *
* @param groupId the group ID to update the notification settings for * @param groupId the group ID to update the notification settings for
...@@ -83,11 +83,11 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -83,11 +83,11 @@ public class NotificationSettingsApi extends AbstractApi {
* @return a NotificationSettings instance containing the updated group notification settings * @return a NotificationSettings instance containing the updated group notification settings
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public NotificationSettings updateGroupNotificationSettings(int groupId, NotificationSettings settings) throws GitLabApiException { public NotificationSettings updateGroupNotificationSettings(long groupId, NotificationSettings settings) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel()) .withParam("level", settings.getLevel())
.withParam("email", settings.getEmail()); .withParam("email", settings.getEmail());
Events events = settings.getEvents(); Events events = settings.getEvents();
if (events != null) { if (events != null) {
...@@ -111,21 +111,21 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -111,21 +111,21 @@ public class NotificationSettingsApi extends AbstractApi {
/** /**
* Get the notification settings for a project. * Get the notification settings for a project.
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/notification_settings</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/notification_settings</code></pre>
* *
* @param projectId the project ID to get the notification settings for * @param projectId the project ID to get the notification settings for
* @return a NotificationSettings instance containing the specified project's notification settings * @return a NotificationSettings instance containing the specified project's notification settings
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public NotificationSettings getProjectNotificationSettings(int projectId) throws GitLabApiException { public NotificationSettings getProjectNotificationSettings(long projectId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", projectId, "notification_settings"); Response response = get(Response.Status.OK, null, "projects", projectId, "notification_settings");
return (response.readEntity(NotificationSettings.class)); return (response.readEntity(NotificationSettings.class));
} }
/** /**
* Update the notification settings for a project * Update the notification settings for a project
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/notification_settings</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/notification_settings</code></pre>
* *
* @param projectId the project ID to update the notification settings for * @param projectId the project ID to update the notification settings for
...@@ -137,7 +137,7 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -137,7 +137,7 @@ public class NotificationSettingsApi extends AbstractApi {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel()) .withParam("level", settings.getLevel())
.withParam("email", settings.getEmail()); .withParam("email", settings.getEmail());
Events events = settings.getEvents(); Events events = settings.getEvents();
if (events != null) { if (events != null) {
......
...@@ -136,7 +136,7 @@ public class ReleasesApi extends AbstractApi { ...@@ -136,7 +136,7 @@ public class ReleasesApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/releases/:tag_name</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/releases/: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 tagName the tag name that the release was created from * @param tagName the tag name that the release was created from
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
......
package org.gitlab4j.api; package org.gitlab4j.api;
import org.gitlab4j.api.models.IssueEvent;
import org.gitlab4j.api.models.LabelEvent;
import javax.ws.rs.core.Response;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.gitlab4j.api.models.IssueEvent;
/** /**
* This class provides an entry point to all the GitLab Resource state events API * This class provides an entry point to all the GitLab Resource state events API
...@@ -29,7 +26,7 @@ public class ResourceStateEventsApi extends AbstractApi { ...@@ -29,7 +26,7 @@ public class ResourceStateEventsApi extends AbstractApi {
* @return a List of IssueEvent for the specified issue * @return a List of IssueEvent for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).all()); return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).all());
} }
...@@ -44,7 +41,7 @@ public class ResourceStateEventsApi extends AbstractApi { ...@@ -44,7 +41,7 @@ public class ResourceStateEventsApi extends AbstractApi {
* @return the Pager of IssueEvent instances for the specified issue IID * @return the Pager of IssueEvent instances for the specified issue IID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { public Pager<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<IssueEvent>(this, IssueEvent.class, itemsPerPage, null, return (new Pager<IssueEvent>(this, IssueEvent.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_state_events")); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_state_events"));
} }
...@@ -59,7 +56,7 @@ public class ResourceStateEventsApi extends AbstractApi { ...@@ -59,7 +56,7 @@ public class ResourceStateEventsApi extends AbstractApi {
* @return a Stream of IssueEvent for the specified issue * @return a Stream of IssueEvent for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<IssueEvent> getIssueStateEventsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public Stream<IssueEvent> getIssueStateEventsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
} }
} }
...@@ -31,7 +31,7 @@ public class SystemHooksApi extends AbstractApi { ...@@ -31,7 +31,7 @@ public class SystemHooksApi extends AbstractApi {
} }
/** /**
* Get a list of all system hooks using the specified page and per page settings. * Get a list of all system hooks using the specified page and per page settings.
* This method requires admin access. * This method requires admin access.
* *
* <pre><code>GitLab Endpoint: GET /hooks</code></pre> * <pre><code>GitLab Endpoint: GET /hooks</code></pre>
...@@ -148,7 +148,7 @@ public class SystemHooksApi extends AbstractApi { ...@@ -148,7 +148,7 @@ public class SystemHooksApi extends AbstractApi {
* @param hookId the ID of the system hook to delete * @param hookId the ID of the system hook to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void deleteSystemHook(Integer hookId) throws GitLabApiException { public void deleteSystemHook(Long hookId) throws GitLabApiException {
if (hookId == null) { if (hookId == null) {
throw new RuntimeException("hookId cannot be null"); throw new RuntimeException("hookId cannot be null");
...@@ -183,7 +183,7 @@ public class SystemHooksApi extends AbstractApi { ...@@ -183,7 +183,7 @@ public class SystemHooksApi extends AbstractApi {
* @param hookId the ID of the system hook to test * @param hookId the ID of the system hook to test
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void testSystemHook(Integer hookId) throws GitLabApiException { public void testSystemHook(Long hookId) throws GitLabApiException {
if (hookId == null) { if (hookId == null) {
throw new RuntimeException("hookId cannot be null"); throw new RuntimeException("hookId cannot be null");
......
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