| | |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DirectoryException; |
| | |
| | | |
| | | // Get the backend into which the LDIF should be imported. |
| | | Backend backend; |
| | | ConfigEntry configEntry; |
| | | ArrayList<DN> defaultIncludeBranches; |
| | | |
| | | backend = DirectoryServer.getBackend(backendID); |
| | |
| | | return TaskState.STOPPED_BY_ERROR; |
| | | } |
| | | |
| | | // Get the config entry for this backend. |
| | | configEntry = TaskUtils.getConfigEntry(backend); |
| | | |
| | | defaultIncludeBranches = new ArrayList<DN>(backend.getBaseDNs().length); |
| | | for (DN dn : backend.getBaseDNs()) |
| | | { |
| | |
| | | { |
| | | for (String s : excludeBranchStrings) |
| | | { |
| | | DN excludeBranch = null; |
| | | DN excludeBranch; |
| | | try |
| | | { |
| | | excludeBranch = DN.decode(s); |
| | |
| | | includeBranches = new ArrayList<DN>(); |
| | | for (String s : includeBranchStrings) |
| | | { |
| | | DN includeBranch = null; |
| | | DN includeBranch; |
| | | try |
| | | { |
| | | includeBranch = DN.decode(s); |
| | |
| | | try |
| | | { |
| | | DirectoryServer.notifyExportBeginning(backend, exportConfig); |
| | | backend.exportLDIF(configEntry, baseDNs, exportConfig); |
| | | backend.exportLDIF(exportConfig); |
| | | DirectoryServer.notifyExportEnded(backend, exportConfig, true); |
| | | } |
| | | catch (DirectoryException de) |