@Override protected void perform(Repository member) throws IOException { publishRepositoryIndex(member, processedRepositoryIds); } }.perform();
public void publishRepositoryIndex(final String repositoryId) throws IOException, NoSuchRepositoryException { final Repository repository = repositoryRegistry.getRepository(repositoryId); publishRepositoryIndex(repository, new HashSet<String>()); }
public void publishRepositoryIndex( String repositoryId ) throws IOException, NoSuchRepositoryException { publishRepositoryIndex( repositoryRegistry.getRepository( repositoryId ) ); }
public void publishAllIndex() throws IOException { log.debug("Publishing indexes for all repositories"); final List<Repository> reposes = repositoryRegistry.getRepositories(); final ArrayList<IOException> exceptions = new ArrayList<IOException>(); // just publish all, since we use merged context, no need for double pass for (Repository repository : reposes) { TaskUtil.checkInterruption(); try { publishRepositoryIndex(repository); } catch (IOException e) { exceptions.add(e); } } if (!exceptions.isEmpty()) { throw Throwables2.composite(new IOException("Exception(s) happened during publishAllIndex()"), exceptions); } }
public void reindexRepository( String path, String repositoryId, boolean fullReindex ) throws NoSuchRepositoryException, IOException { Repository repository = repositoryRegistry.getRepository( repositoryId ); if ( repository.isIndexable() ) { reindexRepository( repository, fullReindex ); publishRepositoryIndex( repositoryId ); } }
protected void publishRepositoryIndex(final Repository repository, final Set<String> processedRepositoryIds) throws IOException { if (!processedRepositoryIds.add(repository.getId())) { // already processed, bail out return; } final List<IOException> exceptions = new GroupOperation(repository) { @Override protected void perform(Repository member) throws IOException { publishRepositoryIndex(member, processedRepositoryIds); } }.perform(); TaskUtil.checkInterruption(); publishRepositoryIndex(repository); if (!exceptions.isEmpty()) { throw Throwables2.composite(new IOException("Exception(s) happened during reindexAllRepositories()"), exceptions); } }
TaskUtil.checkInterruption(); try { publishRepositoryIndex(repository);
protected void reindexRepository(final String path, final Repository repository, final boolean fullReindex, final Set<String> processedRepositoryIds) throws IOException { if (!processedRepositoryIds.add(repository.getId())) { // already processed, bail out return; } final List<IOException> exceptions = new GroupOperation(repository) { @Override protected void perform(Repository member) throws IOException { reindexRepository(path, member, fullReindex, processedRepositoryIds); } }.perform(); TaskUtil.checkInterruption(); reindexRepository(repository, path, fullReindex); if (REINDEX_PUBLISHES) { publishRepositoryIndex(repository); } if (!exceptions.isEmpty()) { throw Throwables2.composite(new IOException("Exception(s) happened during reindexAllRepositories()"), exceptions); } }
protected void publishRepositoryGroupIndex( GroupRepository group ) throws IOException { if ( group.isIndexable() ) { for ( Repository repository : group.getMemberRepositories() ) { if ( repository.getRepositoryKind().isFacetAvailable( GroupRepository.class ) ) { publishRepositoryGroupIndex( repository.adaptToFacet( GroupRepository.class ) ); } else { publishRepositoryIndex( repository ); } } publishRepositoryIndex( group ); } }
public void publishAllIndex() throws IOException { List<Repository> reposes = repositoryRegistry.getRepositories(); for ( Repository repository : reposes ) { if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() ) && !repository.getRepositoryKind().isFacetAvailable( GroupRepository.class ) && repository.isIndexable() ) { publishRepositoryIndex( repository ); } } List<GroupRepository> groups = repositoryRegistry.getRepositoriesWithFacet( GroupRepository.class ); for ( GroupRepository group : groups ) { publishRepositoryIndex( group ); } }