builder = PatchOperationBuilder.Factory.rollback(patchStream, id, rollbackTo, resetConfig); } else { builder = PatchOperationBuilder.Factory.rollbackLast(patchStream, resetConfig);
builder = PatchOperationBuilder.Factory.rollback(patchStream, id, rollbackTo, resetConfig); } else { builder = PatchOperationBuilder.Factory.rollbackLast(patchStream, resetConfig);
@Override protected PatchOperationBuilder createUnconfiguredOperationBuilder(CommandContext ctx) throws CommandException { PatchOperationBuilder builder; String patchId = getPatchId(); if (patchId != null) { builder = PatchOperationBuilder.Factory.rollback(patchStream, patchId, rollbackTo, resetConfiguration); } else { builder = PatchOperationBuilder.Factory.rollbackLast(patchStream, resetConfiguration); } return builder; }
/** * Create a builder to rollback the last applied patch. * * @param resetConfiguration whether to reset the configuration to the previous state * @return the operation builder */ public static PatchOperationBuilder rollbackLast(final boolean resetConfiguration) { return rollbackLast(null, resetConfiguration); }
/** * Create a builder to rollback the last applied patch. * * @param resetConfiguration whether to reset the configuration to the previous state * @return the operation builder */ public static PatchOperationBuilder rollbackLast(final boolean resetConfiguration) { return rollbackLast(null, resetConfiguration); }
@Override protected PatchOperationBuilder createUnconfiguredOperationBuilder(CommandContext ctx) throws CommandException { PatchOperationBuilder builder; String patchId = getPatchId(); if (patchId != null) { builder = PatchOperationBuilder.Factory.rollback(patchStream, patchId, rollbackTo, resetConfiguration); } else { builder = PatchOperationBuilder.Factory.rollbackLast(patchStream, resetConfiguration); } return builder; }