From 962ab23fefee1f68200a62f17a189c5f42582cf2 Mon Sep 17 00:00:00 2001 From: "Edwin L. Punzalan" Date: Tue, 27 Dec 2005 03:28:27 +0000 Subject: [PATCH] Renamed RepositorySearcher to RepositoryIndexSearcher and also some more refactoring git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@359164 13f79535-47bb-0310-9956-ffa450edef68 --- ...java => ArtifactRepositoryIndexSearcher.java} | 16 +++++++--------- ...earcher.java => RepositoryIndexSearcher.java} | 2 +- .../indexing/ArtifactRepositoryIndexingTest.java | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) rename maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/{ArtifactRepositorySearcher.java => ArtifactRepositoryIndexSearcher.java} (96%) rename maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/{RepositorySearcher.java => RepositoryIndexSearcher.java} (95%) diff --git a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositorySearcher.java b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java similarity index 96% rename from maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositorySearcher.java rename to maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java index 03294883b..c552e0f79 100644 --- a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositorySearcher.java +++ b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java @@ -47,13 +47,9 @@ import org.apache.maven.artifact.versioning.VersionRange; * specified query string. * */ -public class ArtifactRepositorySearcher - implements RepositorySearcher +public class ArtifactRepositoryIndexSearcher + implements RepositoryIndexSearcher { - - private IndexSearcher searcher; - private ArtifactRepository repository; - private ArtifactFactory factory; private static final String NAME = "name"; private static final String GROUPID = "groupId"; private static final String ARTIFACTID = "artifactId"; @@ -61,6 +57,10 @@ public class ArtifactRepositorySearcher private static final String JAR_TYPE = "jar"; private static final String XML_TYPE = "xml"; private static final String POM_TYPE = "pom"; + + private IndexSearcher searcher; + private ArtifactRepository repository; + private ArtifactFactory factory; /** * Constructor @@ -68,11 +68,9 @@ public class ArtifactRepositorySearcher * @param indexPath * @param repository */ - public ArtifactRepositorySearcher( String indexPath, - ArtifactRepository repository ) + public ArtifactRepositoryIndexSearcher( String indexPath, ArtifactRepository repository ) { this.repository = repository; - factory = new DefaultArtifactFactory(); try { diff --git a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositorySearcher.java b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java similarity index 95% rename from maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositorySearcher.java rename to maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java index d8119d5e8..2677fd688 100644 --- a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositorySearcher.java +++ b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java @@ -22,7 +22,7 @@ import java.util.List; /** * */ -public interface RepositorySearcher { +public interface RepositoryIndexSearcher { String ROLE = RepositoryIndexer.class.getName(); diff --git a/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java b/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java index 881ff45f9..9179c5df7 100644 --- a/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java +++ b/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java @@ -40,7 +40,7 @@ public class ArtifactRepositoryIndexingTest protected ArtifactFactory artifactFactory; protected ArtifactRepository repository; protected String indexPath; - private RepositorySearcher repoSearcher; + private RepositoryIndexSearcher repoSearcher; private static final String GROUPID = "groupId"; private static final String ARTIFACTID = "artifactId"; private static final String VERSION = "version"; @@ -67,7 +67,7 @@ public class ArtifactRepositoryIndexingTest indexer = (ArtifactRepositoryIndexer) factory.getArtifactRepositoryIndexer( indexPath, repository ); artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); - repoSearcher = new ArtifactRepositorySearcher(indexPath, repository); + repoSearcher = new ArtifactRepositoryIndexSearcher(indexPath, repository); } public void testIndex()