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

Yannick Lecaillez
09.52.2016 349333a0c0ad336c28169bb7c543002ed51ec386
Cleanup: Removed deprecated append & replace options.
3 files modified
73 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java 1 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java 68 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
@@ -650,10 +650,6 @@
  public LDIFImportResult importLDIF(LDIFImportConfig importConfig, ServerContext serverContext)
      throws DirectoryException
  {
    if (importConfig.appendToExistingData() || importConfig.replaceExistingEntries())
    {
      throw new UnsupportedOperationException("append/replace mode is not supported by this backend.");
    }
    RuntimeInformation.logInfo();
    // If the rootContainer is open, the backend is initialized by something else.
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -3545,7 +3545,6 @@
      importConfig = new LDIFImportConfig(input);
      importConfig.setIncludeBranches(newLinkedHashSet(getBaseDN()));
      importConfig.setAppendToExistingData(false);
      importConfig.setSkipDNValidation(true);
      // We should not validate schema for replication
      importConfig.setValidateSchema(false);
opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java
@@ -48,12 +48,6 @@
  private static final int DEFAULT_BUFFER_SIZE = 8192;
  /**
   * Indicates whether to append to the existing data set rather than
   * replacing it.
   */
  private boolean appendToExistingData;
  /**
   * Indicates whether to include the objectclasses in the entries
   * read from the import.
   */
@@ -67,8 +61,6 @@
  private boolean isEncrypted;
  /** Indicates whether to clear all base DNs in a backend. */
  private boolean clearBackend;
  /** Indicates whether to replace existing entries when appending data. */
  private boolean replaceExistingEntries;
  /** Indicates whether to perform schema validation on the entries read. */
  private boolean validateSchema = true;
@@ -448,66 +440,6 @@
         new BufferedWriter(new OutputStreamWriter(outputStream));
  }
  /**
   * Indicates whether to append to an existing data set or completely
   * replace it.
   *
   * @return  <CODE>true</CODE> if the import should append to an
   *          existing data set, or <CODE>false</CODE> if not.
   */
  public boolean appendToExistingData()
  {
    return appendToExistingData;
  }
  /**
   * Specifies whether to append to an existing data set or completely
   * replace it.
   *
   * @param  appendToExistingData  Indicates whether to append to an
   *                               existing data set or completely
   *                               replace it.
   */
  public void setAppendToExistingData(boolean appendToExistingData)
  {
    this.appendToExistingData = appendToExistingData;
  }
  /**
   * Indicates whether to replace the existing entry if a duplicate is
   * found or to reject the new entry.  This only applies when
   * appending to an existing data set.
   *
   * @return  <CODE>true</CODE> if an existing entry should be
   *          replaced with the new entry from the provided data set,
   *          or <CODE>false</CODE> if the new entry should be
   *          rejected.
   */
  public boolean replaceExistingEntries()
  {
    return replaceExistingEntries;
  }
  /**
   * Specifies whether to replace the existing entry if a duplicate is
   * found or to reject the new entry.  This only applies when
   * appending to an existing data set.
   *
   * @param  replaceExistingEntries  Indicates whether to replace the
   *                                 existing entry if a duplicate is
   *                                 found or to reject the new entry.
   */
  public void setReplaceExistingEntries(boolean replaceExistingEntries)
  {
    this.replaceExistingEntries = replaceExistingEntries;
  }
  /**