@Override public void finishPatch(final Patch processedPatch, final RollbackPatch rollbackPatch, final IdentityPatchContext context) throws Exception { final File historyDir = structure.getInstalledImage().getPatchHistoryDir(patchId); if (!historyDir.exists()) { historyDir.mkdirs(); } // Backup the current active patch Info final File timestamp = new File(historyDir, Constants.TIMESTAMP); PatchUtils.writeRef(timestamp, generateTimestamp()); // Persist the processed patch, which contains the records of changes final File backupPatchXml = new File(historyDir, PatchXml.PATCH_XML); IdentityPatchContext.writePatch(processedPatch, backupPatchXml); // Persist the rollback.xml in the history directory final File rollbackPatchXml = new File(historyDir, Constants.ROLLBACK_XML); IdentityPatchContext.writePatch(rollbackPatch, rollbackPatchXml); // Backup the configuration context.backupConfiguration(); }
@Override public void finishPatch(final Patch processedPatch, final RollbackPatch rollbackPatch, final IdentityPatchContext context) throws Exception { final File historyDir = structure.getInstalledImage().getPatchHistoryDir(patchId); if (!historyDir.exists()) { historyDir.mkdirs(); } // Backup the current active patch Info final File timestamp = new File(historyDir, Constants.TIMESTAMP); PatchUtils.writeRef(timestamp, generateTimestamp()); // Persist the processed patch, which contains the records of changes final File backupPatchXml = new File(historyDir, PatchXml.PATCH_XML); IdentityPatchContext.writePatch(processedPatch, backupPatchXml); // Persist the rollback.xml in the history directory final File rollbackPatchXml = new File(historyDir, Constants.ROLLBACK_XML); IdentityPatchContext.writePatch(rollbackPatch, rollbackPatchXml); // Backup the configuration context.backupConfiguration(); }