Package com.atlassian.jira.rest.client.api

Examples of com.atlassian.jira.rest.client.api.RestClientException


  public static URI parseURI(final String str) {
    try {
      return new URI(str);
    } catch (URISyntaxException e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here


  public static DateTime parseDateTime(final String str) {
    try {
      return JIRA_DATE_TIME_FORMATTER.parseDateTime(str);
    } catch (Exception e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here

      return JIRA_DATE_TIME_FORMATTER.parseDateTime(str);
    } catch (Exception ignored) {
      try {
        return JIRA_DATE_FORMATTER.parseDateTime(str);
      } catch (Exception e) {
        throw new RestClientException(e);
      }
    }
  }
View Full Code Here

  public static DateTime parseDate(final String str) {
    try {
      return JIRA_DATE_FORMATTER.parseDateTime(str);
    } catch (Exception e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here

      @Override
      public T apply(Response response) {
        try {
          final String body = response.getEntity();
          final Collection<ErrorCollection> errorMessages = extractErrors(response.getStatusCode(), body);
          throw new RestClientException(errorMessages, response.getStatusCode());
        } catch (JSONException e) {
          throw new RestClientException(e, response.getStatusCode());
        }
      }
    };
  }
View Full Code Here

      @Override
      public T apply(@Nullable Response input) {
        try {
          return responseHandler.handle(input);
        } catch (JSONException e) {
          throw new RestClientException(e);
        } catch (IOException e) {
          throw new RestClientException(e);
        }
      }
    };
  }
View Full Code Here

          public InputStream getInputStream() {
            try {
              return new ByteArrayInputStream(generator.generate(bean).toString().getBytes(Charset
                  .forName("UTF-8")));
            } catch (JSONException e) {
              throw new RestClientException(e);
            }
          }
        };
      }
    };
View Full Code Here

      @Override
      public T apply(Response response) {
        try {
          final String body = response.getEntity();
          final Collection<ErrorCollection> errorMessages = extractErrors(response.getStatusCode(), body);
          throw new RestClientException(errorMessages, response.getStatusCode());
        } catch (JSONException e) {
          throw new RestClientException(e, response.getStatusCode());
        }
      }
    };
  }
View Full Code Here

      @Override
      public T apply(@Nullable Response input) {
        try {
          return responseHandler.handle(input);
        } catch (JSONException e) {
          throw new RestClientException(e);
        } catch (IOException e) {
          throw new RestClientException(e);
        }
      }
    };
  }
View Full Code Here

          public InputStream getInputStream() {
            try {
              return new ByteArrayInputStream(generator.generate(bean).toString().getBytes(Charset
                  .forName("UTF-8")));
            } catch (JSONException e) {
              throw new RestClientException(e);
            }
          }
        };
      }
    };
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.RestClientException

Copyright © 2018 www.massapicom. 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.