summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/contrib
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-21 14:46:48 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-21 14:46:48 +0000
commitcc47b6b312f95e09161c834971a9e09aae3acf15 (patch)
tree03a60e17c118a7c6c5215aa0917ea56fb300566e /sca-java-2.x/contrib
parent6c3ad03f7073572a7ab112f53fa50ea31303d614 (diff)
Remove the methods that aren't necessary from whats in the spec, change getSCAClientFactory to be just getService
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@947029 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/contrib')
-rw-r--r--sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java65
1 files changed, 36 insertions, 29 deletions
diff --git a/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java b/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java
index 85a7d1491c..cdde500d54 100644
--- a/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java
+++ b/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/Section10.java
@@ -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);
+
}