tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r527657 - in /incubator/tuscany/java/sca/modules/implementation-script/src: main/java/org/apache/tuscany/implementation/script/ test/resources/
Date Wed, 11 Apr 2007 20:44:55 GMT
Author: antelder
Date: Wed Apr 11 13:44:54 2007
New Revision: 527657

URL: http://svn.apache.org/viewvc?view=rev&rev=527657
Log:
More script implementation componenttype fixes

Modified:
    incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java
    incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java
    incubator/tuscany/java/sca/modules/implementation-script/src/test/resources/helloworld.componentType

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java?view=diff&rev=527657&r1=527656&r2=527657
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java
Wed Apr 11 13:44:54 2007
@@ -108,7 +108,13 @@
 
         scriptImplementation.setScriptSrc(readScript(scriptImplementation.getName()));
 
-        ComponentType componentType = resolver.resolve(ComponentType.class, scriptImplementation.getComponentType());
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        String scriptURI = cl.getResource(scriptImplementation.getName()).toString();
+        int lastDot = scriptURI.lastIndexOf('.');
+        String ctURI = scriptURI.substring(0, lastDot) + ".componentType";
+        ComponentType ct = scriptImplementation.getComponentType();
+        ct.setURI(ctURI);
+        ComponentType componentType = resolver.resolve(ComponentType.class, ct);
         if (componentType.isUnresolved()) {
             throw new ContributionResolveException("missing .componentType side file");
         }

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java?view=diff&rev=527657&r1=527656&r2=527657
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java
Wed Apr 11 13:44:54 2007
@@ -18,8 +18,11 @@
  */
 package org.apache.tuscany.implementation.script;
 
+import java.util.List;
+
 import org.apache.tuscany.assembly.ComponentType;
 import org.apache.tuscany.assembly.Implementation;
+import org.apache.tuscany.assembly.Service;
 import org.apache.tuscany.assembly.impl.ComponentTypeImpl;
 
 /**
@@ -54,6 +57,10 @@
 
     public void setComponentType(ComponentType componentType) {
         this.componentType = componentType;
+    }
+
+    public List<Service> getServices() {
+        return componentType.getServices();
     }
 
     @Override

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/test/resources/helloworld.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/test/resources/helloworld.componentType?view=diff&rev=527657&r1=527656&r2=527657
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/test/resources/helloworld.componentType
(original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/test/resources/helloworld.componentType
Wed Apr 11 13:44:54 2007
@@ -20,7 +20,7 @@
 <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance">
 
   <service name="HelloWorldService">
-        <interface.java class="helloworld.HelloWorldService" />
+        <interface.java interface="org.apache.tuscany.implementation.script.itests.HelloWorld"
/>
   </service>
 
 </componentType>              



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message