/** * Search for repositories matching query. * * @param query * @return list of repositories * @throws IOException */ public List<SearchRepository> searchRepositories(final String query) throws IOException { return searchRepositories(query, -1); }
/** * Search for repositories matching query. * * @param query * @param startPage * @return list of repositories * @throws IOException */ public List<SearchRepository> searchRepositories(final String query, final int startPage) throws IOException { return searchRepositories(query, null, startPage); }
/** * Search for repositories matching language and query. * * @param query * @param language * @return list of repositories * @throws IOException */ public List<SearchRepository> searchRepositories(final String query, final String language) throws IOException { return searchRepositories(query, language, -1); }
/** * Search for repositories matching search parameters. * * @param params * @return list of repositories * @throws IOException */ public List<SearchRepository> searchRepositories( final Map<String, String> params) throws IOException { return searchRepositories(params, -1); }
/** * Search for repositories matching search parameters. * * @param queryParams * @param startPage * @return list of repositories * @throws IOException */ public List<SearchRepository> searchRepositories( final Map<String, String> queryParams, final int startPage) throws IOException { if (queryParams == null) throw new IllegalArgumentException("Params cannot be null"); //$NON-NLS-1$ if (queryParams.isEmpty()) throw new IllegalArgumentException("Params cannot be empty"); //$NON-NLS-1$ StringBuilder query = new StringBuilder(); for (Entry<String, String> param : queryParams.entrySet()) query.append(param.getKey()).append(':').append(param.getValue()) .append(' '); return searchRepositories(query.toString(), startPage); }