void prepareForPortForward(ContentItem item, String patchId) throws IOException { if (item.getContentType() == ContentType.MODULE) { final File targetFile = delegate.getDirectoryStructure().getModulePatchDirectory(patchId); final List<File> files = listFiles(targetFile); if (files != null && files.size() > 0) { for (final File file : files) { moduleInvalidations.add(file); PatchModuleInvalidationUtils.processFile(IdentityPatchContext.this, file, PatchingTaskContext.Mode.ROLLBACK); } } } }
void prepareForPortForward(ContentItem item, String patchId) throws IOException { if (item.getContentType() == ContentType.MODULE) { final File targetFile = delegate.getDirectoryStructure().getModulePatchDirectory(patchId); final List<File> files = listFiles(targetFile); if (files != null && files.size() > 0) { for (final File file : files) { moduleInvalidations.add(file); PatchModuleInvalidationUtils.processFile(IdentityPatchContext.this, file, PatchingTaskContext.Mode.ROLLBACK); } } } }
@Override public File getTargetFile(ContentItem item) { if (item.getContentType() == ContentType.MISC) { return IdentityPatchContext.this.getTargetFile((MiscContentItem) item); } if (applyPatchId == null || state == State.ROLLBACK_ONLY) { throw new IllegalStateException("cannot process rollback tasks for modules/bundles"); // internal wrong usage, no i18n } final File root; final DirectoryStructure structure = delegate.getDirectoryStructure(); if (item.getContentType() == ContentType.BUNDLE) { root = structure.getBundlesPatchDirectory(applyPatchId); } else { root = structure.getModulePatchDirectory(applyPatchId); } return PatchContentLoader.getModulePath(root, (ModuleItem) item); }
@Override public File getTargetFile(ContentItem item) { if (item.getContentType() == ContentType.MISC) { return IdentityPatchContext.this.getTargetFile((MiscContentItem) item); } if (applyPatchId == null || state == State.ROLLBACK_ONLY) { throw new IllegalStateException("cannot process rollback tasks for modules/bundles"); // internal wrong usage, no i18n } final File root; final DirectoryStructure structure = delegate.getDirectoryStructure(); if (item.getContentType() == ContentType.BUNDLE) { root = structure.getBundlesPatchDirectory(applyPatchId); } else { root = structure.getModulePatchDirectory(applyPatchId); } return PatchContentLoader.getModulePath(root, (ModuleItem) item); }
@Override public File[] getTargetModulePath() { // We need the updated state for invalidating one-off patches // When applying the overlay directory should not exist yet final PatchableTarget.TargetInfo updated = mode == Mode.APPLY ? delegate : delegate.getModifiedState(); return PatchUtils.getModulePath(delegate.getDirectoryStructure(), updated); }
@Override public File[] getTargetBundlePath() { // We need the updated state for invalidating one-off patches // When applying the overlay directory should not exist yet final PatchableTarget.TargetInfo updated = mode == Mode.APPLY ? delegate : delegate.getModifiedState(); return PatchUtils.getBundlePath(delegate.getDirectoryStructure(), updated); }
@Override public File[] getTargetModulePath() { // We need the updated state for invalidating one-off patches // When applying the overlay directory should not exist yet final PatchableTarget.TargetInfo updated = mode == Mode.APPLY ? delegate : delegate.getModifiedState(); return PatchUtils.getModulePath(delegate.getDirectoryStructure(), updated); }
@Override public File[] getTargetBundlePath() { // We need the updated state for invalidating one-off patches // When applying the overlay directory should not exist yet final PatchableTarget.TargetInfo updated = mode == Mode.APPLY ? delegate : delegate.getModifiedState(); return PatchUtils.getBundlePath(delegate.getDirectoryStructure(), updated); }
@Override public DirectoryStructure getDirectoryStructure() { return delegate.getDirectoryStructure(); }
@Override public DirectoryStructure getDirectoryStructure() { return delegate.getDirectoryStructure(); }