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

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


          .put(EXPAND_ATTRIBUTE, ImmutableList.copyOf(expandosValues))
          .putOpt(START_AT_ATTRIBUTE, startAt)
          .putOpt(MAX_RESULTS_ATTRIBUTE, maxResults)
          .putOpt(FIELDS_ATTRIBUTE, fields);
    } catch (JSONException e) {
      throw new RestClientException(e);
    }
    return postAndParse(searchUri, postEntity, searchResultJsonParser);
  }
View Full Code Here


        break;
      case LATER:
        posValue = "Later";
        break;
      default:
        throw new RestClientException("Unsupported position [" + versionPosition + "]", null);
    }
    res.put("position", posValue);
    return res;
  }
View Full Code Here

          break;
        case UNASSIGNED:
          assigneeTypeStr = AssigneeTypeConstants.UNASSIGNED;
          break;
        default:
          throw new RestClientException("Unexpected assignee type [" + assigneeType + "]", null);
      }
      res.put("assigneeType", assigneeTypeStr);
    }
    return res;
  }
View Full Code Here

  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 BasicProjectRole apply(@Nullable final String key) {
                try {
                  return new BasicProjectRole(JsonParseUtil.parseURI(json.getString(key)), key);
                } catch (JSONException e) {
                  throw new RestClientException(e);
                }
              }
            }
        ));
  }
View Full Code Here

  @Override
  public T claim() {
    try {
      return delegate.claim();
    } catch (RestClientException 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

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.