X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.specs%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionFlowDescriptor.java;h=e3eea046f5147c110b5c5c159080745c1aec518d;hb=620072e20b5027f484f615410a0142d2f696d400;hp=f081b8b31acfdd430939e9aa55f9a1a4108a40b8;hpb=74904a755b5b344238eafa798419b80c5e74f7ed;p=gpl%2Fargeo-slc.git
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java
index f081b8b31..e3eea046f 100644
--- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java
+++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.argeo.slc.execution;
import java.io.Serializable;
+import java.util.HashMap;
import java.util.Map;
/**
@@ -39,7 +40,7 @@ import java.util.Map;
* Generally, values object are either a PrimitiveAccessor
or a
* RefValue
but can be other objects.
*/
-public class ExecutionFlowDescriptor implements Serializable {
+public class ExecutionFlowDescriptor implements Serializable, Cloneable {
private static final long serialVersionUID = 7101944857038041216L;
private String name;
private String description;
@@ -50,13 +51,20 @@ public class ExecutionFlowDescriptor implements Serializable {
public ExecutionFlowDescriptor() {
}
- public ExecutionFlowDescriptor(String name, Map values,
- ExecutionSpec executionSpec) {
+ public ExecutionFlowDescriptor(String name, String description,
+ Map values, ExecutionSpec executionSpec) {
this.name = name;
this.values = values;
this.executionSpec = executionSpec;
}
+ /** The referenced {@link ExecutionSpec} is NOT cloned. */
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return new ExecutionFlowDescriptor(name, description,
+ new HashMap(values), executionSpec);
+ }
+
public String getName() {
return name;
}