Author: slaws
Date: Tue Sep  9 04:04:01 2008
New Revision: 693434

URL: http://svn.apache.org/viewvc?rev=693434&view=rev
Log:
TUSCANY-2587 - change the name of promoted services so that the component name 
and service name are easily obtainable. I've opened TUSCANY-2589 to continue to 
track this issue past this immediate change.

Modified:
    
tuscany/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
    
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
    
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
    
tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
    
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
    
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
    
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
    
tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
    
tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java

Modified: 
tuscany/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
 (original)
+++ 
tuscany/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
 Tue Sep  9 04:04:01 2008
@@ -75,13 +75,13 @@
 
         Component componentD = TestUtils.getComponent(domainComposite, 
"ComponentD");
         if (!nonWiring) {
-            // Should create component service $promoted$.Service1 on 
innermost component
+            // Should create component service $promoted$Service1 on innermost 
component
             //  ComponentD, with <binding.ws> and uri="/Service1"
             // No other services on ComponentD should have <binding.ws>
             WebServiceBinding wsBinding = null;
             for (ComponentService service : componentD.getServices()) {
                 WebServiceBinding wsb = 
service.getBinding(WebServiceBinding.class);
-                if ("$promoted$.Service1".equals(service.getName())) {
+                if ("$promoted$Service1".equals(service.getName())) {
                     wsBinding = wsb;
                 } else {
                     assert wsb == null;
@@ -89,16 +89,16 @@
             }
             assert "/Service1".equals(wsBinding.getURI());
 
-            // Should create WSDL document for ComponentD/$promoted$.Service1 
with endpoint uri="/Service1"
+            // Should create WSDL document for ComponentD/$promoted$Service1 
with endpoint uri="/Service1"
             Definition def = wsBinding.getWSDLDocument();
             javax.wsdl.Service svc = def.getService(new 
QName("http://builder.itest.sca.tuscany.apache.org/";, "Service3Service")); 
             Port port = svc.getPort("Service3Port");
             assert "/Service1".equals(TestUtils.getPortAddress(port));
         } else {
-            // Should not create component service $promoted$.Service1 on 
innermost component ComponentD
+            // Should not create component service $promoted$Service1 on 
innermost component ComponentD
             // No component services on ComponentD should have <binding.ws>
             for (ComponentService service : componentD.getServices()) {
-                assert !"$promoted$.Service1".equals(service.getName());
+                assert !"$promoted$Service1".equals(service.getName());
                 assert service.getBinding(WebServiceBinding.class) == null;
             }
         }
@@ -168,25 +168,25 @@
 
         Component componentD = TestUtils.getComponent(domainComposite, 
"ComponentD");
         if (!nonWiring) {
-            // Should create component service $promoted$.ComponentB.Service2 
on innermost component
+            // Should create component service 
$promoted$ComponentB$slash$Service2 on innermost component
             //  ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
             wsBinding = null;
             for (ComponentService service : componentD.getServices()) {
-                if 
("$promoted$.ComponentB.Service2".equals(service.getName())) {
+                if 
("$promoted$ComponentB$slash$Service2".equals(service.getName())) {
                     wsBinding = service.getBinding(WebServiceBinding.class);
                 }
             }
             assert "/ComponentB/Service2".equals(wsBinding.getURI());
 
-            // Should create WSDL document for 
ComponentD/$promoted$.ComponentB.Service2 with endpoint 
uri="/ComponentB/Service2"
+            // Should create WSDL document for 
ComponentD/$promoted$ComponentB$slash$Service2 with endpoint 
uri="/ComponentB/Service2"
             def = wsBinding.getWSDLDocument();
             svc = def.getService(new 
QName("http://builder.itest.sca.tuscany.apache.org/";, "Service3Service")); 
             port = svc.getPort("Service3Port");
             assert 
"/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
         } else {
-            // Should not create component service 
$promoted$.ComponentB.Service2 on innermost component ComponentD
+            // Should not create component service 
$promoted$ComponentB$slash$Service2 on innermost component ComponentD
             for (ComponentService service : componentD.getServices()) {
-                assert 
!"$promoted$.ComponentB.Service2".equals(service.getName());
+                assert 
!"$promoted$ComponentB$slash$Service2".equals(service.getName());
             }
         }
 
@@ -204,17 +204,17 @@
         }
 
         if (!nonWiring) {
-            // Should create component service $promoted$.Service1 on 
innermost component
+            // Should create component service $promoted$Service1 on innermost 
component
             //  ComponentD, with <binding.ws> and uri="/Service1"
             wsBinding = null;
             for (ComponentService service : componentD.getServices()) {
-                if ("$promoted$.Service1".equals(service.getName())) {
+                if ("$promoted$Service1".equals(service.getName())) {
                     wsBinding = service.getBinding(WebServiceBinding.class);
                 }
             }
             assert "/Service1".equals(wsBinding.getURI());
 
-            // Should create WSDL document for ComponentD/$promoted$.Service1 
with endpoint uri="/Service1"
+            // Should create WSDL document for ComponentD/$promoted$Service1 
with endpoint uri="/Service1"
             def = wsBinding.getWSDLDocument();
             svc = def.getService(new 
QName("http://builder.itest.sca.tuscany.apache.org/";, "Service3Service")); 
             port = svc.getPort("Service3Port");
@@ -222,15 +222,15 @@
         } else {
             // Should not create component service $promoted$.Service1 on 
innermost component ComponentD
             for (ComponentService service : componentD.getServices()) {
-                assert !"$promoted$.Service1".equals(service.getName());
+                assert !"$promoted$Service1".equals(service.getName());
             }
         }
 
-        // No services on ComponentD should have <binding.ws>, except for 
$promoted$.Service1
-        // and $promoted$.ComponentB.Service2  
+        // No services on ComponentD should have <binding.ws>, except for 
$promoted$Service1
+        // and $promoted$ComponentB$slash$Service2  
         for (ComponentService service : componentD.getServices()) {
-            if (!"$promoted$.Service1".equals(service.getName()) &&
-                !"$promoted$.ComponentB.Service2".equals(service.getName())) {
+            if (!"$promoted$Service1".equals(service.getName()) &&
+                
!"$promoted$ComponentB$slash$Service2".equals(service.getName())) {
                 assert service.getBinding(WebServiceBinding.class) == null;
             }
         }
@@ -334,25 +334,25 @@
         assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
 
         if (!nonWiring) {
-            // Should create component service $promoted$.ComponentB.Service2 
on innermost component
+            // Should create component service 
$promoted$ComponentB$slash$Service2 on innermost component
             //  ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
             wsBinding = null;
             for (ComponentService service : componentD.getServices()) {
-                if 
("$promoted$.ComponentB.Service2".equals(service.getName())) {
+                if 
("$promoted$ComponentB$slash$Service2".equals(service.getName())) {
                     wsBinding = service.getBinding(WebServiceBinding.class);
                 }
             }
             assert "/ComponentB/Service2".equals(wsBinding.getURI());
 
-            // Should create WSDL document for 
ComponentD/$promoted$.ComponentB.Service2 with endpoint 
uri="/ComponentB/Service2"
+            // Should create WSDL document for 
ComponentD/$promoted$ComponentB$slash$Service2 with endpoint 
uri="/ComponentB/Service2"
             def = wsBinding.getWSDLDocument();
             svc = def.getService(new 
QName("http://builder.itest.sca.tuscany.apache.org/";, "Service3Service")); 
             port = svc.getPort("Service3Port");
             assert 
"/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
         } else {
-            // Should not create component service 
$promoted$.ComponentB.Service2 on innermost component ComponentD
+            // Should not create component service 
$promoted$ComponentB$slash$Service2 on innermost component ComponentD
             for (ComponentService service : componentD.getServices()) {
-                assert 
!"$promoted$.ComponentB.Service2".equals(service.getName());
+                assert 
!"$promoted$ComponentB$slash$Service2".equals(service.getName());
             }
         }
 
@@ -370,17 +370,17 @@
         }
 
         if (!nonWiring) {
-            // Should create component service $promoted$.Service1 on 
innermost component
+            // Should create component service $promoted$Service1 on innermost 
component
             //  ComponentD, with <binding.ws> and uri="/Service1"
             wsBinding = null;
             for (ComponentService service : componentD.getServices()) {
-                if ("$promoted$.Service1".equals(service.getName())) {
+                if ("$promoted$Service1".equals(service.getName())) {
                     wsBinding = service.getBinding(WebServiceBinding.class);
                 }
             }
             assert "/Service1".equals(wsBinding.getURI());
 
-            // Should create WSDL document for ComponentD/$promoted$.Service1 
with endpoint uri="/Service1"
+            // Should create WSDL document for ComponentD/$promoted$Service1 
with endpoint uri="/Service1"
             def = wsBinding.getWSDLDocument();
             svc = def.getService(new 
QName("http://builder.itest.sca.tuscany.apache.org/";, "Service3Service")); 
             port = svc.getPort("Service3Port");
@@ -388,7 +388,7 @@
         } else {
             // Should not create component service $promoted$.Service1 on 
innermost component ComponentD
             for (ComponentService service : componentD.getServices()) {
-                assert !"$promoted$.Service1".equals(service.getName());
+                assert !"$promoted$Service1".equals(service.getName());
             }
         }
 
@@ -396,8 +396,8 @@
         //  $promoted$.Service1 and $promoted$.ComponentB.Service2
         for (ComponentService service : componentD.getServices()) {
             if (!"Service3".equals(service.getName()) &&
-                !"$promoted$.Service1".equals(service.getName()) &&
-                !"$promoted$.ComponentB.Service2".equals(service.getName())) {
+                !"$promoted$Service1".equals(service.getName()) &&
+                
!"$promoted$ComponentB$slash$Service2".equals(service.getName())) {
                 assert service.getBinding(WebServiceBinding.class) == null;
             }
         }

Modified: 
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
 (original)
+++ 
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
 Tue Sep  9 04:04:01 2008
@@ -72,7 +72,7 @@
                             // Create a new component service to represent this
                             // component service on the promoted component
                             ComponentService newComponentService = 
assemblyFactory.createComponentService();
-                            newComponentService.setName("$promoted$." + 
component.getName() + "." + componentService.getName());
+                            newComponentService.setName("$promoted$" + 
component.getName() + "$slash$" + componentService.getName());
                             
promotedComponent.getServices().add(newComponentService);
                             
newComponentService.setService(promotedService.getService());
                             
newComponentService.getBindings().addAll(componentService.getBindings());

Modified: 
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
 (original)
+++ 
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
 Tue Sep  9 04:04:01 2008
@@ -54,7 +54,7 @@
                 // Create a new component service to represent this composite
                 // service on the promoted component
                 ComponentService newComponentService = 
assemblyFactory.createComponentService();
-                newComponentService.setName("$promoted$." + 
compositeService.getName());
+                newComponentService.setName("$promoted$" + 
compositeService.getName());
                 promotedComponent.getServices().add(newComponentService);
                 newComponentService.setService(promotedService.getService());
                 
newComponentService.getBindings().addAll(compositeService.getBindings());

Modified: 
tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
 (original)
+++ 
tuscany/java/sca/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
 Tue Sep  9 04:04:01 2008
@@ -206,7 +206,7 @@
                     CompositeService compositeService = 
(CompositeService)componentService.getService();
                     if (compositeService != null) {
                         if (serviceName != null) {
-                            serviceName = "$promoted$." + component.getName() 
+ "." + serviceName;
+                            serviceName = "$promoted$" + component.getName() + 
"$slash$" + serviceName;
                         }
                         componentContext =
                             
((RuntimeComponent)compositeService.getPromotedComponent()).getComponentContext();

Modified: 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
 (original)
+++ 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
 Tue Sep  9 04:04:01 2008
@@ -65,7 +65,7 @@
 
         Definition definition = 
wsdlReader.readWSDL("http://localhost:8086/AccountService?wsdl";);
         assertNotNull(definition);
-        Service service = definition.getService(new 
QName("http://account2/AccountService/$promoted$.ep1";, "AccountService"));
+        Service service = definition.getService(new 
QName("http://account2/AccountService/$promoted$ep1";, "AccountService"));
         Port port = service.getPort("AccountSoapPort");
 
         String endpoint = getEndpoint(port);

Modified: 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
 (original)
+++ 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
 Tue Sep  9 04:04:01 2008
@@ -65,7 +65,7 @@
 
         Definition definition = 
wsdlReader.readWSDL("http://localhost:8085/AccountService?wsdl";);
         assertNotNull(definition);
-        Service service = definition.getService(new 
QName("http://accounts/AccountService/$promoted$.ep1";, "AccountService"));
+        Service service = definition.getService(new 
QName("http://accounts/AccountService/$promoted$ep1";, "AccountService"));
         Port port = service.getPort("AccountSoapPort");
 
         String endpoint = getEndpoint(port);

Modified: 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
 (original)
+++ 
tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
 Tue Sep  9 04:04:01 2008
@@ -65,7 +65,7 @@
 
         Definition definition = 
wsdlReader.readWSDL("http://localhost:8085/services/HelloWorldWebService?wsdl";);
         assertNotNull(definition);
-        Service service = definition.getService(new 
QName("http://helloworld/HelloWorldService/$promoted$.ep1";,
+        Service service = definition.getService(new 
QName("http://helloworld/HelloWorldService/$promoted$ep1";,
                                                           
"HelloWorldService"));
         Port port = service.getPort("HelloWorldSoapPort");
 

Modified: 
tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
 (original)
+++ 
tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
 Tue Sep  9 04:04:01 2008
@@ -204,7 +204,7 @@
                     CompositeService compositeService = 
(CompositeService)componentService.getService();
                     if (compositeService != null) {
                         if (serviceName != null) {
-                            serviceName = "$promoted$." + component.getName() 
+ "." + serviceName;
+                            serviceName = "$promoted$" + component.getName() + 
"$slash$" + serviceName;
                         }
                         componentContext =
                             
((RuntimeComponent)compositeService.getPromotedComponent()).getComponentContext();

Modified: 
tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java?rev=693434&r1=693433&r2=693434&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
 (original)
+++ 
tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
 Tue Sep  9 04:04:01 2008
@@ -731,7 +731,7 @@
                     CompositeService compositeService = 
(CompositeService)componentService.getService();
                     if (compositeService != null) {
                         if (serviceName != null) {
-                            serviceName = "$promoted$." + component.getName() 
+ "." + serviceName;
+                            serviceName = "$promoted$" + component.getName() + 
"$slash$" + serviceName;
                         }
                         componentContext =
                             
((RuntimeComponent)compositeService.getPromotedComponent()).getComponentContext();


Reply via email to