Skip to content

Commit 5c82b3e

Browse files
committed
Removed deprecated methods (#429).
1 parent bfce0b4 commit 5c82b3e

File tree

1 file changed

+0
-127
lines changed

1 file changed

+0
-127
lines changed

src/main/java/org/gitlab4j/api/RepositoryApi.java

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.gitlab4j.api.models.Commit;
2020
import org.gitlab4j.api.models.CompareResults;
2121
import org.gitlab4j.api.models.Contributor;
22-
import org.gitlab4j.api.models.Tag;
2322
import org.gitlab4j.api.models.TreeItem;
2423
import org.gitlab4j.api.utils.FileUtils;
2524

@@ -195,132 +194,6 @@ public Branch unprotectBranch(Object projectIdOrPath, String branchName) throws
195194
return (response.readEntity(Branch.class));
196195
}
197196

198-
/**
199-
* Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
200-
*
201-
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
202-
*
203-
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
204-
* @return the list of tags for the specified project ID
205-
* @throws GitLabApiException if any exception occurs
206-
* @deprecated Replaced by TagsApi.getTags(Object)
207-
*/
208-
@Deprecated
209-
public List<Tag> getTags(Object projectIdOrPath) throws GitLabApiException {
210-
Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects",
211-
getProjectIdOrPath(projectIdOrPath), "repository", "tags");
212-
return (response.readEntity(new GenericType<List<Tag>>() {}));
213-
}
214-
215-
/**
216-
* Get a list of repository tags from a project, sorted by name in reverse alphabetical order and in the specified page range.
217-
*
218-
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
219-
*
220-
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
221-
* @param page the page to get
222-
* @param perPage the number of Tag instances per page
223-
* @return the list of tags for the specified project ID
224-
* @throws GitLabApiException if any exception occurs
225-
* @deprecated Replaced by TagsApi.getTags(Object, int, int)
226-
*/
227-
@Deprecated
228-
public List<Tag> getTags(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
229-
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects",
230-
getProjectIdOrPath(projectIdOrPath), "repository", "tags");
231-
return (response.readEntity(new GenericType<List<Tag>>() {}));
232-
}
233-
234-
/**
235-
* Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
236-
*
237-
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
238-
*
239-
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
240-
* @param itemsPerPage the number of Project instances that will be fetched per page
241-
* @return the list of tags for the specified project ID
242-
* @throws GitLabApiException if any exception occurs
243-
* @deprecated Replaced by TagsApi.getTags(Object, int)
244-
*/
245-
@Deprecated
246-
public Pager<Tag> getTags(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
247-
return (new Pager<Tag>(this, Tag.class, itemsPerPage, null, "projects",
248-
getProjectIdOrPath(projectIdOrPath), "repository", "tags"));
249-
}
250-
251-
/**
252-
* Creates a tag on a particular ref of the given project. A message and release notes are optional.
253-
*
254-
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/tags</code></pre>
255-
*
256-
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
257-
* @param tagName The name of the tag Must be unique for the project
258-
* @param ref the git ref to place the tag on
259-
* @param message the message to included with the tag (optional)
260-
* @param releaseNotes the release notes for the tag (optional)
261-
* @return a Tag instance containing info on the newly created tag
262-
* @throws GitLabApiException if any exception occurs
263-
* @deprecated Replaced by TagsApi.createTag(Object, String, String, String, String)
264-
*/
265-
public Tag createTag(Object projectIdOrPath, String tagName, String ref, String message, String releaseNotes) throws GitLabApiException {
266-
267-
Form formData = new GitLabApiForm()
268-
.withParam("tag_name", tagName, true)
269-
.withParam("ref", ref, true)
270-
.withParam("message", message, false)
271-
.withParam("release_description", releaseNotes, false);
272-
Response response = post(Response.Status.CREATED, formData.asMap(), "projects",
273-
getProjectIdOrPath(projectIdOrPath), "repository", "tags");
274-
return (response.readEntity(Tag.class));
275-
}
276-
277-
/**
278-
* Creates a tag on a particular ref of a given project. A message and a File instance containing the
279-
* release notes are optional. This method is the same as {@link #createTag(Object, String, String, String, String)},
280-
* but instead allows the release notes to be supplied in a file.
281-
*
282-
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/tags</code></pre>
283-
*
284-
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
285-
* @param tagName the name of the tag, must be unique for the project
286-
* @param ref the git ref to place the tag on
287-
* @param message the message to included with the tag (optional)
288-
* @param releaseNotesFile a whose contents are the release notes (optional)
289-
* @return a Tag instance containing info on the newly created tag
290-
* @throws GitLabApiException if any exception occurs
291-
* @deprecated Replaced by TagsApi.CreateTag(Object, String, String, String, File)
292-
*/
293-
public Tag createTag(Object projectIdOrPath, String tagName, String ref, String message, File releaseNotesFile) throws GitLabApiException {
294-
295-
String releaseNotes;
296-
if (releaseNotesFile != null) {
297-
try {
298-
releaseNotes = FileUtils.readFileContents(releaseNotesFile);
299-
} catch (IOException ioe) {
300-
throw (new GitLabApiException(ioe));
301-
}
302-
} else {
303-
releaseNotes = null;
304-
}
305-
306-
return (createTag(projectIdOrPath, tagName, ref, message, releaseNotes));
307-
}
308-
309-
/**
310-
* Deletes the tag from a project with the specified tag name.
311-
*
312-
* <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/tags/:tag_name</code></pre>
313-
*
314-
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
315-
* @param tagName The name of the tag to delete
316-
* @throws GitLabApiException if any exception occurs
317-
* @deprecated Replaced by TagsApi.deleteTag(Object, String)
318-
*/
319-
public void deleteTag(Object projectIdOrPath, String tagName) throws GitLabApiException {
320-
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
321-
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags", tagName);
322-
}
323-
324197
/**
325198
* Get a list of repository files and directories in a project.
326199
*

0 commit comments

Comments
 (0)