void disableBaseModule(final ModuleItem item) throws IOException { if(modulesToDisable.isEmpty()) { modulesToDisable = new ArrayList<File>(); } final File modulePath = PatchContentLoader.getModulePath(getDirectoryStructure().getModuleRoot(), item.getName(), ((ModuleItem)item).getSlot()); final List<File> files = listFiles(modulePath); if (files != null && files.size() > 0) { for (final File file : files) { modulesToDisable.add(file); } } }
void reenableBaseModule(final ModuleItem item) throws IOException { if(modulesToReenable.isEmpty()) { modulesToReenable = new ArrayList<File>(); } final File modulePath = PatchContentLoader.getModulePath(getDirectoryStructure().getModuleRoot(), item.getName(), ((ModuleItem)item).getSlot()); final List<File> files = listFiles(modulePath); if (files != null && files.size() > 0) { for (final File file : files) { modulesToReenable.add(file); } } }
void disableBaseModule(final ModuleItem item) throws IOException { if(modulesToDisable.isEmpty()) { modulesToDisable = new ArrayList<File>(); } final File modulePath = PatchContentLoader.getModulePath(getDirectoryStructure().getModuleRoot(), item.getName(), ((ModuleItem)item).getSlot()); final List<File> files = listFiles(modulePath); if (files != null && files.size() > 0) { for (final File file : files) { modulesToDisable.add(file); } } }
continue; final File modulePath = PatchContentLoader.getModulePath(rollbackEntry.getDirectoryStructure().getModulePatchDirectory(oneOff.getId()), module); rollbackEntry.invalidateRoot(modulePath); if(reenabledModules.isEmpty()) {
continue; final File modulePath = PatchContentLoader.getModulePath(rollbackEntry.getDirectoryStructure().getModulePatchDirectory(oneOff.getId()), module); rollbackEntry.invalidateRoot(modulePath); if(reenabledModules.isEmpty()) {
final IdentityRollbackCallback callback = new IdentityRollbackCallback(patchId, patches, resetConfiguration, identity.getDirectoryStructure()); try { return executeTasks(context, callback);
final IdentityApplyCallback callback = new IdentityApplyCallback(patch, identityEntry.getDirectoryStructure()); try { return executeTasks(context, callback);
final IdentityApplyCallback callback = new IdentityApplyCallback(patch, identityEntry.getDirectoryStructure()); try { return executeTasks(context, callback);
final IdentityRollbackCallback callback = new IdentityRollbackCallback(patchId, patches, resetConfiguration, identity.getDirectoryStructure()); try { return executeTasks(context, callback);
final DirectoryStructure structure = target.getDirectoryStructure(); final File modulesRoot = structure.getModulePatchDirectory(patchId); final File bundlesRoot = structure.getBundlesPatchDirectory(patchId);
final DirectoryStructure structure = target.getDirectoryStructure(); final File modulesRoot = structure.getModulePatchDirectory(patchId); final File bundlesRoot = structure.getBundlesPatchDirectory(patchId);
/** * Cleanup the history directories for all recorded rolled back patches. */ protected void cleanupRollbackPatchHistory() { final DirectoryStructure structure = getDirectoryStructure(); for (final String rollback : rollbacks) { if (!IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(rollback))) { failedToCleanupDir(structure.getBundlesPatchDirectory(rollback)); } if (!IoUtils.recursiveDelete(structure.getModulePatchDirectory(rollback))) { failedToCleanupDir(structure.getModulePatchDirectory(rollback)); } } } }
@Override public void operationCancelled(IdentityPatchContext context) { // Cleanup history, bundles and module patch directories final InstalledImage image = structure.getInstalledImage(); IoUtils.recursiveDelete(image.getPatchHistoryDir(patchId)); IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(patchId)); IoUtils.recursiveDelete(structure.getModulePatchDirectory(patchId)); for (final PatchElement element : original.getElements()) { boolean addOn = element.getProvider().isAddOn(); final IdentityPatchContext.PatchEntry entry = context.getEntry(element.getProvider().getName(), addOn); final DirectoryStructure structure = entry.getDirectoryStructure(); IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(element.getId())); IoUtils.recursiveDelete(structure.getModulePatchDirectory(element.getId())); } }
@Override public void operationCancelled(IdentityPatchContext context) { // Cleanup history, bundles and module patch directories final InstalledImage image = structure.getInstalledImage(); IoUtils.recursiveDelete(image.getPatchHistoryDir(patchId)); IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(patchId)); IoUtils.recursiveDelete(structure.getModulePatchDirectory(patchId)); for (final PatchElement element : original.getElements()) { boolean addOn = element.getProvider().isAddOn(); final IdentityPatchContext.PatchEntry entry = context.getEntry(element.getProvider().getName(), addOn); final DirectoryStructure structure = entry.getDirectoryStructure(); IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(element.getId())); IoUtils.recursiveDelete(structure.getModulePatchDirectory(element.getId())); } }
/** * Cleanup the history directories for all recorded rolled back patches. */ protected void cleanupRollbackPatchHistory() { final DirectoryStructure structure = getDirectoryStructure(); for (final String rollback : rollbacks) { if (!IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(rollback))) { failedToCleanupDir(structure.getBundlesPatchDirectory(rollback)); } if (!IoUtils.recursiveDelete(structure.getModulePatchDirectory(rollback))) { failedToCleanupDir(structure.getModulePatchDirectory(rollback)); } } } }
void reenableBaseModule(final ModuleItem item) throws IOException { if(modulesToReenable.isEmpty()) { modulesToReenable = new ArrayList<File>(); } final File modulePath = PatchContentLoader.getModulePath(getDirectoryStructure().getModuleRoot(), item.getName(), ((ModuleItem)item).getSlot()); final List<File> files = listFiles(modulePath); if (files != null && files.size() > 0) { for (final File file : files) { modulesToReenable.add(file); } } }