Hi,

Contribution is the model object that hosts the metadata and introspected result for the contribution. Logically, you can use the URI of the contribution to look up the ContributionService to get the Contribution. I found it simpler for ArtifactResolver extensions to receive Contribution directly.

Thanks,
Raymond

----- Original Message ----- From: "Jeremy Boynes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, March 16, 2007 9:33 AM
Subject: Re: svn commit: r519040 - /incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java


Why?

On Mar 16, 2007, at 9:26 AM, [EMAIL PROTECTED] wrote:

Author: rfeng
Date: Fri Mar 16 09:26:05 2007
New Revision: 519040

URL: http://svn.apache.org/viewvc?view=rev&rev=519040
Log:
Change the ArtifactResolver interface to take Contribution instead of URI

Modified:
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ tuscany/spi/deployer/ArtifactResolver.java

Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/ apache/tuscany/spi/deployer/ArtifactResolver.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/ spi/src/main/java/org/apache/tuscany/spi/deployer/ ArtifactResolver.java?view=diff&rev=519040&r1=519039&r2=519040 ====================================================================== ======== --- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ tuscany/spi/deployer/ArtifactResolver.java (original) +++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ tuscany/spi/deployer/ArtifactResolver.java Fri Mar 16 09:26:05 2007
@@ -19,10 +19,11 @@

 package org.apache.tuscany.spi.deployer;

-import java.net.URI;
 import java.net.URL;
 import java.util.Map;

+import org.apache.tuscany.spi.model.Contribution;
+

 /**
* SCA Assemblies reference many artifacts of a wide variety of types. These
@@ -46,7 +47,7 @@
     /**
      * Resolve an artifact by the qualified name
      *
-     * @param contribution the URI of the contribution
+     * @param contribution the model of the contribution
      * @param modelClass The java type of the artifact
      * @param namespace The namespace of the artifact
      * @param name The name of the artifact
@@ -55,7 +56,7 @@
      * @param context The deployment context
      * @return The resolved artifact
      */
-    <T> T resolve(URI contribution,
+    <T> T resolve(Contribution contribution,
                   Class<T> modelClass,
                   String namespace,
                   String name,
@@ -78,6 +79,6 @@
      *
      * @return The URI of the resolved artifact
      */
- URL resolve(URI contribution, String targetNamespace, String location, String baseURI); + URL resolve(Contribution contribution, String targetNamespace, String location, String baseURI);

 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to