@Override public void deleteDeployment(byte[] deploymentHash) { localRepository.deleteDeployment(deploymentHash); }
@Override public void deleteDeployment(byte[] deploymentHash) { localRepository.deleteDeployment(deploymentHash); }
@Override void removeContent(String name, List<byte[]> hashes) { for (byte[] hash : hashes) { try { if (fileRepository != null) { fileRepository.deleteDeployment(hash); } } catch (Exception e) { DEPLOYMENT_LOGGER.debugf(e, "Exception occurred removing %s", Arrays.asList(hash)); } } } }
@Override public void deleteDeployment(ContentReference reference) { if (hasContent(reference.getHash())) {//Don't delete referenced content in the back removeContent(reference); } else { localRepository.deleteDeployment(reference); removeContent(reference); } }
@Override public void deleteDeployment(ContentReference reference) { if (hasContent(reference.getHash())) {//Don't delete referenced content in the back removeContent(reference); } else { localRepository.deleteDeployment(reference); removeContent(reference); } }
@Override void removeContent(PathAddress address, Set<String> newHashes, List<byte[]> hashes) { for (byte[] hash : hashes) { try { if (contentRepository.hasContent(hash)) { contentRepository.removeContent(ModelContentReference.fromModelAddress(address, hash)); } else if (newHashes.isEmpty() || !newHashes.contains(HashUtil.bytesToHexString(hash))) { fileRepository.deleteDeployment(ModelContentReference.fromModelAddress(address, hash)); } else { ROOT_LOGGER.undeployingDeploymentHasBeenRedeployed(address.getLastElement().getValue()); } } catch (Exception e) { ROOT_LOGGER.debugf(e, "Exception occurred removing %s", Arrays.asList(hash)); } } } }
@Override void removeContent(PathAddress address, Set<String> newHashes, List<byte[]> hashes) { for (byte[] hash : hashes) { try { if (contentRepository.hasContent(hash)) { contentRepository.removeContent(ModelContentReference.fromModelAddress(address, hash)); } else if (newHashes.isEmpty() || !newHashes.contains(HashUtil.bytesToHexString(hash))) { fileRepository.deleteDeployment(ModelContentReference.fromModelAddress(address, hash)); } else { ROOT_LOGGER.undeployingDeploymentHasBeenRedeployed(address.getLastElement().getValue()); } } catch (Exception e) { ROOT_LOGGER.debugf(e, "Exception occurred removing %s", Arrays.asList(hash)); } } } }