tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r781191 - /tuscany/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
Date Tue, 02 Jun 2009 22:34:10 GMT
Author: slaws
Date: Tue Jun  2 22:34:09 2009
New Revision: 781191

URL: http://svn.apache.org/viewvc?rev=781191&view=rev
Log:
TUSCANY-3075 - don't write out the services and references generated to handle callbacks.


Modified:
    tuscany/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java

Modified: tuscany/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java?rev=781191&r1=781190&r2=781191&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
Tue Jun  2 22:34:09 2009
@@ -703,95 +703,99 @@
             
             // Write <service> elements
             for (ComponentService service : component.getServices()) {
-                writeStart(writer, SERVICE, new XAttr(NAME, service.getName()),
-                           policyProcessor.writePolicies(service));
-
-                //write extended attributes
-                this.writeExtendedAttributes(writer, service, extensionAttributeProcessor);
-
-                // Write service interface
-                extensionProcessor.write(service.getInterfaceContract(), writer);
-                
-                // Write bindings
-                for (Binding binding : service.getBindings()) {
-                    extensionProcessor.write(binding, writer);
-                }
-                
-                // Write <callback> element
-                if (service.getCallback() != null) {
-                    Callback callback = service.getCallback();
-                    writeStart(writer, CALLBACK, policyProcessor.writePolicies(callback));
-
-                    //write extended attributes
-                    this.writeExtendedAttributes(writer, callback, extensionAttributeProcessor);
-
-                    // Write bindings
-                    for (Binding binding : callback.getBindings()) {
-                        extensionProcessor.write(binding, writer);
-                    }
-                    
-                    // Write extensions 
-                    for (Object extension : callback.getExtensions()) {
-                        extensionProcessor.write(extension, writer);
-                    }
-                
-                    writeEnd(writer);
-                }
-                
-                // Write extensions
-                for (Object extension : service.getExtensions()) {
-                    extensionProcessor.write(extension, writer);
-                }
-                
-                writeEnd(writer);
+            	if (service.isCallback() == false){
+	                writeStart(writer, SERVICE, new XAttr(NAME, service.getName()),
+	                           policyProcessor.writePolicies(service));
+	
+	                //write extended attributes
+	                this.writeExtendedAttributes(writer, service, extensionAttributeProcessor);
+	
+	                // Write service interface
+	                extensionProcessor.write(service.getInterfaceContract(), writer);
+	                
+	                // Write bindings
+	                for (Binding binding : service.getBindings()) {
+	                    extensionProcessor.write(binding, writer);
+	                }
+	                
+	                // Write <callback> element
+	                if (service.getCallback() != null) {
+	                    Callback callback = service.getCallback();
+	                    writeStart(writer, CALLBACK, policyProcessor.writePolicies(callback));
+	
+	                    //write extended attributes
+	                    this.writeExtendedAttributes(writer, callback, extensionAttributeProcessor);
+	
+	                    // Write bindings
+	                    for (Binding binding : callback.getBindings()) {
+	                        extensionProcessor.write(binding, writer);
+	                    }
+	                    
+	                    // Write extensions 
+	                    for (Object extension : callback.getExtensions()) {
+	                        extensionProcessor.write(extension, writer);
+	                    }
+	                
+	                    writeEnd(writer);
+	                }
+	                
+	                // Write extensions
+	                for (Object extension : service.getExtensions()) {
+	                    extensionProcessor.write(extension, writer);
+	                }
+	                
+	                writeEnd(writer);
+            	}
             }
             
             // Write <reference> elements
             for (ComponentReference reference : component.getReferences()) {
-                writeStart(writer, REFERENCE, new XAttr(NAME, reference.getName()),
-                           new XAttr(AUTOWIRE, reference.getAutowire()),
-                           writeMultiplicity(reference),
-                           writeTargets(reference),
-                           policyProcessor.writePolicies(reference));
-
-                //write extended attributes
-                this.writeExtendedAttributes(writer, reference, extensionAttributeProcessor);
-
-                // Write reference interface
-                extensionProcessor.write(reference.getInterfaceContract(), writer);
-
-                // Write bindings
-                for (Binding binding : reference.getBindings()) {
-                    extensionProcessor.write(binding, writer);
-                }
-                
-                // Write callback
-                if (reference.getCallback() != null) {
-                    Callback callback = reference.getCallback();
-                    writeStart(writer, CALLBACK, policyProcessor.writePolicies(callback));
-                
-                    //write extended attributes
-                    this.writeExtendedAttributes(writer, callback, extensionAttributeProcessor);
-
-                    // Write callback bindings
-                    for (Binding binding : callback.getBindings()) {
-                        extensionProcessor.write(binding, writer);
-                    }
-                    
-                    // Write extensions
-                    for (Object extensions : callback.getExtensions()) {
-                        extensionProcessor.write(extensions, writer);
-                    }
-                
-                    writeEnd(writer);
-                }
-                
-                // Write extensions
-                for (Object extensions : reference.getExtensions()) {
-                    extensionProcessor.write(extensions, writer);
-                }
-                
-                writeEnd(writer);
+            	if (reference.isCallback() == false){
+	                writeStart(writer, REFERENCE, new XAttr(NAME, reference.getName()),
+	                           new XAttr(AUTOWIRE, reference.getAutowire()),
+	                           writeMultiplicity(reference),
+	                           writeTargets(reference),
+	                           policyProcessor.writePolicies(reference));
+	
+	                //write extended attributes
+	                this.writeExtendedAttributes(writer, reference, extensionAttributeProcessor);
+	
+	                // Write reference interface
+	                extensionProcessor.write(reference.getInterfaceContract(), writer);
+	
+	                // Write bindings
+	                for (Binding binding : reference.getBindings()) {
+	                    extensionProcessor.write(binding, writer);
+	                }
+	                
+	                // Write callback
+	                if (reference.getCallback() != null) {
+	                    Callback callback = reference.getCallback();
+	                    writeStart(writer, CALLBACK, policyProcessor.writePolicies(callback));
+	                
+	                    //write extended attributes
+	                    this.writeExtendedAttributes(writer, callback, extensionAttributeProcessor);
+	
+	                    // Write callback bindings
+	                    for (Binding binding : callback.getBindings()) {
+	                        extensionProcessor.write(binding, writer);
+	                    }
+	                    
+	                    // Write extensions
+	                    for (Object extensions : callback.getExtensions()) {
+	                        extensionProcessor.write(extensions, writer);
+	                    }
+	                
+	                    writeEnd(writer);
+	                }
+	                
+	                // Write extensions
+	                for (Object extensions : reference.getExtensions()) {
+	                    extensionProcessor.write(extensions, writer);
+	                }
+	                
+	                writeEnd(writer);
+            	}
             }
             
             // Write <property> elements



Mime
View raw message