]> source.dussan.org Git - archiva.git/commitdiff
Added repository field encapsulation
authorEdwin L. Punzalan <epunzalan@apache.org>
Tue, 3 Jan 2006 09:46:10 +0000 (09:46 +0000)
committerEdwin L. Punzalan <epunzalan@apache.org>
Tue, 3 Jan 2006 09:46:10 +0000 (09:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@365592 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java
maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java

index 12a3c7ef67946da9fdfd1d567e51c2cdd3f1a922..9a986aecd31f8188362231f38321e97a43d3779d 100644 (file)
@@ -40,8 +40,6 @@ public abstract class AbstractRepositoryIndex
 
     private IndexWriter indexWriter;
 
-    protected ArtifactRepository repository;
-
     /**
      * method to encapsulate the optimize() method for lucene
      */
index 115c989ef8f816884914637f1f3aacf15cbade06..85a3979565a30d9dfb55252d092c118b59bf30e1 100644 (file)
@@ -38,6 +38,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
  *
  * @author Edwin Punzalan
  * @todo I think we should merge with Abstract*. Don't see that there'd be multiple implementations based on this
+ *   --> the methods in Abstract are all lucene index methods/validations which can be used by pom and metadata indices
  * @todo I think we should instantiate this based on a repository from a factory instead of making it a component of its own
  */
 public class ArtifactRepositoryIndex
@@ -66,6 +67,8 @@ public class ArtifactRepositoryIndex
     private Analyzer analyzer;
 
     private Digester digester;
+    
+    private ArtifactRepository repository;
 
     public ArtifactRepositoryIndex( String indexPath, ArtifactRepository repository, Digester digester )
         throws RepositoryIndexException
@@ -256,4 +259,9 @@ public class ArtifactRepositoryIndex
 
         return isAdded;
     }
+
+    public ArtifactRepository getRepository()
+    {
+        return repository;
+    }
 }