| | |
| | | import org.forgerock.opendj.ldif.LDIFEntryReader; |
| | | import org.forgerock.opendj.ldif.LDIFEntryWriter; |
| | | import org.forgerock.util.Utils; |
| | | import org.forgerock.util.annotations.VisibleForTesting; |
| | | import org.opends.server.api.AlertGenerator; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | * @throws InitializationException |
| | | * If an error occurs. |
| | | */ |
| | | @VisibleForTesting |
| | | void initializeWithPartialSchema() throws InitializationException |
| | | private void initializeWithPartialSchema() throws InitializationException |
| | | { |
| | | File configFileToUse = preInitialization(); |
| | | Schema configEnabledSchema = loadSchemaWithConfigurationEnabled(); |
| | |
| | | try (LDIFEntryWriter writer = new LDIFEntryWriter(exportConfig.getWriter())) |
| | | { |
| | | writer.writeComment(INFO_CONFIG_FILE_HEADER.get().toString()); |
| | | for (Entry entry : new ArrayList<Entry>(backend.getAll())) |
| | | for (Entry entry : new ArrayList<>(backend.getAll())) |
| | | { |
| | | try |
| | | { |
| | |
| | | fileToUse = standardConfigFile; |
| | | } |
| | | |
| | | boolean fileExists = false; |
| | | boolean fileExists; |
| | | try |
| | | { |
| | | fileExists = fileToUse.exists(); |
| | |
| | | latestFileName = name; |
| | | latestTimestamp = timestamp; |
| | | latestCounter = 0; |
| | | continue; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | continue; |
| | | // Ignore. |
| | | } |
| | | } |
| | | else |
| | |
| | | latestFileName = name; |
| | | latestTimestamp = timestamp; |
| | | latestCounter = counter; |
| | | continue; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | continue; |
| | | // Ignore. |
| | | } |
| | | } |
| | | } |