You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/05/21 16:46:48 UTC

svn commit: r947029 - /tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java

Author: antelder
Date: Fri May 21 14:46:48 2010
New Revision: 947029

URL: http://svn.apache.org/viewvc?rev=947029&view=rev
Log:
Remove the methods that aren't necessary from whats in the spec, change getSCAClientFactory to be just getService

Modified:
    tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java

Modified: tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java?rev=947029&r1=947028&r2=947029&view=diff
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java (original)
+++ tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java Fri May 21 14:46:48 2010
@@ -20,12 +20,14 @@
 package org.apache.tuscany.sca.something;
 
 import java.io.Reader;
+import java.net.MalformedURLException;
 import java.util.List;
 
 import javax.xml.namespace.QName;
 
-import org.oasisopen.sca.client.SCAClientFactory;
-import org.w3c.dom.Document;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.oasisopen.sca.NoSuchServiceException;
 
 public interface Section10 {
 
@@ -54,12 +56,17 @@ public interface Section10 {
      * 4598 this list to be generated by tooling.     * 
      * @param uri
      * @param contributionURL
+     * @throws MalformedURLException 
+     * @throws ContributionReadException 
      */
-    void installContribution(String uri, String contributionURL, List<String> dependentContributionURIs);
+    void installContribution(String uri, String contributionURL, List<String> dependentContributionURIs) throws ContributionReadException, MalformedURLException;
 
     /* and i'd expect short forms of that for when you don't care or have the others:*/
-    String installContribution(String contributionURL);
-    void installContribution(String uri, String contributionURL);
+    String installContribution(String contributionURL) throws ContributionReadException, MalformedURLException;
+    void installContribution(String uri, String contributionURL) throws ContributionReadException, MalformedURLException;
+    /* autoDeploy indicates whether or not to automatically deploy the deployables defined in sca-contribution.xml */
+    String installContribution(String contributionURL, boolean autoDeploy) throws ContributionReadException, MalformedURLException;
+    void installContribution(String uri, String contributionURL, List<String> dependentContributionURIs, boolean autoDeploy) throws ContributionReadException, MalformedURLException;
     
     /**
      * 4577 10.5.1 install Contribution & update Contribution
@@ -176,9 +183,9 @@ public interface Section10 {
      * 
      * @return
      */
-    Document getDomainLevelComposite();
+    Composite getDomainLevelComposite();
     
-    /* that previous one returns a DOM Document but not sure what would be most appropriate, and having one return a string seems convenient: */
+    /* that previous one returns a Composte object but not sure what would be most appropriate, and having one return a string seems convenient: */
     String getDomainLevelCompositeAsString();
     
     /**
@@ -198,26 +205,6 @@ public interface Section10 {
      */
     Object getQNameDefinition(String contributionURI, QName definition, QName symbolSpace);
 
-    
-    /* do we also need these following ones that are mentioned only indirectly in the spec? */
-    
-    /**
-     * 4783 ...component is stopped and restarted
-     * 
-     * So does there need to be start/stop component methods?
-     */
-    void startComponent(String componentURI);
-    void stopComponent(String componentURI);
-    
-    /**
-     * Section "10.5.3 remove Contribution" talks about removing a "deployed" contribution
-     * which really sounds like undeploy, does that contribution state then become installed
-     * or does it get removed entirely? Either way it seems like you'd want to be able 
-     * to explicitly install/deploy/undeploy/uninstall a contribution 
-     */
-    void deployContribution(String contributionURI);
-    void undeployContribution(String contributionURI);
-
     /**
      * Probably want to be able to stop it all at once so a method called stop or shutdown or destroy
      * though i guess it could be argued that this method may be somewhere else
@@ -225,7 +212,27 @@ public interface Section10 {
     void shutdown();
 
     /**
-     * Would also be convenient to get an SCACLientFactory from this so you can easily get service proxys
+     * Would also be convenient to get service proxys as from SCAClientFactory
      */
-    SCAClientFactory getSCAClientFactory();
+    <T> T getService(Class<T> interfaze, String serviceURI) throws NoSuchServiceException;    
+
+    /* do we also need these following ones that are mentioned only indirectly in the spec? */
+    
+//    /**
+//     * 4783 ...component is stopped and restarted
+//     * 
+//     * So does there need to be start/stop component methods?
+//     */
+//    void startComponent(String componentURI);
+//    void stopComponent(String componentURI);
+    
+//    /**
+//     * Section "10.5.3 remove Contribution" talks about removing a "deployed" contribution
+//     * which really sounds like undeploy, does that contribution state then become installed
+//     * or does it get removed entirely? Either way it seems like you'd want to be able 
+//     * to explicitly install/deploy/undeploy/uninstall a contribution 
+//     */
+//    void deployContribution(String contributionURI);
+//    void undeployContribution(String contributionURI);
+
 }