]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecution.java
1 package org
.argeo
.slc
.process
;
3 import java
.util
.ArrayList
;
6 import java
.util
.TreeMap
;
8 public class SlcExecution
{
9 public final static String STATUS_SCHEDULED
= "SCHEDULED";
10 public final static String STATUS_RUNNING
= "RUNNING";
11 public final static String STATUS_FINISHED
= "FINISHED";
12 public final static String STATUS_ERROR
= "ERROR";
13 public final static String STATUS_CLEANED
= "CLEANED";
15 public final static String UNKOWN_HOST
= "UNKOWN_HOST";
21 private String status
;
22 private Map
<String
, String
> attributes
= new TreeMap
<String
, String
>();
24 private List
<SlcExecutionStep
> steps
= new ArrayList
<SlcExecutionStep
>();
25 private List
<RealizedFlow
> realizedFlows
= new ArrayList
<RealizedFlow
>();
27 public List
<RealizedFlow
> getRealizedFlows() {
31 public void setRealizedFlows(List
<RealizedFlow
> realizedFlows
) {
32 this.realizedFlows
= realizedFlows
;
35 public List
<SlcExecutionStep
> getSteps() {
39 public void setSteps(List
<SlcExecutionStep
> steps
) {
43 public String
getUuid() {
47 public void setUuid(String uuid
) {
51 public String
getHost() {
55 public void setHost(String host
) {
59 public String
getUser() {
63 public void setUser(String user
) {
67 public String
getType() {
71 public void setType(String type
) {
75 public String
getStatus() {
79 public void setStatus(String status
) {
83 public SlcExecutionStep
currentStep() {
85 return steps
.get(steps
.size() - 1);
91 public boolean equals(Object obj
) {
92 if (obj
instanceof SlcExecution
) {
93 return getUuid().equals(((SlcExecution
) obj
).getUuid());
99 public int hashCode() {
100 return getUuid().hashCode();
103 public Map
<String
, String
> getAttributes() {
107 public void setAttributes(Map
<String
, String
> attributes
) {
108 this.attributes
= attributes
;
111 public String
toString() {
112 StringBuffer buf
= new StringBuffer(getClass().getSimpleName());
113 buf
.append('#').append(uuid
);
114 buf
.append(" status=").append(status
);
115 buf
.append(" attributes=").append(attributes
);
116 return buf
.toString();