Examples of RedmineInternalError


Examples of com.taskadapter.redmineapi.RedmineInternalError

    try {
      authKey = "Basic "
          + Base64.encodeBase64String(
              (login + ':' + password).getBytes(charset)).trim();
    } catch (UnsupportedEncodingException e) {
      throw new RedmineInternalError(e);
    }
  }
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

      jsWriter.object();
      writer.write(jsWriter, object);
      jsWriter.endObject();
      jsWriter.endObject();
    } catch (JSONException e) {
      throw new RedmineInternalError("Unexpected JSONException", e);
    }

    return swriter.toString();
  }
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

      }
      uri = URIUtils.createURI(url.getProtocol(), url.getHost(),
          url.getPort(), path,
          URLEncodedUtils.format(params, "UTF-8"), null);
    } catch (URISyntaxException e) {
      throw new RedmineInternalError(e);
    }
    return uri;
  }
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

  }

  private String getConfig(Class<?> item) {
    final String guess = urls.get(item);
    if (guess == null)
      throw new RedmineInternalError("Unsupported item class "
          + item.getCanonicalName());
    return guess;
  }
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

    final StringWriter writer = new StringWriter();
    final JSONWriter jsonWriter = new JSONWriter(writer);
    try {
      jsonWriter.object().key("user_id").value(userId).endObject();
    } catch (JSONException e) {
      throw new RedmineInternalError("Unexpected exception", e);
    }
    String body = writer.toString();
    setEntity(httpPost, body);
    String response = getCommunicator().sendRequest(httpPost);
    logger.debug(response);
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

    final StringWriter writer = new StringWriter();
    final JSONWriter jsonWriter = new JSONWriter(writer);
    try {
      jsonWriter.object().key("user_id").value(watcherId).endObject();
    } catch (JSONException e) {
      throw new RedmineInternalError("Unexpected exception", e);
    }
    String body = writer.toString();
    setEntity(httpPost, body);
    String response = getCommunicator().sendRequest(httpPost);
    logger.debug(response);
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

  private static void setEntity(HttpEntityEnclosingRequest request, String body, String contentType) {
    StringEntity entity;
    try {
      entity = new StringEntity(body, CHARSET);
    } catch (UnsupportedEncodingException e) {
      throw new RedmineInternalError("Required charset " + CHARSET
          + " is not supported", e);
    }
    entity.setContentType(contentType);
    request.setEntity(entity);
  }
View Full Code Here

Examples of com.taskadapter.redmineapi.RedmineInternalError

  @SuppressWarnings("unchecked")
  private <T> EntityConfig<T> getConfig(Class<?> class1) {
    final EntityConfig<?> guess = OBJECT_CONFIGS.get(class1);
    if (guess == null)
      throw new RedmineInternalError("Unsupported class " + class1);
    return (EntityConfig<T>) guess;
  }
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.