summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-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());