protected boolean hasIndexProvider( String name ) { for (Component component : getIndexProviders()) { if (component.getName().equals(name)) return true; } return false; }
protected boolean hasIndexProvider( String name ) { for (Component component : getIndexProviders()) { if (component.getName().equals(name)) return true; } return false; }
RepositoryIndexManager( JcrRepository.RunningState repository, RepositoryConfiguration config ) { this.repository = repository; this.config = config; this.context = repository.context(); this.systemWorkspaceName = this.repository.repositoryCache().getSystemWorkspaceName(); PathFactory pathFactory = this.context.getValueFactories().getPathFactory(); this.indexesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, ModeShapeLexicon.INDEXES); // Set up the index providers ... this.components = config.getIndexProviders(); for (Component component : components) { try { IndexProvider provider = component.createInstance(); register(provider); } catch (Throwable t) { if (t.getCause() != null) { t = t.getCause(); } this.repository.error(t, JcrI18n.unableToInitializeIndexProvider, component, repository.name(), t.getMessage()); } } }
RepositoryIndexManager( JcrRepository.RunningState repository, RepositoryConfiguration config ) { this.repository = repository; this.config = config; this.context = repository.context(); this.systemWorkspaceName = this.repository.repositoryCache().getSystemWorkspaceName(); PathFactory pathFactory = this.context.getValueFactories().getPathFactory(); this.indexesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, ModeShapeLexicon.INDEXES); // Set up the index providers ... this.components = config.getIndexProviders(); for (Component component : components) { try { IndexProvider provider = component.createInstance(); register(provider); } catch (Throwable t) { if (t.getCause() != null) { t = t.getCause(); } this.repository.error(t, JcrI18n.unableToInitializeIndexProvider, component, repository.name(), t.getMessage()); } } }
if (queryEngine == null) { QueryEngineBuilder builder = null; if (!repoConfig.getIndexProviders().isEmpty()) {
if (queryEngine == null) { QueryEngineBuilder builder = null; if (!repoConfig.getIndexProviders().isEmpty()) {
@FixFor( "MODE-2160" ) @Test public void shouldAlwaysReturnNonNullIndexProvidersList() { RepositoryConfiguration config = new RepositoryConfiguration("repoName"); assertThat(config.getIndexProviders(), is(notNullValue())); }