summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/assembly/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-05-27 06:00:05 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-05-27 06:00:05 +0000
commita25b8899efdf8de7473186e8ef55e66ff0c80adb (patch)
tree73a24416da97308c685e405c55713182445caabf /sca-java-2.x/trunk/modules/assembly/src
parentd3629e7430f866f69d71144119199b52f020ca58 (diff)
Adding rest binding reference support
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@948681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src')
-rw-r--r--sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java5
-rw-r--r--sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java15
2 files changed, 19 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
index 113ec0c72c..0acb326a47 100644
--- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
+++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
@@ -238,6 +238,11 @@ public class OperationImpl implements Operation {
copy.attributes = new ConcurrentHashMap<Object, Object>();
copy.attributes.putAll(attributes);
+
+ // [rfeng] We need to clone the wrapper as it holds the databinding information
+ if (wrapper != null) {
+ copy.wrapper = (WrapperInfo)wrapper.clone();
+ }
return copy;
}
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java
index 840e6306bd..2252434c39 100644
--- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java
+++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java
@@ -48,7 +48,7 @@ import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
* @version $Rev$ $Date$
* @tuscany.spi.extension.asclient
*/
-public class WrapperInfo {
+public class WrapperInfo implements Cloneable {
private ElementInfo inputWrapperElement;
private ElementInfo outputWrapperElement;
@@ -188,4 +188,17 @@ public class WrapperInfo {
public void setOutputWrapperType(DataType<XMLType> outputWrapperType) {
this.outputWrapperType = outputWrapperType;
}
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ WrapperInfo copy = (WrapperInfo) super.clone();
+ if (inputWrapperType != null) {
+ copy.inputWrapperType = (DataType<XMLType>)inputWrapperType.clone();
+ }
+ if (outputWrapperType != null) {
+ copy.outputWrapperType = (DataType<XMLType>)outputWrapperType.clone();
+ }
+ return copy;
+
+ }
}