@Override public boolean syncContent(ContentReference reference) { return hasContent(reference.getHash()); }
@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); } }
DeploymentHandlerUtil.ContentItem addFromHash(ContentReference reference) throws OperationFailedException { if (!contentRepository.syncContent(reference)) { throw ServerLogger.ROOT_LOGGER.noSuchDeploymentContent(reference.getHexHash()); } return new DeploymentHandlerUtil.ContentItem(reference.getHash()); }
DeploymentHandlerUtil.ContentItem addFromHash(ContentReference reference) throws OperationFailedException { if (!contentRepository.syncContent(reference)) { throw ServerLogger.ROOT_LOGGER.noSuchDeploymentContent(reference.getHexHash()); } return new DeploymentHandlerUtil.ContentItem(reference.getHash()); }
contentPath = Paths.get(reference.getContentIdentifier()); } else { contentPath = getDeploymentContentFile(reference.getHash(), false); if(!lock(reference.getHash())) { DeploymentRepositoryLogger.ROOT_LOGGER.contentDeletionError(DeploymentRepositoryLogger.ROOT_LOGGER.errorLockingDeployment(), contentPath.toString()); return; } finally { if (HashUtil.isEachHexHashInTable(reference.getHexHash())) { unlock(reference.getHash());
@Override public void removeContent(ContentReference reference) { final Path realFile = getDeploymentContentFile(reference.getHash()); super.removeContent(reference); if (!Files.exists(realFile)) { try (Git git = gitRepository.getGit()) { Set<String> deletedFiles = git.status().call().getMissing(); RmCommand rmCommand = git.rm(); for (String file : deletedFiles) { rmCommand.addFilepattern(file); } rmCommand.addFilepattern(gitRepository.getPattern(realFile)).call(); } catch (GitAPIException ex) { throw new RuntimeException(ex); } } }
@Override public void removeContent(ContentReference reference) { final Path realFile = getDeploymentContentFile(reference.getHash()); super.removeContent(reference); if (!Files.exists(realFile)) { try (Git git = gitRepository.getGit()) { Set<String> deletedFiles = git.status().call().getMissing(); RmCommand rmCommand = git.rm(); for (String file : deletedFiles) { rmCommand.addFilepattern(file); } rmCommand.addFilepattern(gitRepository.getPattern(realFile)).call(); } catch (GitAPIException ex) { throw new RuntimeException(ex); } } }