/** * Index is maintained for the repository. Implies SUPPORTED. */ private boolean INDEXABLE(Repository repository) { return SUPPORTED(repository) && repository.isIndexable(); }
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 logSkippingRepositoryMessage( Repository repository ) { boolean isSupported = isIndexingSupported( repository ); boolean isIndexed = repository.isIndexable(); if ( getLogger().isDebugEnabled() ) { StringBuilder sb = new StringBuilder( "Indexing is " ); if ( !isSupported ) { sb.append( "not " ); } sb.append( "supported on repository \"" + repository.getName() + "\" (ID=\"" + repository.getId() + "\")" ); if ( isSupported ) { sb.append( " and is set as " ); if ( !isIndexed ) { sb.append( "not " ); } sb.append( "indexed. " ); } else { sb.append( ". " ); } sb.append( "Skipping it." ); getLogger().debug( sb.toString() ); } }
if (repository.isIndexable()) {
private void inspectForIndexerManager(final Event<?> evt) { RepositoryItemEvent ievt = (RepositoryItemEvent) evt; Repository repository = ievt.getRepository(); // should we sync at all if (repository != null && repository.isIndexable()) { try { if (ievt instanceof RepositoryItemEventCache || ievt instanceof RepositoryItemEventStore) { getIndexerManager().addItemToIndex(repository, ievt.getItem()); } else if (ievt instanceof RepositoryItemEventDelete) { getIndexerManager().removeItemFromIndex(repository, ievt.getItem()); } } catch (Exception e) // TODO be more specific { log.error("Could not maintain index for repository {}!", repository.getId(), e); } } }
if ( repository.isIndexable() )
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 ); } }
if ( !repository.isIndexable() )
protected void downloadRepositoryGroupIndex( GroupRepository group ) throws IOException { List<Repository> members = group.getMemberRepositories(); for ( Repository repository : members ) { if ( !repository.isIndexable() ) { continue; } if ( repository.getRepositoryKind().isFacetAvailable( GroupRepository.class ) ) { downloadRepositoryGroupIndex( repository.adaptToFacet( GroupRepository.class ) ); } if ( repository.getRepositoryKind().isFacetAvailable( ProxyRepository.class ) ) { if ( downloadRepositoryIndex( repository.adaptToFacet( ProxyRepository.class ) ) ) { mergeRepositoryGroupIndexWithMember( repository ); } } } }
private void inspectForIndexerManager( Event<?> evt ) { try { RepositoryItemEvent ievt = (RepositoryItemEvent) evt; // should we sync at all if ( ievt.getRepository().isIndexable() ) { if ( ievt instanceof RepositoryItemEventCache || ievt instanceof RepositoryItemEventStore ) { getIndexerManager().addItemToIndex( ievt.getRepository(), ievt.getItem() ); } else if ( ievt instanceof RepositoryItemEventDelete ) { getIndexerManager().removeItemFromIndex( ievt.getRepository(), ievt.getItem() ); } } } catch ( Exception e ) // TODO be more specific { getLogger().error( "Could not maintain index!", e ); } }
if ( !repository.isIndexable() )
if ( !repository.isIndexable() )
if ( !isIndexingSupported( repository ) || !repository.isIndexable() )
if ( !repository.isIndexable() )
if (repository.isIndexable()) {
if ( !repository.isIndexable() )
if ( applicationStatusSource.getSystemStatus().isNexusStarted() && repository.isIndexable() )