public boolean updateContribution(String uri, String contributionURL, String metaDataURL, List<String> dependentContributionURIs) throws ContributionReadException, ValidationException, ActivationException {
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, "updateContribution" + Arrays.asList(new Object[]{uri, contributionURL, metaDataURL, dependentContributionURIs}));
}
ContributionDescription ic = domainRegistry.getInstalledContribution(uri);
if (ic == null) {
installContribution(uri, contributionURL, metaDataURL, dependentContributionURIs);
return true;
}
// do this if only updating if the contribution has been modified:
// 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
uninstallContribution(uri);
installContribution(uri, contributionURL, metaDataURL, dependentContributionURIs);
// merge in additional deployables
if (ic.getAdditionalDeployables().size() > 0) {
ContributionDescription newIC = getInstalledContribution(uri);
newIC.getAdditionalDeployables().putAll(ic.getAdditionalDeployables());
domainRegistry.updateInstalledContribution(newIC);
}
// stop/start all started composites using the contribution
for (DeployedComposite dc : new ArrayList<DeployedComposite>(startedComposites.values())) {