summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/domain-node/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-19 06:55:40 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-19 06:55:40 +0000
commitf78a216e05c75a2e708c26efb7c616b6f1bdf2ba (patch)
treeb28899d9f837c881542e793377a5f475b2335c58 /sca-java-2.x/trunk/modules/domain-node/src/main/java
parent221db4662021e7f5c7e5cf64b127fdff8ccda8ff (diff)
Start adding a method to update an installed contribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1137305 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
index fb98d39ab1..2d7c371975 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
@@ -103,6 +103,26 @@ public class NodeImpl implements Node {
return installContribution(uri, contributionURL, null, null);
}
+ public boolean updateContribution(String uri, String contributionURL, String metaDataURL, List<String> dependentContributionURIs) throws ContributionReadException, ValidationException {
+ ContributionDescription ic = getInstalledContribution(uri);
+ if (ic == null) {
+ installContribution(uri, contributionURL, metaDataURL, dependentContributionURIs);
+ return true;
+ }
+
+ // if url equal and a file and last modified not changed
+ // if metadata url equal and a file and laqst modified not changed
+ // if (dependent contributions uris not changed)
+ // return false
+
+ // uninstall contribution
+ // install contribution
+ // stop/start all started composites using the contribution
+ // remove all stopped composites using the contribution
+
+ return true;
+ }
+
public String installContribution(String uri, String contributionURL, String metaDataURL, List<String> dependentContributionURIs) throws ContributionReadException, ValidationException {
ContributionDescription cd = new ContributionDescription(uri, IOHelper.getLocationAsURL(contributionURL).toString());