summaryrefslogtreecommitdiffstats
path: root/sandbox/event/modules/implementation-java-xml/src
diff options
context:
space:
mode:
authorrsivaram <rsivaram@13f79535-47bb-0310-9956-ffa450edef68>2008-10-21 09:04:28 +0000
committerrsivaram <rsivaram@13f79535-47bb-0310-9956-ffa450edef68>2008-10-21 09:04:28 +0000
commite753f271ccf0ff4617725130b82dd21ae721b3d2 (patch)
tree41c5d085b635978d93a1ba068980dc459ca157bc /sandbox/event/modules/implementation-java-xml/src
parenta7ad2f6b64171d59288ebd468363255a29d464a0 (diff)
Event prototype: Initial model changes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@706556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/event/modules/implementation-java-xml/src')
-rw-r--r--sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java b/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
index 11934ec6bb..74a0e2a902 100644
--- a/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
+++ b/sandbox/event/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
@@ -36,7 +36,9 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.assembly.ConfiguredOperation;
+import org.apache.tuscany.sca.assembly.Consumer;
import org.apache.tuscany.sca.assembly.OperationsConfigurator;
+import org.apache.tuscany.sca.assembly.Producer;
import org.apache.tuscany.sca.assembly.Property;
import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.Service;
@@ -274,6 +276,26 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaIm
}
impl.getServices().clear();
impl.getServices().addAll(serviceMap.values());
+
+ Map<String, Producer> producerMap = new HashMap<String, Producer>();
+ for (Producer producer : impl.getProducers()) {
+ producerMap.put(producer.getName(), producer);
+ }
+ for (Producer producer : componentType.getProducers()) {
+ producerMap.put(producer.getName(), producer);
+ }
+ impl.getProducers().clear();
+ impl.getProducers().addAll(producerMap.values());
+
+ Map<String, Consumer> consumerMap = new HashMap<String, Consumer>();
+ for (Consumer consumer : impl.getConsumers()) {
+ consumerMap.put(consumer.getName(), consumer);
+ }
+ for (Consumer consumer : componentType.getConsumers()) {
+ consumerMap.put(consumer.getName(), consumer);
+ }
+ impl.getConsumers().clear();
+ impl.getConsumers().addAll(consumerMap.values());
Map<String, Property> propMap = new HashMap<String, Property>();
for (Property prop : impl.getProperties()) {