Skip to content

Commit

Permalink
WIP - Updates to Request objects
Browse files Browse the repository at this point in the history
  • Loading branch information
tlawrie committed Sep 6, 2023
1 parent d82c59e commit 1655ea9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/main/java/io/boomerang/model/TaskRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
public abstract class TaskRequest {
private String workflowRef;
private String workflowRunRef;
private String workflowName;
private String taskRunRef;
private String taskName;
private String name;
private String image;
private List<String> command;
private String workingDir;
Expand All @@ -45,7 +46,7 @@ public abstract class TaskRequest {
@Override
public String toString() {
return "TaskRequest [workflowRef=" + workflowRef + ", workflowRunRef=" + workflowRunRef
+ ", taskRunRef=" + taskRunRef + ", taskName=" + taskName + ", image=" + image
+ ", taskRunRef=" + taskRunRef + ", taskName=" + name + ", image=" + image
+ ", command=" + command + ", workingDir=" + workingDir + ", script=" + script + ", labels="
+ labels + ", params=" + params + ", envs=" + envs + ", results=" + results + ", arguments="
+ arguments + ", workspaces=" + workspaces + ", debug=" + debug + ", timeout=" + timeout
Expand All @@ -63,17 +64,23 @@ public String getWorkflowRunRef() {
public void setWorkflowRunRef(String workflowRunRef) {
this.workflowRunRef = workflowRunRef;
}
public String getWorkflowName() {
return workflowName;
}
public void setWorkflowName(String workflowName) {
this.workflowName = workflowName;
}
public String getTaskRunRef() {
return taskRunRef;
}
public void setTaskRunRef(String taskRunRef) {
this.taskRunRef = taskRunRef;
}
public String getTaskName() {
return taskName;
return name;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
this.name = taskName;
}
public String getImage() {
return image;
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/io/boomerang/model/TaskTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public TaskTemplate() {

public TaskTemplate(TaskRunEntity entity) {
BeanUtils.copyProperties(entity, this);
//TaskRunEntity has an ID but on the TaskRequest this is the ref
this.setTaskRunRef(entity.getId());
//TaskRunEntity has layered elements under Spec, the request is flat.
BeanUtils.copyProperties(entity.getSpec(), this);
}
}
6 changes: 6 additions & 0 deletions src/main/java/io/boomerang/model/WorkflowRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public class WorkflowRequest {
@JsonProperty("workspaces")
private List<WorkflowWorkspace> workspaces = new LinkedList<>();

@Override
public String toString() {
return "WorkflowRequest [workflowRunRef=" + workflowRunRef + ", workflowRef=" + workflowRef
+ ", labels=" + labels + ", workspaces=" + workspaces + "]";
}

public String getWorkflowRef() {
return workflowRef;
}
Expand Down

0 comments on commit 1655ea9

Please sign in to comment.