]> source.dussan.org Git - archiva.git/commitdiff
Adding indexmanager changes
authorMartin Stockhammer <martin.stockhammer@ars.de>
Thu, 9 Nov 2017 18:11:44 +0000 (19:11 +0100)
committerMartin Stockhammer <martin.stockhammer@ars.de>
Thu, 9 Nov 2017 18:11:44 +0000 (19:11 +0100)
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/IndexManagerFactory.java
archiva-modules/archiva-base/archiva-repository-api/src/main/resources/META-INF/spring-context.xml

index d8299839bd6e6c4e9e71b6fcf566692330d40a4b..189138330647bc1fa1a2f5055bd66ffc54f7d760 100644 (file)
@@ -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);
 }
index 3eb3a14fe11def3d31708b5c1998c3e29058c789..494e59ebe572cd4f14eae8294d61fbbf54938cda 100644 (file)
@@ -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 {
index ce334de40fea5c162defca877f9ef9a2207fe2ab..c70b579f5a80435901c516575c7e928eb2970ddd 100644 (file)
@@ -32,7 +32,7 @@
        default-lazy-init="false">
 
   <context:annotation-config/>
-  <context:component-scan base-package="org.apache.archiva.indexer.search,org.apache.archiva.indexer.merger"/>
+  <context:component-scan base-package="org.apache.archiva.indexer"/>