Commit 6bc36c98 authored by caguilar187's avatar caguilar187

readding some methods that use the slug version of the project id

readding the json properties

fixing up code style to match master

trying to fix up whitespace issues to match original changes

white space fixes for gitlab branch and project hook

clean up gitlab api file

fixing compile issues with gitlab api

fixing compile issues with gitlab api
parent c70ceb94
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>1.4</version> <version>1.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
......
This diff is collapsed.
package org.gitlab.api.models; package org.gitlab.api.models;
import org.gitlab.api.models.GitlabBranchCommit;
import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.annotate.JsonProperty;
public class GitlabBranch { public class GitlabBranch {
public static String URL = "/repository/branches/"; public final static String URL = "/repository/branches/";
@JsonProperty("name")
private String _name; private String _name;
private GitlabBranchCommit _commit;
private boolean _protected;
public String getName() { @JsonProperty("commit")
return _name; private GitlabBranchCommit _commit;
}
@JsonProperty("protected")
private boolean _protected;
public String getName() {
return _name;
}
public void setName(String name) { public void setName(String name) {
_name = name; this._name = name;
} }
public GitlabBranchCommit getCommit() { public GitlabBranchCommit getCommit() {
return _commit; return _commit;
} }
public void setCommit(GitlabBranchCommit commit) { public void setCommit(GitlabBranchCommit commit) {
_commit = commit; this._commit = commit;
} }
public boolean getProtected() { public boolean isProtected() {
return _protected; return _protected;
} }
public void setProtected(boolean isProtected) { public void setProtected(boolean isProtected) {
_protected = isProtected; this._protected = isProtected;
} }
} }
\ No newline at end of file
package org.gitlab.api.models; package org.gitlab.api.models;
import java.util.Date; import java.util.Date;
import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.annotate.JsonProperty;
public class GitlabProjectHook { public class GitlabProjectHook {
public static final String URL = "/hooks"; public final static String URL = "/hooks";
private Integer _id; private String _id;
private String _url; private String _url;
@JsonProperty("project_id") private Integer _projectId;
private Integer _projectId;
@JsonProperty("push_events") @JsonProperty("push_events")
private boolean _pushEvents; private boolean _pushEvents;
@JsonProperty("issues_events") @JsonProperty("issues_events")
private boolean _issueEvents; private boolean _issueEvents;
@JsonProperty("merge_requests_events") @JsonProperty("merge_requests_events")
private boolean _mergeRequestsEvents; private boolean _mergeRequestsEvents;
@JsonProperty("created_at") @JsonProperty("created_at")
private Date _createdAt; private Date _createdAt;
public Integer getId() {
public String getId() {
return _id; return _id;
} }
public void setId(Integer id) { public void setId(String id) {
_id = id; _id = id;
} }
public String getUrl() { public String getUrl() {
return _url; return _url;
} }
public void setUrl(String url) { public void setUrl(String url) {
_url = url; this._url = url;
} }
public Integer getProjectId() {
return _projectId;
}
public Integer getProjectId() { public void setProjectId(Integer projectId) {
return _projectId; _projectId = projectId;
} }
public void setProjectId(Integer projectId) { public boolean getPushEvents() {
_projectId = projectId; return _pushEvents;
} }
public boolean getPushEvents() { public void setPushEvents(boolean pushEvents) {
return _pushEvents; _pushEvents = pushEvents;
} }
public void setPushEvents(boolean pushEvents) { public boolean getIssueEvents() {
_pushEvents = pushEvents; return _issueEvents;
} }
public Date getCreatedAt() { public void setIssueEvents(boolean issueEvents) {
return _createdAt; _issueEvents = issueEvents;
} }
public void setCreatedAt(Date createdAt) {
_createdAt = createdAt;
}
public boolean getIssueEvents() { public boolean isMergeRequestsEvents() {
return _issueEvents; return _mergeRequestsEvents;
} }
public void setIssueEvents(boolean issueEvents) { public void setMergeRequestsEvents(boolean mergeRequestsEvents) {
_issueEvents = issueEvents; _mergeRequestsEvents = mergeRequestsEvents;
} }
public boolean isMergeRequestsEvents() { public Date getCreatedAt() {
return _mergeRequestsEvents; return _createdAt;
} }
public void setMergeRequestsEvents(boolean mergeRequestsEvents) { public void setCreatedAt(Date createdAt) {
_mergeRequestsEvents = mergeRequestsEvents; _createdAt = createdAt;
} }
} }
\ No newline at end of file
Markdown is supported
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