Examples of ResponseCode


Examples of com.betfair.cougar.api.ResponseCode

    baseRequest.setHandled(true);
        final RequestTimer timer = new RequestTimer();
        response.setHeader("Server", VERSION_HEADER);

        long bytesWritten = 0;
        ResponseCode responseCode = ResponseCode.Ok;
    if (IS_STATIC_CONTENT_PATH.matcher(target).matches()) {
      try {
        InputStream rawStream = getClass().getResourceAsStream(target);
        if (rawStream != null) {
                    logger.log(Level.FINE, "Static content stream found for path %s", target);
View Full Code Here

Examples of com.denimgroup.threadfix.service.RemoteProviderTypeService.ResponseCode

    private void processRemoteProviderBulkImport(Integer remoteProviderTypeId, Integer jobStatusId) {
    log.info("Remote Provider Bulk Import job received");
    jobStatusService.updateJobStatus(jobStatusId, "Remote Provider Bulk Import job received");
   
    ResponseCode response = remoteProviderTypeService.importScansForApplications(remoteProviderTypeId);
   
    String message;
   
    switch (response) {
      case BAD_ID:   message = "Remote Provider Bulk Import job failed because no remote provider type was found."; break;
View Full Code Here

Examples of com.denimgroup.threadfix.service.RemoteProviderTypeService.ResponseCode

    }
   
    remoteProviderTypeService.decryptCredentials(
        remoteProviderApplication.getRemoteProviderType());
   
    ResponseCode response = remoteProviderTypeService.importScansForApplication(remoteProviderApplication);
   
    if (response.equals(ResponseCode.SUCCESS)) {
            return RestResponse.success("Do the redirect");
    } else {
      String errorMsg;
      if (response.equals(ResponseCode.ERROR_NO_SCANS_FOUND)) {
        errorMsg = "No scans were found for this Remote Provider application.";
      } else if (response.equals(ResponseCode.ERROR_NO_NEW_SCANS)) {
        errorMsg = "Application already imported scans from this Remote Provider, no newer scans were found. You have to delete old scans before adding new ones.";
      } else {
        errorMsg = "Error when trying to import scans.";
      }
     
View Full Code Here

Examples of com.denimgroup.threadfix.service.RemoteProviderTypeService.ResponseCode

  @PreAuthorize("hasRole('ROLE_CAN_MANAGE_REMOTE_PROVIDERS')")
  @RequestMapping(value="/{typeId}/configure", method = RequestMethod.POST)
  public @ResponseBody Object configureFinish(@PathVariable("typeId") int typeId,
      HttpServletRequest request) {
   
    ResponseCode test = remoteProviderTypeService.checkConfiguration(
        request.getParameter("username"),
        request.getParameter("password"),
        request.getParameter("apiKey"),
                request.getParameter("matchSourceNumbers"),
                request.getParameter("platform"),
                typeId);

    if (test.equals(ResponseCode.BAD_ID)) {
      return RestResponse.failure("Unable to find that Remote Provider Type.");
    } else if (test.equals(ResponseCode.NO_APPS)) {

      String error = "We were unable to retrieve a list of applications using these credentials." +
          " Please ensure that the credentials are valid and that there are applications " +
          "available in the account.";
            log.error(error);
      return RestResponse.failure(error);
    } else if (test.equals(ResponseCode.SUCCESS)) {
            RemoteProviderType type = remoteProviderTypeService.load(typeId);
      return ControllerUtils.writeSuccessObjectWithView(type, AllViews.TableRow.class);
    } else {
            log.warn("Response code was not success but we're still returning success. This shouldn't happen.");
            return RestResponse.failure("Response was " + test);
View Full Code Here

Examples of com.uwyn.drone.protocol.ResponseCode

        ModuleRunner runner  = new ModuleRunner(this, module);
        module.setRunner(runner);
        runner.start();
       
        // register all module hooks
        ResponseCode  response_code = null;
        String      command = null;
        ArrayList    modules = null;
       
        // register response codes
        ResponseCode[]  response_codes = module.getResponseCodes();
View Full Code Here

Examples of com.yahoo.mapkeeper.ResponseCode

                for(String k: values.keySet()) {
                    oldval.put(k, values.get(k));
                }
                values = oldval;
            }
            ResponseCode succ = c.update(table, bufStr(key), encode(values));
            return ycsbThriftRet(succ, ResponseCode.RecordExists, ResponseCode.RecordNotFound);
        } catch(TException e) {
            e.printStackTrace();
            return 2;
        }
View Full Code Here

Examples of net.authorize.ResponseCode

   
    List<DirectResponse> directResponses = result.getDirectResponseList();
    // check ResponseReasonCode to see if it means we should throw an exception
    if (directResponses != null && directResponses.size() > 0) {
      Map<ResponseField,String> directResponseMap = directResponses.get(0).getDirectResponseMap();
      ResponseCode responseCode = ResponseCode.findByResponseCode(directResponseMap.get(ResponseField.RESPONSE_CODE));
      ResponseReasonCode responseReasonCode = ResponseReasonCode.findByReasonCode(directResponseMap.get(ResponseField.RESPONSE_REASON_CODE));

      // check exceptionMap to see if we should throw specific exception
      Class<? extends AuthorizeNetException> exceptionClass = exceptionMap.get(responseReasonCode);
      if (exceptionClass != null) {
View Full Code Here

Examples of org.apache.directory.server.dns.messages.ResponseCode

   
    private static String monitorMessage( DnsMessage message, String direction )
    {
        MessageType messageType = message.getMessageType();
        OpCode opCode = message.getOpCode();
        ResponseCode responseCode = message.getResponseCode();
        int transactionId = message.getTransactionId();

        StringBuffer sb = new StringBuffer();
        sb.append( "Monitoring " + direction + ":" );
        sb.append( "\n\t" + "messageType                " + messageType );
View Full Code Here

Examples of org.apache.directory.server.dns.messages.ResponseCode

   
    private static String monitorMessage( DnsMessage message, String direction )
    {
        MessageType messageType = message.getMessageType();
        OpCode opCode = message.getOpCode();
        ResponseCode responseCode = message.getResponseCode();
        int transactionId = message.getTransactionId();

        StringBuffer sb = new StringBuffer();
        sb.append( "Monitoring " + direction + ":" );
        sb.append( "\n\t" + "messageType                " + messageType );
View Full Code Here

Examples of org.apache.directory.server.dns.messages.ResponseCode

    private static String monitorMessage( DnsMessage message, String direction )
    {
        MessageType messageType = message.getMessageType();
        OpCode opCode = message.getOpCode();
        ResponseCode responseCode = message.getResponseCode();
        int transactionId = message.getTransactionId();

        StringBuffer sb = new StringBuffer();
        sb.append( "Monitoring " + direction + ":" );
        sb.append( "\n\t" + "messageType                " + messageType );
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.