/** * Updates the artifacts found in the artifacts to be updated list * * @param artifactsToUpdate list of artifacts to update */ public void updateArtifacts(List<Artifact> artifactsToUpdate) { for (Object artifact : artifactsToUpdate) { Artifact artifactToUpdate = (Artifact) artifact; try { Deployer deployer = getDeployer(artifactToUpdate.getType()); if (deployer != null) { Object artifactKey = deployer.update(artifactToUpdate); artifactToUpdate.setKey(artifactKey); addToDeployedArtifacts(artifactToUpdate); } else { throw new CarbonDeploymentException( "Deployer instance cannot be found for " + "the type : " + artifactToUpdate.getType()); } } catch (CarbonDeploymentException e) { // TODO : Handle faulty artifact deployment logger.error("Error while updating artifacts", e); } } }