Examples of ADSContextException


Examples of org.nasutekds.admin.ads.ADSContextException

        return ERROR_UNEXPECTED.getReturnCode();
      }
    }

    // perform the subCommand
    ADSContextException adsException = null;
    try
    {
      returnCode = argParser.performSubCommand(out, err);
    }
    catch (ADSContextException e)
    {
      adsException = e;
      returnCode = DsFrameworkCliReturnCode.getReturncodeFromAdsError(e
          .getError());
      if (returnCode == null)
      {
        returnCode = ERROR_UNEXPECTED;
      }
    }
    catch (ArgumentException ae)
    {
      Message message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage());

      err.println(wrapText(message, MAX_LINE_WIDTH));
      return CANNOT_INITIALIZE_ARGS.getReturnCode();
    }

    Message msg = returnCode.getMessage();
    if ( (returnCode == SUCCESSFUL)
         ||
         (returnCode == SUCCESSFUL_NOP))
    {
      if (argParser.isVerbose())
      {
        out.println(wrapText(msg.toString(), MAX_LINE_WIDTH));
      }
    }
    else
    if (msg != null &&
            msg.getDescriptor().getId() != ERR_ADMIN_NO_MESSAGE.getId())
    {
      MessageBuilder mb = new MessageBuilder(INFO_ADMIN_ERROR.get());
      mb.append(msg);
      err.println(wrapText(mb.toString(), MAX_LINE_WIDTH));
      if (argParser.isVerbose() && (adsException != null))
      {
        adsException.printStackTrace();
      }
    }
    return returnCode.getReturnCode();
  }
View Full Code Here

Examples of org.nasutekds.admin.ads.ADSContextException

            break ;
          }
        }
        if ( ! found )
        {
          throw new ADSContextException (ErrorType.NOT_YET_REGISTERED) ;
        }

        // unregister the server
        adsCtx.unregisterServer(map);
      }
View Full Code Here

Examples of org.nasutekds.admin.ads.ADSContextException

            break;
          }
        }
        if ( !found )
        {
          throw new ADSContextException (ErrorType.NOT_YET_REGISTERED) ;
        }

        // Add the server inside the group
        returnCode = addServerTogroup(adsCtx, groupId, foundServerProperties);
      }
View Full Code Here

Examples of org.nasutekds.admin.ads.ADSContextException

      // -----------------------
      else
      {
        // Should never occurs: If we are here, it means that the code
        // to handle to subcommand is not yet written.
        throw new ADSContextException(ErrorType.ERROR_UNEXPECTED);
      }
    }
    catch (ADSContextException e)
    {
      if (ctx != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.