Skip to content

Commit 1c7b5ba

Browse files
author
Mark Robinson
committed
Add commit ID to workflow model
1 parent 27bf76a commit 1c7b5ba

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main/java/org/commonwl/viewer/domain/Workflow.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public class Workflow {
5151
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss z")
5252
private Date retrievedOn;
5353

54+
// The last commit from the branch at the time of fetching
55+
// Used for caching purposes
56+
private String lastCommit;
57+
5458
// A String which represents the path to a RO bundle
5559
// Path types cannot be stored using Spring Data, unfortunately
5660
private String roBundle;
@@ -66,12 +70,14 @@ public class Workflow {
6670
private String dotGraph;
6771

6872
public Workflow(String label, String doc, Map<String, CWLElement> inputs,
69-
Map<String, CWLElement> outputs, Map<String, CWLStep> steps) {
73+
Map<String, CWLElement> outputs, Map<String, CWLStep> steps,
74+
String lastCommit) {
7075
this.label = label;
7176
this.doc = doc;
7277
this.inputs = inputs;
7378
this.outputs = outputs;
7479
this.steps = steps;
80+
this.lastCommit = lastCommit;
7581

7682
// Create a DOT graph for this workflow and store it
7783
StringWriter graphWriter = new StringWriter();
@@ -161,4 +167,12 @@ public String getDotGraph() {
161167
public void setDotGraph(String dotGraph) {
162168
this.dotGraph = dotGraph;
163169
}
170+
171+
public String getLastCommit() {
172+
return lastCommit;
173+
}
174+
175+
public void setLastCommit(String lastCommit) {
176+
this.lastCommit = lastCommit;
177+
}
164178
}

0 commit comments

Comments
 (0)