| | |
| | | |
| | | // The backend information necessary to make an import or export. |
| | | private Backend backend; |
| | | private List<DN> branches = new ArrayList<DN>(0); |
| | | |
| | | private int listenerThreadNumber = 10; |
| | | |
| | |
| | | } |
| | | |
| | | this.backend = domainBackend; |
| | | this.branches = new ArrayList<DN>(backendCfg.getBackendBaseDN().size()); |
| | | for (DN dn : backendCfg.getBackendBaseDN()) |
| | | { |
| | | this.branches.add(dn); |
| | | } |
| | | |
| | | if (! domainBackend.supportsLDIFImport()) |
| | | { |
| | | int msgID = MSGID_LDIFIMPORT_CANNOT_IMPORT; |
| | |
| | | // Stop saving state |
| | | stateSavingDisabled = true; |
| | | |
| | | // Clear the backend |
| | | clearJEBackend(false,backend.getBackendID(),null); |
| | | |
| | | // FIXME setBackendEnabled should be part of TaskUtils ? |
| | | TaskUtils.disableBackend(backend.getBackendID()); |
| | | |
| | |
| | | ieContext.ldifImportInputStream = new ReplLDIFInputStream(this); |
| | | importConfig = |
| | | new LDIFImportConfig(ieContext.ldifImportInputStream); |
| | | importConfig.setIncludeBranches(this.branches); |
| | | List<DN> includeBranches = new ArrayList<DN>(); |
| | | includeBranches.add(this.baseDN); |
| | | importConfig.setIncludeBranches(includeBranches); |
| | | importConfig.setAppendToExistingData(false); |
| | | |
| | | // TODO How to deal with rejected entries during the import |
| | | // importConfig.writeRejectedEntries("rejectedImport", |