Commit 315693f2 authored by Greg Messner's avatar Greg Messner
Browse files

Final Javadoc clean-up.

parent 3fc7ad59
...@@ -14,7 +14,7 @@ import java.util.List; ...@@ -14,7 +14,7 @@ import java.util.List;
*/ */
public class GroupApi extends AbstractApi { public class GroupApi extends AbstractApi {
GroupApi(GitLabApi gitLabApi) { public GroupApi(GitLabApi gitLabApi) {
super(gitLabApi); super(gitLabApi);
} }
...@@ -24,7 +24,7 @@ public class GroupApi extends AbstractApi { ...@@ -24,7 +24,7 @@ public class GroupApi extends AbstractApi {
* GET /groups * GET /groups
* *
* @return the list of groups viewable by the authenticated user * @return the list of groups viewable by the authenticated user
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public List<Group> getGroups() throws GitLabApiException { public List<Group> getGroups() throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups"); Response response = get(Response.Status.OK, null, "groups");
...@@ -37,9 +37,9 @@ public class GroupApi extends AbstractApi { ...@@ -37,9 +37,9 @@ public class GroupApi extends AbstractApi {
* *
* GET /groups/:id * GET /groups/:id
* *
* @param groupId * @param groupId the group ID to get
* @return the Group instance for the specified group ID * @return the Group instance for the specified group ID
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public Group getGroup(int groupId) throws GitLabApiException { public Group getGroup(int groupId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", groupId); Response response = get(Response.Status.OK, null, "groups", groupId);
...@@ -51,8 +51,9 @@ public class GroupApi extends AbstractApi { ...@@ -51,8 +51,9 @@ public class GroupApi extends AbstractApi {
* *
* POST /groups * POST /groups
* *
* @param name * @param name the name of the group to add
* @param path * @param path the path for the group
* @throws GitLabApiException if any exception occurs
*/ */
public void addGroup(String name, String path) throws GitLabApiException { public void addGroup(String name, String path) throws GitLabApiException {
...@@ -67,8 +68,8 @@ public class GroupApi extends AbstractApi { ...@@ -67,8 +68,8 @@ public class GroupApi extends AbstractApi {
* *
* DELETE /groups/:id * DELETE /groups/:id
* *
* @param groupId * @param groupId the group ID to delete
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteGroup(Integer groupId) throws GitLabApiException { public void deleteGroup(Integer groupId) throws GitLabApiException {
...@@ -84,8 +85,8 @@ public class GroupApi extends AbstractApi { ...@@ -84,8 +85,8 @@ public class GroupApi extends AbstractApi {
* *
* DELETE /groups/:id * DELETE /groups/:id
* *
* @param group * @param group the Group instance to delete
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteGroup(Group group) throws GitLabApiException { public void deleteGroup(Group group) throws GitLabApiException {
deleteGroup(group.getId()); deleteGroup(group.getId());
...@@ -96,8 +97,9 @@ public class GroupApi extends AbstractApi { ...@@ -96,8 +97,9 @@ public class GroupApi extends AbstractApi {
* *
* GET /groups/:id/members * GET /groups/:id/members
* *
* @param groupId the group ID to list the members for
* @return a list of group members viewable by the authenticated user * @return a list of group members viewable by the authenticated user
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public List<Member> getMembers(int groupId) throws GitLabApiException { public List<Member> getMembers(int groupId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", groupId, "members"); Response response = get(Response.Status.OK, null, "groups", groupId, "members");
...@@ -110,11 +112,11 @@ public class GroupApi extends AbstractApi { ...@@ -110,11 +112,11 @@ public class GroupApi extends AbstractApi {
* *
* POST /groups/:id/members * POST /groups/:id/members
* *
* @param groupId * @param groupId the project ID to add the member to
* @param userId * @param userId the user ID of the member to add
* @param accessLevel * @param accessLevel the access level for the new member
* @return a Member instance for the added user * @return a Member instance for the added user
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public Member addMember(Integer groupId, Integer userId, Integer accessLevel) throws GitLabApiException { public Member addMember(Integer groupId, Integer userId, Integer accessLevel) throws GitLabApiException {
...@@ -130,9 +132,9 @@ public class GroupApi extends AbstractApi { ...@@ -130,9 +132,9 @@ public class GroupApi extends AbstractApi {
* *
* DELETE /groups/:id/members/:user_id * DELETE /groups/:id/members/:user_id
* *
* @param projectId * @param projectId the project ID to remove the member from
* @param userId * @param userId the user ID of the member to remove
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void removeMember(Integer projectId, Integer userId) throws GitLabApiException { public void removeMember(Integer projectId, Integer userId) throws GitLabApiException {
delete(Response.Status.OK, null, "groups", projectId, "members", userId); delete(Response.Status.OK, null, "groups", projectId, "members", userId);
......
...@@ -53,6 +53,7 @@ public class ISO8601 { ...@@ -53,6 +53,7 @@ public class ISO8601 {
/** /**
* Get a ISO8601formatted string for the current date and time. * Get a ISO8601formatted string for the current date and time.
* *
* @param withMsec flag indicating whether to include milliseconds
* @return a ISO8601 formatted string for the current date and time * @return a ISO8601 formatted string for the current date and time
*/ */
public static String getTimestamp(boolean withMsec) { public static String getTimestamp(boolean withMsec) {
......
...@@ -86,12 +86,13 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol ...@@ -86,12 +86,13 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol
/** /**
* Unmarshal the JSON data on the specified Reader instance to an instance of the provided class. * Unmarshal the JSON data on the specified Reader instance to an instance of the provided class.
* *
* @param <T> the generics type for the return value
* @param returnType an instance of this type class will be returned * @param returnType an instance of this type class will be returned
* @param reader the Reader instance that contains the JSON data * @param reader the Reader instance that contains the JSON data
* @return an instance of the provided class containing the parsed data from the Reader * @return an instance of the provided class containing the parsed data from the Reader
* @throws JsonParseException when an error occurs paresing the provided JSON * @throws JsonParseException when an error occurs paresing the provided JSON
* @throws JsonMappingException * @throws JsonMappingException if a JSON error occurs
* @throws IOException * @throws IOException if an error occurs reading the JSON data
*/ */
public <T> T unmarshal(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException { public <T> T unmarshal(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(returnType); ObjectMapper objectMapper = getContext(returnType);
...@@ -101,12 +102,13 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol ...@@ -101,12 +102,13 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol
/** /**
* Unmarshal the JSON data contained by the string and populate an instance of the provided returnType class. * Unmarshal the JSON data contained by the string and populate an instance of the provided returnType class.
* *
* @param <T> the generics type for the return value
* @param returnType an instance of this type class will be returned * @param returnType an instance of this type class will be returned
* @param postData * @param postData a String holding the POST data
* @return an instance of the provided class containing the parsed data from the string * @return an instance of the provided class containing the parsed data from the string
* @throws JsonParseException when an error occurs paresing the provided JSON * @throws JsonParseException when an error occurs paresing the provided JSON
* @throws JsonMappingException * @throws JsonMappingException if a JSON error occurs
* @throws IOException * @throws IOException if an error occurs reading the JSON data
*/ */
public <T> T unmarshal(Class<T> returnType, String postData) throws JsonParseException, JsonMappingException, IOException { public <T> T unmarshal(Class<T> returnType, String postData) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(returnType); ObjectMapper objectMapper = getContext(returnType);
...@@ -116,6 +118,7 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol ...@@ -116,6 +118,7 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol
/** /**
* Marshals the supplied object out as a formatted JSON string. * Marshals the supplied object out as a formatted JSON string.
* *
* @param <T> the generics type for the provided object
* @param object the object to output as a JSON string * @param object the object to output as a JSON string
* @return a String containing the JSON for the specified object * @return a String containing the JSON for the specified object
*/ */
......
...@@ -24,7 +24,7 @@ public class MergeRequestApi extends AbstractApi { ...@@ -24,7 +24,7 @@ public class MergeRequestApi extends AbstractApi {
* *
* @param projectId the project ID to get the merge requests for * @param projectId the project ID to get the merge requests for
* @return all merge requests for the specified project * @return all merge requests for the specified project
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public List<MergeRequest> getMergeRequests(Integer projectId) throws GitLabApiException { public List<MergeRequest> getMergeRequests(Integer projectId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", projectId, "merge_requests"); Response response = get(Response.Status.OK, null, "projects", projectId, "merge_requests");
...@@ -37,10 +37,10 @@ public class MergeRequestApi extends AbstractApi { ...@@ -37,10 +37,10 @@ public class MergeRequestApi extends AbstractApi {
* *
* GET /projects/:id/merge_request/:merge_request_id * GET /projects/:id/merge_request/:merge_request_id
* *
* @param projectId * @param projectId the project ID of the merge request
* @param mergeRequestId * @param mergeRequestId the ID of the merge request
* @return the specified MergeRequest instance * @return the specified MergeRequest instance
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public MergeRequest getMergeRequest(Integer projectId, Integer mergeRequestId) throws GitLabApiException { public MergeRequest getMergeRequest(Integer projectId, Integer mergeRequestId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", projectId, "merge_request", mergeRequestId); Response response = get(Response.Status.OK, null, "projects", projectId, "merge_request", mergeRequestId);
...@@ -59,7 +59,7 @@ public class MergeRequestApi extends AbstractApi { ...@@ -59,7 +59,7 @@ public class MergeRequestApi extends AbstractApi {
* @param description the description of the merge request * @param description the description of the merge request
* @param assigneeId the Assignee user ID, optional * @param assigneeId the Assignee user ID, optional
* @return the created MergeRequest instance * @return the created MergeRequest instance
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public MergeRequest createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId) public MergeRequest createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId)
throws GitLabApiException { throws GitLabApiException {
...@@ -84,15 +84,15 @@ public class MergeRequestApi extends AbstractApi { ...@@ -84,15 +84,15 @@ public class MergeRequestApi extends AbstractApi {
* *
* PUT /projects/:id/merge_request/:merge_request_id * PUT /projects/:id/merge_request/:merge_request_id
* *
* @param projectId * @param projectId the ID of a project
* @param mergeRequestId * @param mergeRequestId the ID of the merge request to update
* @param sourceBranch * @param sourceBranch the source branch
* @param targetBranch * @param targetBranch the target branch
* @param title * @param title the title for the merge request
* @param description * @param description the description of the merge request
* @param assigneeId * @param assigneeId the Assignee user ID, optional
* @return the updated merge request * @return the updated merge request
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public MergeRequest updateMergeRequest(Integer projectId, Integer mergeRequestId, String sourceBranch, String targetBranch, String title, String description, public MergeRequest updateMergeRequest(Integer projectId, Integer mergeRequestId, String sourceBranch, String targetBranch, String title, String description,
Integer assigneeId) throws GitLabApiException { Integer assigneeId) throws GitLabApiException {
...@@ -115,25 +115,4 @@ public class MergeRequestApi extends AbstractApi { ...@@ -115,25 +115,4 @@ public class MergeRequestApi extends AbstractApi {
Response response = put(Response.Status.OK, formData.asMap(), "projects", projectId, "merge_request", mergeRequestId); Response response = put(Response.Status.OK, formData.asMap(), "projects", projectId, "merge_request", mergeRequestId);
return (response.readEntity(MergeRequest.class)); return (response.readEntity(MergeRequest.class));
} }
/**
* Adds a comment to a merge request.
*
* POST /projects/:id/merge_request/:merge_request_id/comments
*
* @param projectId
* @param mergeRequestId
* @param comments
* @return the added merge request comment
* @throws GitLabApiException
*/
/*
public MergeRequestComment addMergeRequestComment(Integer projectId, Integer mergeRequestId, String comments) throws GitLabApiException {
Form formData = new Form();
formData.param("note", comments);
Response response = post(Response.Status.OK, formData, "projects", projectId, "merge_request", mergeRequestId, "comments");
return (response.readEntity(MergeRequestComment.class));
}
*/
} }
...@@ -299,7 +299,7 @@ public class ProjectApi extends AbstractApi { ...@@ -299,7 +299,7 @@ public class ProjectApi extends AbstractApi {
* *
* @param projectId the project ID to add the team member to * @param projectId the project ID to add the team member to
* @param userId the user ID of the member to add * @param userId the user ID of the member to add
* @param accessLevel * @param accessLevel the access level for the new member
* @return the added member * @return the added member
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
......
...@@ -95,8 +95,8 @@ public class RepositoryApi extends AbstractApi { ...@@ -95,8 +95,8 @@ public class RepositoryApi extends AbstractApi {
* *
* PUT /projects/:id/repository/branches/:branch/protect * PUT /projects/:id/repository/branches/:branch/protect
* *
* @param projectId * @param projectId the ID of the project to protect
* @param branchName * @param branchName the name of the branch to protect
* @return the branch info for the protected branch * @return the branch info for the protected branch
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -111,8 +111,8 @@ public class RepositoryApi extends AbstractApi { ...@@ -111,8 +111,8 @@ public class RepositoryApi extends AbstractApi {
* *
* PUT /projects/:id/repository/branches/:branch/unprotect * PUT /projects/:id/repository/branches/:branch/unprotect
* *
* @param projectId * @param projectId the ID of the project to un-protect
* @param branchName * @param branchName the name of the branch to un-protect
* @return the branch info for the unprotected branch * @return the branch info for the unprotected branch
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -126,7 +126,7 @@ public class RepositoryApi extends AbstractApi { ...@@ -126,7 +126,7 @@ public class RepositoryApi extends AbstractApi {
* *
* GET /projects/:id/repository/tags * GET /projects/:id/repository/tags
* *
* @param projectId * @param projectId the ID of the project to get the tags for
* @return the list of tags for the specified project ID * @return the list of tags for the specified project ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -141,11 +141,11 @@ public class RepositoryApi extends AbstractApi { ...@@ -141,11 +141,11 @@ public class RepositoryApi extends AbstractApi {
* *
* POST /projects/:id/repository/tags * POST /projects/:id/repository/tags
* *
* @param projectId The ID of the project * @param projectId the ID of the project
* @param tagName The name of the tag Must be unique for the project * @param tagName The name of the tag Must be unique for the project
* @param ref The git ref to place the tag on * @param ref the git ref to place the tag on
* @param message The message to included with the tag (optional) * @param message the message to included with the tag (optional)
* @param releaseNotes The release notes for the tag (optional) * @param releaseNotes the release notes for the tag (optional)
* @return a Tag instance containing info on the newly created tag * @return a Tag instance containing info on the newly created tag
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -209,7 +209,7 @@ public class RepositoryApi extends AbstractApi { ...@@ -209,7 +209,7 @@ public class RepositoryApi extends AbstractApi {
* *
* GET /projects/:id/repository/tree * GET /projects/:id/repository/tree
* *
* @param projectId * @param projectId the ID of the project to get the files for
* @return a tree with the root directories and files of a project * @return a tree with the root directories and files of a project
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -223,12 +223,12 @@ public class RepositoryApi extends AbstractApi { ...@@ -223,12 +223,12 @@ public class RepositoryApi extends AbstractApi {
* GET /projects/:id/repository/tree * GET /projects/:id/repository/tree
* *
* id (required) - The ID of a project * id (required) - The ID of a project
* path (optional) - The path inside repository. Used to get contend of subdirectories * path (optional) - The path inside repository. Used to get content of subdirectories
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch * ref_name (optional) - The name of a repository branch or tag or if not given the default branch
* *
* @param projectId * @param projectId the ID of the project to get the files for
* @param filePath * @param filePath the path inside repository, used to get content of subdirectories
* @param refName * @param refName the name of a repository branch or tag or if not given the default branch
* @return a tree with the directories and files of a project * @return a tree with the directories and files of a project
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -246,10 +246,10 @@ public class RepositoryApi extends AbstractApi { ...@@ -246,10 +246,10 @@ public class RepositoryApi extends AbstractApi {
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch * ref_name (optional) - The name of a repository branch or tag or if not given the default branch
* recursive (optional) - Boolean value used to get a recursive tree (false by default) * recursive (optional) - Boolean value used to get a recursive tree (false by default)
* *
* @param projectId * @param projectId the ID of the project to get the files for
* @param filePath * @param filePath the path inside repository, used to get content of subdirectories
* @param refName * @param refName the name of a repository branch or tag or if not given the default branch
* @param recursive * @param recursive flag to get a recursive tree or not
* @return a tree with the directories and files of a project * @return a tree with the directories and files of a project
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -269,8 +269,9 @@ public class RepositoryApi extends AbstractApi { ...@@ -269,8 +269,9 @@ public class RepositoryApi extends AbstractApi {
* *
* GET /projects/:id/repository/blobs/:sha * GET /projects/:id/repository/blobs/:sha
* *
* @param projectId * @param projectId the ID of the project
* @param commitOrBranchName * @param commitOrBranchName the commit or branch name to get the file contents for
* @param filepath the path of the file to get
* @return a string with the file content for the specified file * @return a string with the file content for the specified file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -285,8 +286,8 @@ public class RepositoryApi extends AbstractApi { ...@@ -285,8 +286,8 @@ public class RepositoryApi extends AbstractApi {
* *
* GET /projects/:id/repository/raw_blobs/:sha * GET /projects/:id/repository/raw_blobs/:sha
* *
* @param projectId * @param projectId the ID of the project
* @param sha * @param sha the SHA of the file to get the contents for
* @return the raw file contents for the blob * @return the raw file contents for the blob
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -300,8 +301,8 @@ public class RepositoryApi extends AbstractApi { ...@@ -300,8 +301,8 @@ public class RepositoryApi extends AbstractApi {
* *
* GET /projects/:id/repository/archive * GET /projects/:id/repository/archive
* *
* @param projectId * @param projectId the ID of the project
* @param sha * @param sha the SHA of the archive to get
* @return an input stream that can be used to save as a file * @return an input stream that can be used to save as a file
* or to read the content of the archive * or to read the content of the archive
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -318,8 +319,8 @@ public class RepositoryApi extends AbstractApi { ...@@ -318,8 +319,8 @@ public class RepositoryApi extends AbstractApi {
* *
* GET /projects/:id/repository/archive * GET /projects/:id/repository/archive
* *
* @param projectId * @param projectId the ID of the project
* @param sha * @param sha the SHA of the archive to get
* @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir" * @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir"
* @return a File instance pointing to the downloaded instance * @return a File instance pointing to the downloaded instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
......
...@@ -21,10 +21,10 @@ public class RepositoryFileApi extends AbstractApi { ...@@ -21,10 +21,10 @@ public class RepositoryFileApi extends AbstractApi {
* GET /projects/:id/repository/files * GET /projects/:id/repository/files
* *
* @param filePath (required) - Full path to new file. Ex. lib/class.rb * @param filePath (required) - Full path to new file. Ex. lib/class.rb
* @param projectId * @param projectId (required) - the project ID
* @param ref (required) - The name of branch, tag or commit * @param ref (required) - The name of branch, tag or commit
* @return a RepositoryFile instance with the file info * @return a RepositoryFile instance with the file info
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public RepositoryFile getFile(String filePath, Integer projectId, String ref) throws GitLabApiException { public RepositoryFile getFile(String filePath, Integer projectId, String ref) throws GitLabApiException {
Form form = new Form(); Form form = new Form();
...@@ -45,12 +45,12 @@ public class RepositoryFileApi extends AbstractApi { ...@@ -45,12 +45,12 @@ public class RepositoryFileApi extends AbstractApi {
* content (required) - File content * content (required) - File content
* commit_message (required) - Commit message * commit_message (required) - Commit message
* *
* @param file * @param file full path to new file. Ex. lib/class.rb
* @param projectId * @param projectId the project ID
* @param branchName * @param branchName the name of branch
* @param commitMessage * @param commitMessage the commit message
* @return a RepositoryFile instance with the created file info * @return a RepositoryFile instance with the created file info
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public RepositoryFile createFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException { public RepositoryFile createFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException {
Form formData = file2form(file, branchName, commitMessage); Form formData = file2form(file, branchName, commitMessage);
...@@ -69,12 +69,12 @@ public class RepositoryFileApi extends AbstractApi { ...@@ -69,12 +69,12 @@ public class RepositoryFileApi extends AbstractApi {
* content (required) - File content * content (required) - File content
* commit_message (required) - Commit message * commit_message (required) - Commit message
* *
* @param file * @param file full path to new file. Ex. lib/class.rb
* @param projectId * @param projectId the project ID
* @param branchName * @param branchName the name of branch
* @param commitMessage * @param commitMessage the commit message
* @return a RepositoryFile instance with the updated file info * @return a RepositoryFile instance with the updated file info
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public RepositoryFile updateFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException { public RepositoryFile updateFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException {
Form form = file2form(file, branchName, commitMessage); Form form = file2form(file, branchName, commitMessage);
...@@ -91,11 +91,11 @@ public class RepositoryFileApi extends AbstractApi { ...@@ -91,11 +91,11 @@ public class RepositoryFileApi extends AbstractApi {
* branch_name (required) - The name of branch * branch_name (required) - The name of branch
* commit_message (required) - Commit message * commit_message (required) - Commit message
* *
* @param filePath * @param filePath full path to new file. Ex. lib/class.rb
* @param projectId * @param projectId the project ID
* @param branchName * @param branchName the name of branch
* @param commitMessage * @param commitMessage the commit message
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteFile(String filePath, Integer projectId, String branchName, String commitMessage) throws GitLabApiException { public void deleteFile(String filePath, Integer projectId, String branchName, String commitMessage) throws GitLabApiException {
......
...@@ -24,6 +24,7 @@ public class ServicesApi extends AbstractApi { ...@@ -24,6 +24,7 @@ public class ServicesApi extends AbstractApi {
* @param projectId id of the project * @param projectId id of the project
* @param token for authentication * @param token for authentication
* @param projectCIUrl URL of the GitLab-CI project * @param projectCIUrl URL of the GitLab-CI project
* @throws GitLabApiException if any exception occurs
*/ */
public void setGitLabCI(Integer projectId, String token, String projectCIUrl) throws GitLabApiException { public void setGitLabCI(Integer projectId, String token, String projectCIUrl) throws GitLabApiException {
final Form formData = new Form(); final Form formData = new Form();
...@@ -39,6 +40,7 @@ public class ServicesApi extends AbstractApi { ...@@ -39,6 +40,7 @@ public class ServicesApi extends AbstractApi {
* @param project the project * @param project the project
* @param token for authentication * @param token for authentication
* @param projectCIUrl URL of the GitLab-CI project * @param projectCIUrl URL of the GitLab-CI project
* @throws GitLabApiException if any exception occurs
*/ */
public void setGitLabCI(Project project, String token, String projectCIUrl) throws GitLabApiException { public void setGitLabCI(Project project, String token, String projectCIUrl) throws GitLabApiException {
setGitLabCI(project.getId(), token, projectCIUrl); setGitLabCI(project.getId(), token, projectCIUrl);
...@@ -50,7 +52,7 @@ public class ServicesApi extends AbstractApi { ...@@ -50,7 +52,7 @@ public class ServicesApi extends AbstractApi {
* DELETE /projects/:id/services/gitlab-ci * DELETE /projects/:id/services/gitlab-ci
* *
* @param projectId id of the project * @param projectId id of the project
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteGitLabCI(Integer projectId) throws GitLabApiException { public void deleteGitLabCI(Integer projectId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", projectId, "services", "gitlab-ci"); delete(Response.Status.OK, null, "projects", projectId, "services", "gitlab-ci");
...@@ -59,7 +61,7 @@ public class ServicesApi extends AbstractApi { ...@@ -59,7 +61,7 @@ public class ServicesApi extends AbstractApi {
/** /**
* DELETE /projects/:id/services/gitlab-ci * DELETE /projects/:id/services/gitlab-ci
* @param project to delete * @param project to delete
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteGitLabCI(Project project) throws GitLabApiException { public void deleteGitLabCI(Project project) throws GitLabApiException {
deleteGitLabCI(project.getId()); deleteGitLabCI(project.getId());
...@@ -74,8 +76,7 @@ public class ServicesApi extends AbstractApi { ...@@ -74,8 +76,7 @@ public class ServicesApi extends AbstractApi {
* @param token for authentication * @param token for authentication
* @param room HipChat Room * @param room HipChat Room
* @param server HipChat Server URL * @param server HipChat Server URL
* * @throws GitLabApiException if any exception occurs
* @throws GitLabApiException
*/ */
public void setHipChat(Integer projectId, String token, String room, String server) throws GitLabApiException { public void setHipChat(Integer projectId, String token, String room, String server) throws GitLabApiException {
final Form formData = new Form(); final Form formData = new Form();
...@@ -90,11 +91,11 @@ public class ServicesApi extends AbstractApi { ...@@ -90,11 +91,11 @@ public class ServicesApi extends AbstractApi {
* *
* PUT /projects/:id/services/hipchat * PUT /projects/:id/services/hipchat
* *
* @param project * @param project the Project instance to activate Hipchat for
* @param token * @param token for authentication
* @param room * @param room HipChat Room
* @param server * @param server HipChat Server URL
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void setHipChat(Project project, String token, String room, String server) throws GitLabApiException { public void setHipChat(Project project, String token, String room, String server) throws GitLabApiException {
setHipChat(project.getId(), token, room, server); setHipChat(project.getId(), token, room, server);
...@@ -106,7 +107,7 @@ public class ServicesApi extends AbstractApi { ...@@ -106,7 +107,7 @@ public class ServicesApi extends AbstractApi {
* DELETE /projects/:id/services/hipchat * DELETE /projects/:id/services/hipchat
* *
* @param projectId id of the project * @param projectId id of the project
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteHipChat(Integer projectId) throws GitLabApiException { public void deleteHipChat(Integer projectId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", projectId, "services", "hipchat"); delete(Response.Status.OK, null, "projects", projectId, "services", "hipchat");
...@@ -118,7 +119,7 @@ public class ServicesApi extends AbstractApi { ...@@ -118,7 +119,7 @@ public class ServicesApi extends AbstractApi {
* DELETE /projects/:id/services/hipchat * DELETE /projects/:id/services/hipchat
* *
* @param project the project * @param project the project
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteHipChat(Project project) throws GitLabApiException { public void deleteHipChat(Project project) throws GitLabApiException {
deleteHipChat(project.getId()); deleteHipChat(project.getId());
......
...@@ -19,11 +19,11 @@ public class SessionApi extends AbstractApi { ...@@ -19,11 +19,11 @@ public class SessionApi extends AbstractApi {
* *
* POST /session * POST /session
* *
* @param username * @param username the username to login
* @param email * @param email the email address to login
* @param password * @param password the password of the user
* @return a Session instance with info on the logged in user * @return a Session instance with info on the logged in user
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public Session login(String username, String email, String password) throws GitLabApiException { public Session login(String username, String email, String password) throws GitLabApiException {
......
...@@ -23,7 +23,7 @@ public class UserApi extends AbstractApi { ...@@ -23,7 +23,7 @@ public class UserApi extends AbstractApi {
* GET /users * GET /users
* *
* @return a list of Users, this list will only contain the first 20 users in the system. * @return a list of Users, this list will only contain the first 20 users in the system.
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public List<User> getUsers() throws GitLabApiException { public List<User> getUsers() throws GitLabApiException {
Response response = get(Response.Status.OK, null, "users"); Response response = get(Response.Status.OK, null, "users");
...@@ -36,10 +36,10 @@ public class UserApi extends AbstractApi { ...@@ -36,10 +36,10 @@ public class UserApi extends AbstractApi {
* *
* GET /users * GET /users
* *
* @param page * @param page the page to get
* @param perPage * @param perPage the number of users per page
* @return the list of Users in the specified range * @return the list of Users in the specified range
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public List<User> getUsers(int page, int perPage) throws GitLabApiException { public List<User> getUsers(int page, int perPage) throws GitLabApiException {
...@@ -56,9 +56,9 @@ public class UserApi extends AbstractApi { ...@@ -56,9 +56,9 @@ public class UserApi extends AbstractApi {
* *
* GET /users/:id * GET /users/:id
* *
* @param userId * @param userId the ID of the user to get
* @return the User instance for the specified user ID * @return the User instance for the specified user ID
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public User getUser(int userId) throws GitLabApiException { public User getUser(int userId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "users", userId); Response response = get(Response.Status.OK, null, "users", userId);
...@@ -70,9 +70,9 @@ public class UserApi extends AbstractApi { ...@@ -70,9 +70,9 @@ public class UserApi extends AbstractApi {
* *
* GET /users?search=:email_or_username * GET /users?search=:email_or_username
* *
* @param emailOrUsername * @param emailOrUsername the email or username to search for
* @return the User List with the email or username like emailOrUsername * @return the User List with the email or username like emailOrUsername
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public List<User> findUsers(String emailOrUsername) throws GitLabApiException { public List<User> findUsers(String emailOrUsername) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", emailOrUsername, true); GitLabApiForm formData = new GitLabApiForm().withParam("search", emailOrUsername, true);
...@@ -101,9 +101,11 @@ public class UserApi extends AbstractApi { ...@@ -101,9 +101,11 @@ public class UserApi extends AbstractApi {
* admin (optional) - User is admin - true or false (default) * admin (optional) - User is admin - true or false (default)
* can_create_group (optional) - User can create groups - true or false * can_create_group (optional) - User can create groups - true or false
* *
* @param user * @param user the User instance with the user info to create
* @param password the password for the new user
* @param projectsLimit the maximum number of project
* @return created User instance * @return created User instance
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public User createUser(User user, String password, Integer projectsLimit) throws GitLabApiException { public User createUser(User user, String password, Integer projectsLimit) throws GitLabApiException {
Form formData = userToForm(user, projectsLimit, password, true); Form formData = userToForm(user, projectsLimit, password, true);
...@@ -131,9 +133,11 @@ public class UserApi extends AbstractApi { ...@@ -131,9 +133,11 @@ public class UserApi extends AbstractApi {
* admin (optional) - User is admin - true or false (default) * admin (optional) - User is admin - true or false (default)
* can_create_group (optional) - User can create groups - true or false * can_create_group (optional) - User can create groups - true or false
* *
* @param user * @param user the User instance with the user info to modify
* @param password the new password for the user
* @param projectsLimit the maximum number of project
* @return the modified User instance * @return the modified User instance
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public User modifyUser(User user, String password, Integer projectsLimit) throws GitLabApiException { public User modifyUser(User user, String password, Integer projectsLimit) throws GitLabApiException {
Form form = userToForm(user, projectsLimit, password, false); Form form = userToForm(user, projectsLimit, password, false);
...@@ -146,8 +150,8 @@ public class UserApi extends AbstractApi { ...@@ -146,8 +150,8 @@ public class UserApi extends AbstractApi {
* *
* DELETE /users/:id * DELETE /users/:id
* *
* @param userId * @param userId the user ID to delete
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteUser(Integer userId) throws GitLabApiException { public void deleteUser(Integer userId) throws GitLabApiException {
...@@ -163,8 +167,8 @@ public class UserApi extends AbstractApi { ...@@ -163,8 +167,8 @@ public class UserApi extends AbstractApi {
* *
* DELETE /users/:id * DELETE /users/:id
* *
* @param user * @param user the User instance to delete
* @throws GitLabApiException * @throws GitLabApiException if any exception occurs
*/ */
public void deleteUser(User user) throws GitLabApiException { public void deleteUser(User user) throws GitLabApiException {
deleteUser(user.getId()); deleteUser(user.getId());
......
...@@ -151,6 +151,7 @@ public class ProjectHook { ...@@ -151,6 +151,7 @@ public class ProjectHook {
} }
/** /**
* @return the do build events flag
* @deprecated As of release 4.1.0, replaced by {@link #getBuildEvents()} * @deprecated As of release 4.1.0, replaced by {@link #getBuildEvents()}
*/ */
@Deprecated @Deprecated
...@@ -160,6 +161,7 @@ public class ProjectHook { ...@@ -160,6 +161,7 @@ public class ProjectHook {
} }
/** /**
* @param buildEvents the do build events flag
* @deprecated As of release 4.1.0, replaced by {@link #setBuildEvents(Boolean)} * @deprecated As of release 4.1.0, replaced by {@link #setBuildEvents(Boolean)}
*/ */
@Deprecated @Deprecated
...@@ -169,6 +171,7 @@ public class ProjectHook { ...@@ -169,6 +171,7 @@ public class ProjectHook {
} }
/** /**
* @return the enable SSL verification flag
* @deprecated As of release 4.1.0, replaced by {@link #getEnableSslVerification()} * @deprecated As of release 4.1.0, replaced by {@link #getEnableSslVerification()}
*/ */
@Deprecated @Deprecated
...@@ -178,6 +181,7 @@ public class ProjectHook { ...@@ -178,6 +181,7 @@ public class ProjectHook {
} }
/** /**
* @param enableSslVerification the enable SSL verification flag
* @deprecated As of release 4.1.0, replaced by {@link #setEnableSslVerification(Boolean)} * @deprecated As of release 4.1.0, replaced by {@link #setEnableSslVerification(Boolean)}
*/ */
@Deprecated @Deprecated
...@@ -187,6 +191,7 @@ public class ProjectHook { ...@@ -187,6 +191,7 @@ public class ProjectHook {
} }
/** /**
* @return the do note events flag
* @deprecated As of release 4.1.0, replaced by {@link #getNoteEvents()} * @deprecated As of release 4.1.0, replaced by {@link #getNoteEvents()}
*/ */
@Deprecated @Deprecated
...@@ -196,6 +201,7 @@ public class ProjectHook { ...@@ -196,6 +201,7 @@ public class ProjectHook {
} }
/** /**
* @param noteEvents the do note events flag
* @deprecated As of release 4.1.0, replaced by {@link #setNoteEvents(Boolean)} * @deprecated As of release 4.1.0, replaced by {@link #setNoteEvents(Boolean)}
*/ */
@Deprecated @Deprecated
...@@ -205,6 +211,7 @@ public class ProjectHook { ...@@ -205,6 +211,7 @@ public class ProjectHook {
} }
/** /**
* @return the do pipeline events flag
* @deprecated As of release 4.1.0, replaced by {@link #getPipelineEvents()} * @deprecated As of release 4.1.0, replaced by {@link #getPipelineEvents()}
*/ */
@Deprecated @Deprecated
...@@ -214,6 +221,7 @@ public class ProjectHook { ...@@ -214,6 +221,7 @@ public class ProjectHook {
} }
/** /**
* @param pipelineEvents the do pipeline events flag
* @deprecated As of release 4.1.0, replaced by {@link #setPipelineEvents(Boolean)} * @deprecated As of release 4.1.0, replaced by {@link #setPipelineEvents(Boolean)}
*/ */
@Deprecated @Deprecated
...@@ -223,6 +231,7 @@ public class ProjectHook { ...@@ -223,6 +231,7 @@ public class ProjectHook {
} }
/** /**
* @return the do tag push events flag
* @deprecated As of release 4.1.0, replaced by {@link #getTagPushEvents()} * @deprecated As of release 4.1.0, replaced by {@link #getTagPushEvents()}
*/ */
@Deprecated @Deprecated
...@@ -232,6 +241,7 @@ public class ProjectHook { ...@@ -232,6 +241,7 @@ public class ProjectHook {
} }
/** /**
* @param tagPushEvents the do tag push events flag
* @deprecated As of release 4.1.0, replaced by {@link #setTagPushEvents(Boolean)} * @deprecated As of release 4.1.0, replaced by {@link #setTagPushEvents(Boolean)}
*/ */
@Deprecated @Deprecated
...@@ -241,6 +251,7 @@ public class ProjectHook { ...@@ -241,6 +251,7 @@ public class ProjectHook {
} }
/** /**
* @return the do wiki page events flag
* @deprecated As of release 4.1.0, replaced by {@link #getWikiPageEvents()} * @deprecated As of release 4.1.0, replaced by {@link #getWikiPageEvents()}
*/ */
@Deprecated @Deprecated
...@@ -250,6 +261,7 @@ public class ProjectHook { ...@@ -250,6 +261,7 @@ public class ProjectHook {
} }
/** /**
* @param wikiPageEvents the do wiki page events flag
* @deprecated As of release 4.1.0, replaced by {@link #setWikiPageEvents(Boolean)} * @deprecated As of release 4.1.0, replaced by {@link #setWikiPageEvents(Boolean)}
*/ */
@Deprecated @Deprecated
......
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