tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r951411 - in /tuscany/sca-java-2.x/trunk/modules/domain/src: main/java/org/apache/tuscany/sca/something/ main/java/org/apache/tuscany/sca/something/impl/ test/java/org/apache/tuscany/sca/something/
Date Fri, 04 Jun 2010 13:54:49 GMT
Author: antelder
Date: Fri Jun  4 13:54:49 2010
New Revision: 951411

URL: http://svn.apache.org/viewvc?rev=951411&view=rev
Log:
To keep it as simple as possible for now remove the multiple install methods 

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
    tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
    tuscany/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java

Modified: tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java?rev=951411&r1=951410&r2=951411&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
Fri Jun  4 13:54:49 2010
@@ -64,15 +64,14 @@ public interface Section10 {
      * @throws ActivationException 
      * @throws ValidationException 
      */
-    void installContribution(String uri, String contributionURL, List<String> dependentContributionURIs)
throws ContributionReadException, ActivationException, ValidationException;
+    void installContribution(String uri, String contributionURL, List<String> dependentContributionURIs,
boolean deployDeployables) throws ContributionReadException, ActivationException, ValidationException;
+    void installContribution(Contribution contribution, List<String> dependentContributionURIs,
boolean deployDeployables) throws ContributionReadException, ActivationException, ValidationException;
 
-    /* and i'd expect short forms of that for when you don't care or have the others:*/
+    /* Useful short forms of that for when you don't care or have the others (but leave out
for now to keep as simple as possible):
     String installContribution(String contributionURL) throws ContributionReadException,
ActivationException, ValidationException;
     void installContribution(String uri, String contributionURL) throws ContributionReadException,
ActivationException, ValidationException;
-    /* autoDeploy indicates whether or not to automatically deploy the deployables defined
in sca-contribution.xml */
     String installContribution(String contributionURL, boolean autoDeploy) throws ContributionReadException,
ActivationException, ValidationException;
-    void installContribution(String uri, String contributionURL, List<String> dependentContributionURIs,
boolean deployDeployables) throws ContributionReadException, ActivationException, ValidationException;
-    void installContribution(Contribution contribution, List<String> dependentContributionURIs,
boolean autoDeploy) throws ContributionReadException, ActivationException, ValidationException;
+    */
     
     /**
      * 4577 10.5.1 install Contribution & update Contribution

Modified: tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java?rev=951411&r1=951410&r2=951411&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
Fri Jun  4 13:54:49 2010
@@ -66,24 +66,6 @@ public class Section10Impl implements Se
         this.extensionPointRegistry = extensionPointRegistry;
     }
 
-    public String installContribution(String contributionURL) throws ContributionReadException,
ActivationException, ValidationException {
-        installContribution(contributionURL, contributionURL, null, true);
-        return contributionURL;
-    }
-
-    public String installContribution(String contributionURL, boolean deployDeployables)
throws ContributionReadException, ActivationException, ValidationException {
-        installContribution(contributionURL, contributionURL, null, deployDeployables);
-        return contributionURL;
-    }
-
-    public void installContribution(String uri, String contributionURL) throws ContributionReadException,
ActivationException, ValidationException {
-        installContribution(uri, contributionURL, null, true);
-    }
-
-    public void installContribution(String uri, String contributionURL, List<String>
dependentContributionURIs) throws ContributionReadException, ActivationException, ValidationException
{
-        installContribution(uri, contributionURL, dependentContributionURIs, true);
-    }
-    
     public void installContribution(String uri, String contributionURL, List<String>
dependentContributionURIs, boolean deployDeployables) throws ContributionReadException, ActivationException,
ValidationException {
         URL url = IOHelper.getLocationAsURL(contributionURL);
         Monitor monitor = deployer.createMonitor();

Modified: tuscany/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java?rev=951411&r1=951410&r2=951411&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java
Fri Jun  4 13:54:49 2010
@@ -36,7 +36,7 @@ public class Section10TestCase {
     @Test
     public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException,
ContributionReadException, ActivationException, ValidationException {
         Section10 section10 = Section10Factory.createSection10();
-        section10.installContribution("src/test/resources/sample-helloworld.jar");
+        section10.installContribution("helloworld", "src/test/resources/sample-helloworld.jar",
null, true);
 
 //        Helloworld helloworldService = section10.getService(Helloworld.class, "HelloworldComponent");
 //        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
@@ -46,8 +46,8 @@ public class Section10TestCase {
     @Test
     public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException,
ActivationException, ValidationException {
         Section10 section10 = Section10Factory.createSection10();
-        section10.installContribution("/Tuscany/svn/2.x-trunk/itest/T3558/src/test/resources/sample-store.jar");
-        section10.installContribution("/Tuscany/svn/2.x-trunk/itest/T3558/src/test/resources/sample-store-client.jar");
+        section10.installContribution("store", "/Tuscany/svn/2.x-trunk/itest/T3558/src/test/resources/sample-store.jar",
null, true);
+        section10.installContribution("store-client", "/Tuscany/svn/2.x-trunk/itest/T3558/src/test/resources/sample-store-client.jar",
null, true);
 
 //        Helloworld helloworldService = section10.getService(Helloworld.class, "HelloworldComponent");
 //        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
@@ -56,7 +56,7 @@ public class Section10TestCase {
     @Test
     public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException,
ContributionReadException, ActivationException, ValidationException {
         Section10 section10 = Section10Factory.createSection10();
-        String contributionURI = section10.installContribution("src/test/resources/sample-helloworld-nodeployable.jar");
+        section10.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar",
null, true);
 
 //        SCAClientFactory scaClientFactory = section10.getSCAClientFactory();
 //        try {
@@ -66,7 +66,7 @@ public class Section10TestCase {
 //            // expected as there is no deployables
 //        }
 
-        section10.addToDomainLevelComposite(contributionURI + "/helloworld.composite");
+        section10.addToDomainLevelComposite("helloworld" + "/helloworld.composite");
 //        Helloworld helloworldService = scaClientFactory.getService(Helloworld.class, "HelloworldComponent");
 //        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
     }
@@ -74,7 +74,7 @@ public class Section10TestCase {
     @Test
     public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException,
ContributionReadException, ActivationException, ValidationException {
         Section10 section10 = Section10Factory.createSection10();
-        section10.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar");
+        section10.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar",
null, true);
         List<String> ics = section10.getInstalledContributions();
         Assert.assertEquals(1, ics.size());
         Assert.assertEquals("foo", ics.get(0));
@@ -83,7 +83,7 @@ public class Section10TestCase {
     @Test
     public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException,
ContributionReadException, MalformedURLException, ActivationException, ValidationException
{
         Section10 section10 = Section10Factory.createSection10();
-        section10.installContribution("foo", "src/test/resources/sample-helloworld.jar");
+        section10.installContribution("foo", "src/test/resources/sample-helloworld.jar",
null, true);
         List<String> dcs = section10.getDeployedCompostes("foo");
         Assert.assertEquals(1, dcs.size());
         Assert.assertEquals("foo/helloworld.composite", dcs.get(0));
@@ -92,7 +92,7 @@ public class Section10TestCase {
     @Test
     public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException,
ContributionReadException, MalformedURLException, ActivationException, ValidationException
{
         Section10 section10 = Section10Factory.createSection10();
-        section10.installContribution("foo", "src/test/resources/sample-helloworld.jar");
+        section10.installContribution("foo", "src/test/resources/sample-helloworld.jar",
null, true);
         section10.removeFromDomainLevelComposite("foo/helloworld.composite");
         List<String> dcs = section10.getDeployedCompostes("foo");
         Assert.assertEquals(0, dcs.size());



Mime
View raw message