summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/assembly')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Implementation.java5
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java19
2 files changed, 24 insertions, 0 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Implementation.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Implementation.java
index d15334000f..2d918a0592 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Implementation.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Implementation.java
@@ -18,8 +18,12 @@
*/
package org.apache.tuscany.sca.assembly;
+import java.util.List;
+
import javax.xml.namespace.QName;
+import org.apache.tuscany.sca.interfacedef.Operation;
+
/**
* Represents a component implementation.
*
@@ -27,4 +31,5 @@ import javax.xml.namespace.QName;
*/
public interface Implementation extends ComponentType {
QName getType();
+ List<Operation> getOperations();
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java
index baa23450ab..20c7ea3206 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java
@@ -19,9 +19,13 @@
package org.apache.tuscany.sca.assembly.impl;
+import java.util.ArrayList;
+import java.util.List;
+
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.policy.ExtensionType;
import org.apache.tuscany.sca.policy.PolicySubject;
@@ -33,6 +37,7 @@ import org.apache.tuscany.sca.policy.PolicySubject;
public abstract class ImplementationImpl extends ComponentTypeImpl implements Implementation, PolicySubject {
private QName type;
private ExtensionType extensionType;
+ private List<Operation> operations = new ArrayList<Operation>();
protected ImplementationImpl(QName type) {
super();
@@ -54,4 +59,18 @@ public abstract class ImplementationImpl extends ComponentTypeImpl implements Im
public String toString() {
return String.valueOf(getType());
}
+
+ public List<Operation> getOperations() {
+ return operations;
+ }
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ ImplementationImpl impl = (ImplementationImpl)super.clone();
+ impl.operations = new ArrayList<Operation>();
+ for (Operation operation : operations) {
+ impl.operations.add((Operation)operation.clone());
+ }
+ return impl;
+ }
}