summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-06-04 13:54:49 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-06-04 13:54:49 +0000
commit37c624ca7d7bd356aca8e3aabd5103a1c8cf274f (patch)
treec266f2ad2722c7b72f96ee713df6b6f3208d7465 /sca-java-2.x/trunk
parent7655f8ce26db8ad66b4ec924921eba3ad097e8fd (diff)
To keep it as simple as possible for now remove the multiple install methods
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@951411 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java9
-rw-r--r--sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java18
-rw-r--r--sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java16
3 files changed, 12 insertions, 31 deletions
diff --git a/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java b/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
index 73a98816ff..e999a49943 100644
--- a/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
+++ b/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/Section10.java
@@ -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
diff --git a/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java b/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
index 7a204c3278..c8486d3056 100644
--- a/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
+++ b/sca-java-2.x/trunk/modules/domain/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
@@ -66,24 +66,6 @@ public class Section10Impl implements Section10 {
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();
diff --git a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java b/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java
index fad4d87ced..efd0ec9143 100644
--- a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java
+++ b/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java
@@ -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());