2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org
.argeo
.slc
.execution
;
19 import java
.io
.Serializable
;
26 * This class implements the archetype of a given process.
28 * WARNING : for now both <code>values</code> and
29 * <code>executionSpec</code> which are rundundant are used. Should be
30 * improved in further version. Note also that a third redundant field,
31 * <code>RealizedFlow.executionSpec</code> is also to be cleaned.
34 public class ExecutionFlowDescriptor
implements Serializable
{
35 private static final long serialVersionUID
= 7101944857038041216L;
37 private String description
;
39 private Map
<String
, Object
> values
;
40 private ExecutionSpec executionSpec
;
42 public ExecutionFlowDescriptor() {
45 public ExecutionFlowDescriptor(String name
, Map
<String
, Object
> values
,
46 ExecutionSpec executionSpec
) {
49 this.executionSpec
= executionSpec
;
52 public String
getName() {
56 public String
getPath() {
60 public void setPath(String path
) {
64 public Map
<String
, Object
> getValues() {
68 public ExecutionSpec
getExecutionSpec() {
72 public void setName(String name
) {
76 public void setValues(Map
<String
, Object
> values
) {
80 public void setExecutionSpec(ExecutionSpec executionSpec
) {
81 this.executionSpec
= executionSpec
;
84 public String
getDescription() {
88 public void setDescription(String description
) {
89 this.description
= description
;
93 public boolean equals(Object obj
) {
94 if (obj
instanceof ExecutionFlowDescriptor
)
95 return name
.equals(((ExecutionFlowDescriptor
) obj
).getName());
100 public int hashCode() {
101 return name
.hashCode();
105 public String
toString() {
106 return (path
!= null && !path
.trim().equals("") ? path
+ "/" : "")