final String cumulativePatchID = target.getCumulativePatchID(); if (Constants.BASE.equals(cumulativePatchID)) { reenableRolledBackInBase(target);
final String cumulativePatchID = target.getCumulativePatchID(); if (Constants.BASE.equals(cumulativePatchID)) { reenableRolledBackInBase(target);
static void addMissingModifications(IdentityPatchContext.PatchEntry target, Collection<ContentModification> modifications, final ContentItemFilter filter) throws IOException { final String cpId = target.getCumulativePatchID(); for (final ContentModification modification : modifications) { final ContentItem item = modification.getItem(); // Check if we accept the item if (!filter.accepts(item)) { continue; } final Location location = new Location(item); final ContentTaskDefinition definition = target.get(location); if (definition == null) { target.put(location, new ContentTaskDefinition(location, new ContentEntry(cpId, modification), false)); } else if(definition.isRollback()) { target.prepareForPortForward(item, cpId); definition.setTarget(new ContentEntry(cpId, modification)); } } }
/** * Create a patch element for the rollback patch. * * @param entry the entry * @return the new patch element */ protected static PatchElement createRollbackElement(final PatchEntry entry) { final PatchElement patchElement = entry.element; final String patchId; final Patch.PatchType patchType = patchElement.getProvider().getPatchType(); if (patchType == Patch.PatchType.CUMULATIVE) { patchId = entry.getCumulativePatchID(); } else { patchId = patchElement.getId(); } return createPatchElement(entry, patchId, entry.rollbackActions); }
static void addMissingModifications(IdentityPatchContext.PatchEntry target, Collection<ContentModification> modifications, final ContentItemFilter filter) throws IOException { final String cpId = target.getCumulativePatchID(); for (final ContentModification modification : modifications) { final ContentItem item = modification.getItem(); // Check if we accept the item if (!filter.accepts(item)) { continue; } final Location location = new Location(item); final ContentTaskDefinition definition = target.get(location); if (definition == null) { target.put(location, new ContentTaskDefinition(location, new ContentEntry(cpId, modification), false)); } else if(definition.isRollback()) { target.prepareForPortForward(item, cpId); definition.setTarget(new ContentEntry(cpId, modification)); } } }
/** * Create a patch element for the rollback patch. * * @param entry the entry * @return the new patch element */ protected static PatchElement createRollbackElement(final PatchEntry entry) { final PatchElement patchElement = entry.element; final String patchId; final Patch.PatchType patchType = patchElement.getProvider().getPatchType(); if (patchType == Patch.PatchType.CUMULATIVE) { patchId = entry.getCumulativePatchID(); } else { patchId = patchElement.getId(); } return createPatchElement(entry, patchId, entry.rollbackActions); }