1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.argeo.slc.execution;
17
18 import java.io.Serializable;
19 import java.util.HashMap;
20 import java.util.Map;
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 public class ExecutionFlowDescriptor implements Serializable, Cloneable {
44 private static final long serialVersionUID = 7101944857038041216L;
45 private String name;
46 private String description;
47 private String path;
48 private Map<String, Object> values;
49 private ExecutionSpec executionSpec;
50
51 public ExecutionFlowDescriptor() {
52 }
53
54 public ExecutionFlowDescriptor(String name, String description,
55 Map<String, Object> values, ExecutionSpec executionSpec) {
56 this.name = name;
57 this.values = values;
58 this.executionSpec = executionSpec;
59 }
60
61
62 @Override
63 protected Object clone() throws CloneNotSupportedException {
64 return new ExecutionFlowDescriptor(name, description,
65 new HashMap<String, Object>(values), executionSpec);
66 }
67
68 public String getName() {
69 return name;
70 }
71
72
73
74
75
76 public String getPath() {
77 return path;
78 }
79
80
81
82
83
84 public void setPath(String path) {
85 this.path = path;
86 }
87
88 public Map<String, Object> getValues() {
89 return values;
90 }
91
92 public ExecutionSpec getExecutionSpec() {
93 return executionSpec;
94 }
95
96 public void setName(String name) {
97 this.name = name;
98 }
99
100 public void setValues(Map<String, Object> values) {
101 this.values = values;
102 }
103
104 public void setExecutionSpec(ExecutionSpec executionSpec) {
105 this.executionSpec = executionSpec;
106 }
107
108 public String getDescription() {
109 return description;
110 }
111
112 public void setDescription(String description) {
113 this.description = description;
114 }
115
116 @Override
117 public boolean equals(Object obj) {
118 if (obj instanceof ExecutionFlowDescriptor)
119 return name.equals(((ExecutionFlowDescriptor) obj).getName());
120 return false;
121 }
122
123 @Override
124 public int hashCode() {
125 return name.hashCode();
126 }
127
128 @Override
129 public String toString() {
130 return (path != null && !path.trim().equals("") ? path + "/" : "")
131 + name;
132 }
133
134 }