/** * Get a list of {@link Issue} objects that match the specified filter data * * @param repository * @param filterData * @return list of issues * @throws IOException */ public List<Issue> getIssues(IRepositoryIdProvider repository, Map<String, String> filterData) throws IOException { return getAll(pageIssues(repository, filterData)); }
/** * Get issues for currently authenticated user * * @param filterData * @return non-null but possibly empty list of issues * @throws IOException */ public List<RepositoryIssue> getIssues(Map<String, String> filterData) throws IOException { return getAll(pageIssues(filterData)); }
/** * Get a list of {@link Issue} objects that match the specified filter data * * @param user * @param repository * @param filterData * @return list of issues * @throws IOException */ public List<Issue> getIssues(String user, String repository, Map<String, String> filterData) throws IOException { return getAll(pageIssues(user, repository, filterData)); }
/** * Get an issue's comments * * @param repository * @param issueNumber * @return list of comments * @throws IOException */ private List<Comment> getComments(String repoId, String issueNumber) throws IOException { if (issueNumber == null) throw new IllegalArgumentException("Issue number cannot be null"); //$NON-NLS-1$ if (issueNumber.length() == 0) throw new IllegalArgumentException("Issue number cannot be empty"); //$NON-NLS-1$ StringBuilder uri = new StringBuilder(SEGMENT_REPOS); uri.append('/').append(repoId); uri.append(SEGMENT_ISSUES); uri.append('/').append(issueNumber); uri.append(SEGMENT_COMMENTS); PagedRequest<Comment> request = createPagedRequest(); request.setUri(uri); request.setType(new TypeToken<List<Comment>>() { }.getType()); return getAll(request); }
request.setUri(uri); request.setType(IssueContainer.class); return getAll(request);