use of org.eclipse.che.plugin.github.shared.GitHubRepositoryList in project che by eclipse.
the class GitHubDTOFactory method createRepositoriesList.
/**
* Create DTO object of GitHub repositories collection from given repository
* @param ghRepository repository from kohsuke GitHub library
* @return DTO object
* @throws IOException
*/
public GitHubRepositoryList createRepositoriesList(GHRepository ghRepository) throws ApiException, IOException {
GitHubRepositoryList dtoRepositoriesList = DtoFactory.getInstance().createDto(GitHubRepositoryList.class);
List<GitHubRepository> dtoRepositories = new ArrayList<>();
dtoRepositories.add(createRepository(ghRepository));
dtoRepositoriesList.setRepositories(dtoRepositories);
return dtoRepositoriesList;
}
use of org.eclipse.che.plugin.github.shared.GitHubRepositoryList in project che by eclipse.
the class GitHubDTOFactory method createRepositoriesList.
/**
* Create DTO object of GitHub repositories collection from given repositories list
* @param ghRepositoriesList collection of repositories from kohsuke GitHub library
* @return DTO object
* @throws IOException
*/
public GitHubRepositoryList createRepositoriesList(PagedIterable<GHRepository> ghRepositoriesList) throws ApiException, IOException {
GitHubRepositoryList dtoRepositoriesList = DtoFactory.getInstance().createDto(GitHubRepositoryList.class);
List<GitHubRepository> dtoRepositories = new ArrayList<>();
for (GHRepository ghRepository : ghRepositoriesList) {
dtoRepositories.add(createRepository(ghRepository));
}
dtoRepositoriesList.setRepositories(dtoRepositories);
return dtoRepositoriesList;
}
Aggregations