public Iterable<StreamsKey> get() { return transform(repositoryManager.getHandles(), handlesToStreamsKey); }
public Collection<String> getRepositoryNames() { // Get FishEye projects final Collection<String> results = new ArrayList<String>(); final List<RepositoryHandle> handles = AppConfig.getsConfig().getRepositoryManager().getHandles(); for (final RepositoryHandle handle : handles) { results.add(handle.getName()); } return results; }
private Set<String> getLocalProjectKeys() { final Set<String> repoData = new HashSet<String>(); for (final RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }
public Set<String> getLocalProjectKeys() { Set<String> repoData = new HashSet<String>(); for (RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }
private String getSvnCheckoutUrl(String repositoryKey, String pathToCurrentDir, String publicSvnUrl) { final RepositoryManager repositoryManager = AppConfig.getsConfig().getRepositoryManager(); final List<RepositoryHandle> repositoryHandles = repositoryManager.getHandles(); final String pathToCurrentRepo = getPathToCurrentRepo(repositoryKey, repositoryHandles); final StringBuilder sb = new StringBuilder(); sb.append(publicSvnUrl).append("/"); sb.append(pathToCurrentRepo); if (!StringUtils.isBlank(pathToCurrentDir)) { sb.append(pathToCurrentDir); } else if(!StringUtils.isBlank(pathToCurrentRepo)) { sb.append("trunk"); } else { // in this case we are indexing the root of the repository. // do nothing. log.debug("Repository " + repositoryKey + " refers to root of repository."); } return sb.toString(); }
private Set<String> getLocalProjectKeys() { final Set<String> repoData = new HashSet<String>(); for (final RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }
public Iterable<RepositoryHandle> getRepositories(ActivityRequest request) { Iterable<String> projectKeys = getIsValues(request.getStandardFilters().get(PROJECT_KEY)); Iterable<RepositoryHandle> repoHandles; if (!isEmpty(projectKeys)) { repoHandles = filter(transform(projectKeys, toRepositoryHandles()), notNull()); } else { repoHandles = repositoryManager.getHandles(); } // Filter out any repository handles that match the NOT project_key filter option return filter(repoHandles, repoName(inProjectKeys(request))); }
public void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException { final String remoteUsername = userManager.getRemoteUsername(httpServletRequest); if (remoteUsername == null || remoteUsername.trim().length() == 0) { httpServletResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED); return; } final RepositoryManager repositoryManager = AppConfig.getsConfig().getRepositoryManager(); final List<RepositoryHandle> repositoryHandles = repositoryManager.getHandles(); StringBuilder sb = new StringBuilder(); for(RepositoryHandle handle : repositoryHandles) { final String name = handle.getName(); final SvnRepType repType = handle.getCfg().getRepositoryTypeConfig().getSvn(); final String path = repType.getPath(); sb.append(name).append(","); sb.append(path).append(";"); } httpServletResponse.getOutputStream().println(sb.toString()); httpServletResponse.getOutputStream().flush(); // not strictly necessary, but I'm paranoid about these things. httpServletResponse.setStatus(HttpServletResponse.SC_OK); }