mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

dugan
25.32.2009 328ec50e683c622586d30aeb9dee55bebdebfe0c
opends/src/server/org/opends/server/tasks/ImportTask.java
@@ -170,6 +170,8 @@
  private boolean replaceExisting = false;
  private boolean skipSchemaValidation = false;
  private boolean clearBackend = false;
  private boolean dnCheckPhase2 = false;
  private String tmpDirectory = null;
  private String backendID = null;
  private String rejectFile = null;
  private String skipFile = null;
@@ -241,6 +243,8 @@
    AttributeType typeIsEncrypted;
    AttributeType typeClearBackend;
    AttributeType typeRandomSeed;
    AttributeType typeTmpDirectory;
    AttributeType typeDNCheckPhase2;
    typeLdifFile =
         getAttributeType(ATTR_IMPORT_LDIF_FILE, true);
@@ -280,6 +284,10 @@
         getAttributeType(ATTR_IMPORT_CLEAR_BACKEND, true);
    typeRandomSeed =
         getAttributeType(ATTR_IMPORT_RANDOM_SEED, true);
    typeTmpDirectory =
         getAttributeType(ATTR_IMPORT_TMP_DIRECTORY, true);
    typeDNCheckPhase2 =
         getAttributeType(ATTR_IMPORT_DN_CHECK_PHASE2, true);
    List<Attribute> attrList;
@@ -323,6 +331,12 @@
    attrList = taskEntry.getAttribute(typeAppend);
    append = TaskUtils.getBoolean(attrList, false);
    attrList = taskEntry.getAttribute(typeDNCheckPhase2);
    dnCheckPhase2 = TaskUtils.getBoolean(attrList, true);
    attrList = taskEntry.getAttribute(typeTmpDirectory);
    tmpDirectory = TaskUtils.getSingleValueString(attrList);
    attrList = taskEntry.getAttribute(typeReplaceExisting);
    replaceExisting = TaskUtils.getBoolean(attrList, false);
@@ -861,6 +875,10 @@
      ArrayList<String> fileList = new ArrayList<String>(ldifFiles);
      importConfig = new LDIFImportConfig(fileList);
    }
    if(tmpDirectory == null)
    {
      tmpDirectory = "import-tmp";
    }
    importConfig.setAppendToExistingData(append);
    importConfig.setReplaceExistingEntries(replaceExisting);
    importConfig.setCompressed(isCompressed);
@@ -873,6 +891,8 @@
    importConfig.setIncludeBranches(includeBranches);
    importConfig.setIncludeFilters(includeFilters);
    importConfig.setValidateSchema(!skipSchemaValidation);
    importConfig.setDNCheckPhase2(dnCheckPhase2);
    importConfig.setTmpDirectory(tmpDirectory);
    // FIXME -- Should this be conditional?
    importConfig.setInvokeImportPlugins(true);