/** * Executes an HTTP DELETE with the given path. * * @param path Path to be appended to the URI supplied in the construtor * * @return JSON-encoded result or null when there's no content returned * * @throws RestException when an HTTP-level error occurs * @throws IOException when an error reading the response occurs * @throws URISyntaxException when an error occurred appending the path to the URI */ public JSON delete(String path) throws RestException, IOException, URISyntaxException { return delete(buildURI(path)); }
/** * Executes an HTTP DELETE with the given path. * * @param path Path to be appended to the URI supplied in the construtor * * @return JSON-encoded result or null when there's no content returned * * @throws RestException when an HTTP-level error occurs * @throws IOException when an error reading the response occurs * @throws URISyntaxException when an error occurred appending the path to the URI */ public JSON delete(String path) throws RestException, IOException, URISyntaxException { return delete(buildURI(path)); }
/** * Removes the current user's vote from the issue. * * @throws JiraException when the voting fails */ public void unvote() throws JiraException { try { restclient.delete(getRestUri(key) + "/votes"); } catch (Exception ex) { throw new JiraException("Failed to unvote on issue " + key, ex); } }
/** * Removes the current user's vote from the issue. * * @throws JiraException when the voting fails */ public void unvote() throws JiraException { try { restclient.delete(getRestUri(key) + "/votes"); } catch (Exception ex) { throw new JiraException("Failed to unvote on issue " + key, ex); } }
/** * Deletes this issue link record. * * @throws JiraException when the delete fails */ public void delete() throws JiraException { try { restclient.delete(getBaseUri() + "issueLink/" + id); } catch (Exception ex) { throw new JiraException("Failed to delete issue link " + id, ex); } }
public void logout(RestClient client) throws JiraException { if (token != null) { try { client.delete(Resource.getAuthUri() + "session"); } catch (Exception e) { throw new JiraException("Failed to logout", e); } } }
/** * Deletes this issue link record. * * @throws JiraException when the delete fails */ public void delete() throws JiraException { try { restclient.delete(getBaseUri() + "issueLink/" + id); } catch (Exception ex) { throw new JiraException("Failed to delete issue link " + 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); } } }
/** * Removes an attachments. * * @param attachmentId attachment id to remove * * @throws JiraException when the attachment removal fails */ public void removeAttachment(String attachmentId) throws JiraException { if (attachmentId == null) { throw new NullPointerException("attachmentId may not be null"); } try { restclient.delete(getBaseUri() + "attachment/" + attachmentId); } catch (Exception ex) { throw new JiraException("Failed remove attachment " + attachmentId, 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); } } }
/** * Removes a watcher to the issue. * * @param username Username of the watcher to remove * * @throws JiraException when the operation fails */ public void deleteWatcher(String username) throws JiraException { try { final String u = username; Map<String, String> connectionParams = new HashMap<String, String>(); connectionParams.put("username", u); URI uri = restclient.buildURI( getRestUri(key) + "/watchers", connectionParams); restclient.delete(uri); } catch (Exception ex) { throw new JiraException( "Failed to remove watch (" + username + ") from issue " + key, ex ); } }
public boolean delete(final boolean deleteSubtasks) throws JiraException { boolean result; try { URI uri = restclient.buildURI(getBaseUri() + "issue/" + this.key, new HashMap<String, String>() {{ put("deleteSubtasks", String.valueOf(deleteSubtasks)); }}); result = (restclient.delete(uri) == null); } catch (Exception ex) { throw new JiraException("Failed to delete issue " + key, ex); } return result; }
/** * Removes a watcher to the issue. * * @param username Username of the watcher to remove * * @throws JiraException when the operation fails */ public void deleteWatcher(String username) throws JiraException { try { final String u = username; URI uri = restclient.buildURI( getRestUri(key) + "/watchers", new HashMap<String, String>() {{ put("username", u); }}); restclient.delete(uri); } catch (Exception ex) { throw new JiraException( "Failed to remove watch (" + username + ") from issue " + key, ex ); } }