@Override protected void perform(Repository member) throws IOException { reindexRepository(path, member, fullReindex, processedRepositoryIds); } }.perform();
private void reindexRepositoryGroup( GroupRepository groupRepo, boolean fullReindex ) throws IOException, NoSuchRepositoryException { if ( groupRepo.isIndexable() ) { if ( fullReindex ) { resetGroupIndex( groupRepo.getId(), true ); } List<Repository> group = groupRepo.getMemberRepositories(); for ( Repository repository : group ) { if ( repository.getRepositoryKind().isFacetAvailable( GroupRepository.class ) ) { reindexRepositoryGroup( repository.adaptToFacet( GroupRepository.class ), fullReindex ); mergeRepositoryGroupIndexWithMember( repository ); } else { reindexRepository( repository, fullReindex ); } } publishRepositoryGroupIndex( groupRepo.getId() ); } }
public void reindexRepository(final String path, final String repositoryId, final boolean fullReindex) throws NoSuchRepositoryException, IOException { final Repository repository = repositoryRegistry.getRepository(repositoryId); reindexRepository(path, repository, fullReindex, new HashSet<String>()); }
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 ); } }
try { reindexRepository(repository, fromPath, fullReindex);
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); } }
public void reindexAllRepositories( String path, boolean fullReindex ) throws IOException { List<Repository> reposes = repositoryRegistry.getRepositories(); for ( Repository repository : reposes ) { if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() ) ) { reindexRepository( repository, fullReindex ); } } publishAllIndex(); }