/** * Deletes a component from a project. * * @throws JiraException failed to delete the component */ public void delete() throws JiraException { try { restclient.delete(getRestUri(id)); } catch (Exception ex) { throw new JiraException("Failed to delete component " + id, ex); } } }
/** * Deletes a component from a project. * * @throws JiraException failed to delete the component */ public void delete() throws JiraException { try { restclient.delete(getRestUri(id)); } catch (Exception ex) { throw new JiraException("Failed to delete component " + id, ex); } } }
/** * Retrieves the given component record. * * @param restclient REST client instance * @param id Internal JIRA ID of the component * * @return a component instance * * @throws JiraException when the retrieval fails */ public static Component get(RestClient restclient, String id) throws JiraException { JSON result = null; try { result = restclient.get(getRestUri(id)); } catch (Exception ex) { throw new JiraException("Failed to retrieve component " + id, ex); } if (!(result instanceof JSONObject)) throw new JiraException("JSON payload is malformed"); return new Component(restclient, (JSONObject)result); }
/** * Retrieves the given component record. * * @param restclient REST client instance * @param id Internal JIRA ID of the component * * @return a component instance * * @throws JiraException when the retrieval fails */ public static Component get(RestClient restclient, String id) throws JiraException { JSON result = null; try { result = restclient.get(getRestUri(id)); } catch (Exception ex) { throw new JiraException("Failed to retrieve component " + id, ex); } if (!(result instanceof JSONObject)) throw new JiraException("JSON payload is malformed"); return new Component(restclient, (JSONObject)result); }