From: Martin Stockhammer Date: Thu, 9 Nov 2017 18:11:44 +0000 (+0100) Subject: Adding indexmanager changes X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8f520999ff9b42396a013bb42bc450945ddc4b5d;p=archiva.git Adding indexmanager changes --- diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java index d8299839b..189138330 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java @@ -20,6 +20,7 @@ package org.apache.archiva.indexer; */ import org.apache.archiva.model.ArtifactReference; +import org.apache.archiva.repository.Repository; import org.apache.archiva.repository.RepositoryType; import java.net.URI; @@ -68,4 +69,11 @@ public interface ArchivaIndexManager { * @return */ boolean supportsRepository(RepositoryType type); + + /** + * Creates the indexing context for the given repository. + * @param repository the repository for which the index context should be created + * @return the index context + */ + ArchivaIndexingContext createContext(Repository repository); } diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/IndexManagerFactory.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/IndexManagerFactory.java index 3eb3a14fe..494e59ebe 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/IndexManagerFactory.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/IndexManagerFactory.java @@ -39,7 +39,7 @@ public class IndexManagerFactory { @Inject ApplicationContext applicationContext; - ArchivaIndexManager getIndexManager(RepositoryType type) { + public ArchivaIndexManager getIndexManager(RepositoryType type) { if (managers.containsKey(type)) { return managers.get(type); } else { diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml index ce334de40..c70b579f5 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml @@ -32,7 +32,7 @@ default-lazy-init="false"> - +