| | |
| | | private boolean overwrite; |
| | | private boolean skipSchemaValidation; |
| | | private boolean clearBackend; |
| | | private boolean skipDNValidation; |
| | | private String tmpDirectory; |
| | | private int threadCount; |
| | | private String backendID; |
| | |
| | | AttributeType typeRandomSeed = getSchema().getAttributeType(ATTR_IMPORT_RANDOM_SEED); |
| | | AttributeType typeThreadCount = getSchema().getAttributeType(ATTR_IMPORT_THREAD_COUNT); |
| | | AttributeType typeTmpDirectory = getSchema().getAttributeType(ATTR_IMPORT_TMP_DIRECTORY); |
| | | AttributeType typeDNCheckPhase2 = getSchema().getAttributeType(ATTR_IMPORT_SKIP_DN_VALIDATION); |
| | | |
| | | ArrayList<String> ldifFilestmp = asListOfStrings(taskEntry, typeLdifFile); |
| | | ldifFiles = new ArrayList<>(ldifFilestmp.size()); |
| | |
| | | } |
| | | } |
| | | |
| | | skipDNValidation = asBoolean(taskEntry, typeDNCheckPhase2); |
| | | tmpDirectory = asString(taskEntry, typeTmpDirectory); |
| | | backendID = asString(taskEntry, typeBackendID); |
| | | includeBranchStrings = asListOfStrings(taskEntry, typeIncludeBranch); |
| | |
| | | importConfig.setIncludeBranches(includeBranches); |
| | | importConfig.setIncludeFilters(includeFilters); |
| | | importConfig.setValidateSchema(!skipSchemaValidation); |
| | | importConfig.setSkipDNValidation(skipDNValidation); |
| | | importConfig.setTmpDirectory(tmpDirectory); |
| | | importConfig.setThreadCount(threadCount); |
| | | |
| | |
| | | logger.traceException(de); |
| | | |
| | | DirectoryServer.notifyImportEnded(backend, importConfig, false); |
| | | LocalizableMessage msg; |
| | | if (de.getResultCode() == ResultCode.CONSTRAINT_VIOLATION) |
| | | { |
| | | msg = ERR_LDIFIMPORT_ERROR_CONSTRAINT_VIOLATION.get(); |
| | | } |
| | | else |
| | | { |
| | | msg = de.getMessageObject(); |
| | | } |
| | | logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(msg)); |
| | | logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(de.getMessageObject())); |
| | | return TaskState.STOPPED_BY_ERROR; |
| | | } |
| | | catch (Exception e) |