/** * Retrieves the given status record. * * @param restclient REST client instance * @param id Internal JIRA ID of the status * * @return a status instance * * @throws JiraException when the retrieval fails */ public static Status get(RestClient restclient, String id) throws JiraException { JSON result = null; try { result = restclient.get(getBaseUri() + "status/" + id); } catch (Exception ex) { throw new JiraException("Failed to retrieve status " + id, ex); } if (!(result instanceof JSONObject)) throw new JiraException("JSON payload is malformed"); return new Status(restclient, (JSONObject)result); }
/** * Retrieves the given status record. * * @param restclient REST client instance * @param id Internal JIRA ID of the status * * @return a status instance * * @throws JiraException when the retrieval fails */ public static Status get(RestClient restclient, String id) throws JiraException { JSON result = null; try { result = restclient.get(getBaseUri() + "status/" + id); } catch (Exception ex) { throw new JiraException("Failed to retrieve status " + id, ex); } if (!(result instanceof JSONObject)) throw new JiraException("JSON payload is malformed"); return new Status(restclient, (JSONObject)result); }
result = (T)new Resolution(restclient, (JSONObject)r); else if (type == Status.class) result = (T)new Status(restclient, (JSONObject)r); else if (type == User.class) result = (T)new User(restclient, (JSONObject)r);
result = (T)new Resolution(restclient, (JSONObject)r); else if (type == Status.class) result = (T)new Status(restclient, (JSONObject)r); else if (type == Transition.class) result = (T)new Transition(restclient, (JSONObject)r);