Executes the command
validateOptions();
String domainName = null;
try
{
domainName = (String)operands.firstElement();
DomainConfig domainConfig = getDomainConfig(domainName);
DomainsManager manager = getFeatureFactory().getDomainsManager();
manager.deleteDomain(domainConfig);
deleteLoginInfo();
}
catch (Exception e)
{
CLILogger.getInstance().printDetailMessage(e.getLocalizedMessage());
throw new CommandException(getLocalizedString("CouldNotDeleteDomain",
new Object[] {domainName}));
}
CLILogger.getInstance().printDetailMessage(getLocalizedString("DomainDeleted",
new Object[] {domainName}));