Package com.atlassian.jira.rest.client

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


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


  public static DateTime parseDateTime(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(String str) {
    try {
      return JIRA_DATE_FORMATTER.parseDateTime(str);
    } catch (Exception e) {
      throw new RestClientException(e);
    }
  }
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

          @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

            try {
              final int id = Integer.parseInt(key);
              final Transition transition = transitionJsonParser.parse(jsonObject.getJSONObject(key), id);
              transitions.add(transition);
            } catch (JSONException e) {
              throw new RestClientException(e);
            } catch (NumberFormatException e) {
              throw new RestClientException("Transition id should be an integer, but found [" + key + "]", e);
            }
          }
          return transitions;
        }
      }
View Full Code Here

//      }
//
      try {
        final String body = e.getResponse().getEntity(String.class);
        final Collection<String> errorMessages = extractErrors(body);
        throw new RestClientException(errorMessages, e);
      } catch (JSONException e1) {
        throw new RestClientException(e);
      }
    } catch (RestClientException e) {
      throw e;
    } catch (Exception e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here

            try {
              final int id = Integer.parseInt(key);
              final Transition transition = transitionJsonParser.parse(jsonObject.getJSONObject(key), id);
              transitions.add(transition);
            } catch (JSONException e) {
              throw new RestClientException(e);
            } catch (NumberFormatException e) {
              throw new RestClientException("Transition id should be an integer, but found [" + key + "]", e);
            }
          }
          return transitions;
        }
      }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.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.