Skip to content

Commit

Permalink
fixes #360 by changing the return value from void to the appropriate …
Browse files Browse the repository at this point in the history
…object (#403)
  • Loading branch information
mivola authored and khmarbaise committed Apr 15, 2019
1 parent a5a59ca commit 0f1a8bc
Show file tree
Hide file tree
Showing 46 changed files with 506 additions and 309 deletions.
139 changes: 80 additions & 59 deletions jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,27 @@ public String getDisplayPath() {
return displayPath;
}

public void setDisplayPath(String displayPath) {
public Artifact setDisplayPath(String displayPath) {
this.displayPath = displayPath;
return this;
}

public String getFileName() {
return fileName;
}

public void setFileName(String fileName) {
public Artifact setFileName(String fileName) {
this.fileName = fileName;
return this;
}

public String getRelativePath() {
return relativePath;
}

public void setRelativePath(String relativePath) {
public Artifact setRelativePath(String relativePath) {
this.relativePath = relativePath;
return this;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public JenkinsHttpConnection getClient() {
* Set the HTTP client.
* @param client {@link JenkinsHttpConnection}.
*/
public void setClient(final JenkinsHttpConnection client) {
public BaseModel setClient(final JenkinsHttpConnection client) {
this.client = client;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,19 @@ public String getUrl() {
return url;
}

protected void setNumber(int number) {
protected Build setNumber(int number) {
this.number = number;
return this;
}

protected void setQueueId(int queueId) {
protected Build setQueueId(int queueId) {
this.queueId = queueId;
return this;
}

protected void setUrl(String url) {
protected Build setUrl(String url) {
this.url = url;
return this;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,48 +29,54 @@ public String getShortDescription() {
return shortDescription;
}

public void setShortDescription(String shortDescription) {
public BuildCause setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
return this;
}

public int getUpstreamBuild() {
return upstreamBuild;
}

public void setUpstreamBuild(Integer upstreamBuild) {
public BuildCause setUpstreamBuild(Integer upstreamBuild) {
this.upstreamBuild = upstreamBuild;
return this;
}

public String getUpstreamProject() {
return upstreamProject;
}

public void setUpstreamProject(String upstreamProject) {
public BuildCause setUpstreamProject(String upstreamProject) {
this.upstreamProject = upstreamProject;
return this;
}

public String getUpstreamUrl() {
return upstreamUrl;
}

public void setUpstreamUrl(String upstreamUrl) {
public BuildCause setUpstreamUrl(String upstreamUrl) {
this.upstreamUrl = upstreamUrl;
return this;
}

public String getUserId() {
return userId;
}

public void setUserId(String userId) {
public BuildCause setUserId(String userId) {
this.userId = userId;
return this;
}

public String getUserName() {
return userName;
}

public void setUserName(String userName) {
public BuildCause setUserName(String userName) {
this.userName = userName;
return this;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ public class BuildChangeSet {
/**
* @param items {@link BuildChangeSet}
*/
public void setItems(List<BuildChangeSetItem> items) {
public BuildChangeSet setItems(List<BuildChangeSetItem> items) {
this.items = items;
return this;
}

/**
Expand All @@ -45,8 +46,9 @@ public String getKind() {
/**
* @param kind the kind of (usually svn, git).
*/
public void setKind(String kind) {
public BuildChangeSet setKind(String kind) {
this.kind = kind;
return this;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ public String getAbsoluteUrl() {
return absoluteUrl;
}

public void setAbsoluteUrl(String absoluteUrl) {
public BuildChangeSetAuthor setAbsoluteUrl(String absoluteUrl) {
this.absoluteUrl = absoluteUrl;
return this;
}

public String getFullName() {
return fullName;
}

public void setFullName(String fullName) {
public BuildChangeSetAuthor setFullName(String fullName) {
this.fullName = fullName;
return this;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,72 +27,81 @@ public List<String> getAffectedPaths() {
return affectedPaths;
}

public void setAffectedPaths(List<String> affectedPaths) {
public BuildChangeSetItem setAffectedPaths(List<String> affectedPaths) {
this.affectedPaths = affectedPaths;
return this;
}

public String getCommitId() {
return commitId;
}

public void setCommitId(String commitId) {
public BuildChangeSetItem setCommitId(String commitId) {
this.commitId = commitId;
return this;
}

public String getTimestamp() {
return timestamp;
}

public void setTimestamp(String timeStamp) {
public BuildChangeSetItem setTimestamp(String timeStamp) {
this.timestamp = timeStamp;
return this;
}

public String getComment() {
return comment;
}

public void setComment(String comment) {
public BuildChangeSetItem setComment(String comment) {
this.comment = comment;
return this;
}

public String getDate() {
return date;
}

public void setDate(String date) {
public BuildChangeSetItem setDate(String date) {
this.date = date;
return this;
}

public String getId() {
return id;
}

public void setId(String id) {
public BuildChangeSetItem setId(String id) {
this.id = id;
return this;
}

public String getMsg() {
return msg;
}

public void setMsg(String msg) {
public BuildChangeSetItem setMsg(String msg) {
this.msg = msg;
return this;
}

public List<BuildChangeSetPath> getPaths() {
return paths;
}

public void setPaths(List<BuildChangeSetPath> paths) {
public BuildChangeSetItem setPaths(List<BuildChangeSetPath> paths) {
this.paths = paths;
return this;
}

public BuildChangeSetAuthor getAuthor() {
return author;
}

public void setAuthor(BuildChangeSetAuthor author) {
public BuildChangeSetItem setAuthor(BuildChangeSetAuthor author) {
this.author = author;
return this;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ public String getEditType() {
* @param editType the SCM operation, <code>add</code> or <code>edit</code> or <code>delete</code>
* @see <a href="http://javadoc.jenkins.io/hudson/scm/EditType.html">EditType</a>
*/
public void setEditType(String editType) {
public BuildChangeSetPath setEditType(String editType) {
this.editType = editType;
return this;
}

public String getFile() {
return file;
}

public void setFile(String file) {
public BuildChangeSetPath setFile(String file) {
this.file = file;
return this;
}

@Override
Expand Down
Loading

0 comments on commit 0f1a8bc

Please sign in to comment.