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

lutoff
01.40.2007 7fa3260d1b3d3902f71f98392b1f8cf0483bc941
opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliAds.java
@@ -41,12 +41,13 @@
import org.opends.admin.ads.ADSContext;
import org.opends.admin.ads.ADSContextException;
import org.opends.admin.ads.ADSContextHelper;
import org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.ReturnCode;
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.args.BooleanArgument;
import org.opends.server.util.args.StringArgument;
import org.opends.server.util.args.SubCommand;
import static org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.*;
/**
 * This class is handling server group CLI.
 */
@@ -215,14 +216,14 @@
  /**
   * {@inheritDoc}
   */
  public ReturnCode performSubCommand(SubCommand subCmd, OutputStream outStream,
      OutputStream errStream)
  public DsFrameworkCliReturnCode performSubCommand(SubCommand subCmd,
      OutputStream outStream, OutputStream errStream)
      throws ADSContextException, ArgumentException
  {
    ADSContext adsCtx = null ;
    InitialLdapContext ctx = null ;
    ReturnCode returnCode = ReturnCode.ERROR_UNEXPECTED;
    DsFrameworkCliReturnCode returnCode = ERROR_UNEXPECTED;
    try
    {
@@ -234,11 +235,11 @@
        ctx = argParser.getContext(outStream, errStream);
        if (ctx == null)
        {
          return ReturnCode.CANNOT_CONNECT_TO_ADS;
          return CANNOT_CONNECT_TO_ADS;
        }
        adsCtx = new ADSContext(ctx);
        adsCtx.createAdminData(backendName);
        returnCode = ReturnCode.SUCCESSFUL;
        returnCode = SUCCESSFUL;
      }
      else if (subCmd.getName().equals(deleteAdsSubCmd.getName()))
      {
@@ -247,18 +248,18 @@
        ctx = argParser.getContext(outStream, errStream);
        if (ctx == null)
        {
          return ReturnCode.CANNOT_CONNECT_TO_ADS;
          return CANNOT_CONNECT_TO_ADS;
        }
        adsCtx = new ADSContext(ctx);
        helper
            .removeAdministrationSuffix(adsCtx.getDirContext(), backendName);
        returnCode =  ReturnCode.SUCCESSFUL;
        returnCode =  SUCCESSFUL;
      }
      else
      {
        // Should never occurs: If we are here, it means that the code to
        // handle to subcommand is not yet written.
        returnCode = ReturnCode.ERROR_UNEXPECTED;
        returnCode = ERROR_UNEXPECTED;
      }
    }
    catch (ADSContextException e)