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

jvergara
30.51.2009 ad538a4677b2acebc4b0968907c801172faa2d47
opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
@@ -63,6 +63,8 @@
import org.opends.server.admin.std.client.*;
import org.opends.server.admin.std.meta.*;
import org.opends.server.backends.task.TaskState;
import org.opends.server.core.DirectoryServer;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.messages.CoreMessages;
import org.opends.messages.JebMessages;
import org.opends.messages.ReplicationMessages;
@@ -77,6 +79,7 @@
import org.opends.server.types.Entry;
import org.opends.server.types.ExistingFileBehavior;
import org.opends.server.types.LDIFExportConfig;
import org.opends.server.types.OpenDsException;
import org.opends.server.util.LDIFException;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.SetupUtils;
@@ -337,6 +340,29 @@
    }
  }
  /**
   * Deletes a backend on the server.  It assumes the server is stopped.
   * @param backendName the name of the backend to be deleted.
   * @throws ApplicationException if something goes wrong.
   */
  public void deleteBackend(String backendName)
  throws ApplicationException
  {
    try
    {
      // Read the configuration file.
      String dn = Utilities.getRDNString("ds-cfg-backend-id",
          backendName)+",cn=Backends,cn=config";
      Utilities.deleteConfigSubtree(
          DirectoryServer.getConfigHandler(), DN.decode(dn));
    }
    catch (OpenDsException ode)
    {
      throw new ApplicationException(
          ReturnCode.CONFIGURATION_ERROR, ode.getMessageObject(), ode);
    }
  }
  /**
   * Creates a local database backend on the server.