]>
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
.io
.Serializable
;
4 import java
.util
.ArrayList
;
7 import java
.util
.TreeMap
;
9 public class SlcExecution
implements Serializable
{
10 private static final long serialVersionUID
= 1L;
11 public final static String STATUS_NONE
= "DEFAULT";
12 public final static String STATUS_SCHEDULED
= "SCHEDULED";
13 public final static String STATUS_RUNNING
= "RUNNING";
14 public final static String STATUS_FINISHED
= "FINISHED";
15 public final static String STATUS_ERROR
= "ERROR";
16 public final static String STATUS_CLEANED
= "CLEANED";
18 public final static String UNKOWN_HOST
= "UNKOWN_HOST";
24 private String status
= STATUS_NONE
;
25 private Map
<String
, String
> attributes
= new TreeMap
<String
, String
>();
27 private List
<SlcExecutionStep
> steps
= new ArrayList
<SlcExecutionStep
>();
28 private List
<RealizedFlow
> realizedFlows
= new ArrayList
<RealizedFlow
>();
30 public List
<RealizedFlow
> getRealizedFlows() {
34 public void setRealizedFlows(List
<RealizedFlow
> realizedFlows
) {
35 this.realizedFlows
= realizedFlows
;
38 public List
<SlcExecutionStep
> getSteps() {
42 public void setSteps(List
<SlcExecutionStep
> steps
) {
46 public String
getUuid() {
50 public void setUuid(String uuid
) {
54 public String
getHost() {
58 public void setHost(String host
) {
62 public String
getUser() {
66 public void setUser(String user
) {
70 public String
getType() {
74 public void setType(String type
) {
78 public String
getStatus() {
82 public void setStatus(String status
) {
86 public SlcExecutionStep
currentStep() {
88 return steps
.get(steps
.size() - 1);
94 public boolean equals(Object obj
) {
95 if (obj
instanceof SlcExecution
) {
96 return getUuid().equals(((SlcExecution
) obj
).getUuid());
102 public int hashCode() {
103 return getUuid().hashCode();
106 public Map
<String
, String
> getAttributes() {
110 public void setAttributes(Map
<String
, String
> attributes
) {
111 this.attributes
= attributes
;
114 public String
toString() {
115 StringBuffer buf
= new StringBuffer(getClass().getSimpleName());
116 buf
.append('#').append(uuid
);
117 buf
.append(" status=").append(status
);
118 buf
.append(" attributes=").append(attributes
);
119 return buf
.toString();