OPENDJ-2773 Fix upgrade
Removed ldif-diff and make-ldiff during upgrade because they have been
replaced by sdk's ldifdiff and makeldif with OPENDJ-2772.
| | |
| | | "objectClass: ds-cfg-local-backend") |
| | | ); |
| | | register("4.0.0", moveSubordinateBaseDnToGlobalConfiguration()); |
| | | register("4.0.0", |
| | | removeTools("ldif-diff", "make-ldif") |
| | | ); |
| | | |
| | | /* All upgrades will refresh the server configuration schema and generate a new upgrade folder. */ |
| | | registerLast( |
| | |
| | | { |
| | | for (final String jarFileName : jarFileNames) |
| | | { |
| | | final File f = new File(libDirectory, jarFileName + ".jar"); |
| | | if (f.exists()) |
| | | { |
| | | f.delete(); |
| | | } |
| | | deleteFileIfExists(new File(libDirectory, jarFileName + ".jar")); |
| | | } |
| | | } |
| | | |
| | |
| | | }; |
| | | } |
| | | |
| | | static UpgradeTask removeTools(final String... toolNames) |
| | | { |
| | | return new AbstractUpgradeTask() { |
| | | @Override |
| | | public void perform(final UpgradeContext context) throws ClientException { |
| | | for (final String toolName : toolNames) |
| | | { |
| | | deleteFileIfExists(new File(binDirectory, toolName)); |
| | | deleteFileIfExists(new File(batDirectory, toolName + ".bat")); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | /** Prevent instantiation. */ |
| | | private UpgradeTasks() |
| | | { |
| | |
| | | import org.forgerock.opendj.ldif.LDIF; |
| | | import org.forgerock.opendj.ldif.LDIFEntryReader; |
| | | import org.forgerock.opendj.ldif.LDIFEntryWriter; |
| | | import org.forgerock.util.Reject; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.util.ChangeOperationType; |
| | | import org.opends.server.util.SchemaUtils; |
| | |
| | | } |
| | | } |
| | | |
| | | static void deleteFileIfExists(final File f) |
| | | { |
| | | Reject.ifNull(f); |
| | | if (f.exists()) |
| | | { |
| | | f.delete(); |
| | | } |
| | | } |
| | | |
| | | /** Prevent instantiation. */ |
| | | private UpgradeUtils() |
| | | { |