From 2a10590dbf762f008cf32db42bbb36b0579cb633 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Mon, 04 Jun 2007 08:05:35 +0000
Subject: [PATCH] This is another commit related to issue https://opends.dev.java.net/issues/show_bug.cgi?id=1334
---
opends/src/ads/org/opends/admin/ads/DsServiceCliAds.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/opends/src/ads/org/opends/admin/ads/DsServiceCliAds.java b/opends/src/ads/org/opends/admin/ads/DsServiceCliAds.java
index 231eed5..a2cd9d5 100644
--- a/opends/src/ads/org/opends/admin/ads/DsServiceCliAds.java
+++ b/opends/src/ads/org/opends/admin/ads/DsServiceCliAds.java
@@ -33,6 +33,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.opends.admin.ads.DsServiceCliReturnCode.ReturnCode;
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.args.BooleanArgument;
import org.opends.server.util.args.SubCommand;
@@ -126,13 +127,13 @@
// Create-ads subcommand
createAdsSubCmd = new SubCommand(argParser, SubCommandNameEnum.CREATE_ADS
.toString(), true, 1, 1, OPERAND_BACKEND,
- MSGID_DSSERVICE_SUBCMD_CREATE_ADS_DESCRIPTION);
+ MSGID_ADMIN_SUBCMD_CREATE_ADS_DESCRIPTION);
createAdsSubCmd.setHidden(true);
// delete-ads
deleteAdsSubCmd = new SubCommand(argParser,SubCommandNameEnum.DELETE_ADS
- .toString(), true, 1, 1, OPERAND_BACKEND,
- MSGID_DSSERVICE_SUBCMD_DELETE_ADS_DESCRIPTION);
+ .toString(), true, 1, 1, OPERAND_BACKEND,
+ MSGID_ADMIN_SUBCMD_DELETE_ADS_DESCRIPTION);
deleteAdsSubCmd.setHidden(true);
}
@@ -148,7 +149,7 @@
/**
* {@inheritDoc}
*/
- public int performSubCommand(ADSContext adsContext, SubCommand subCmd,
+ public ReturnCode performSubCommand(ADSContext adsContext, SubCommand subCmd,
OutputStream outStream, OutputStream errStream)
throws ADSContextException
{
@@ -161,7 +162,7 @@
adsContext.createAdminData();
helper.createAdministrationSuffix(adsContext.getDirContext(),
backendName);
- return 0;
+ return ReturnCode.SUCCESSFUL;
}
else if (subCmd.getName().equals(deleteAdsSubCmd.getName()))
{
@@ -169,11 +170,11 @@
ADSContextHelper helper = new ADSContextHelper();
helper.removeAdministrationSuffix(adsContext.getDirContext(),
backendName);
- return 0;
+ return ReturnCode.SUCCESSFUL;
}
// Should never occurs: If we are here, it means that the code to
// handle to subcommand is not yet written.
- return 1;
+ return ReturnCode.ERROR_UNEXPECTED;
}
}
--
Gitblit v1.10.0