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