From b4dfa907738c748cc6e083c45f8672ffae430ff6 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Fri, 20 Feb 2009 05:25:30 +0000 Subject: [PATCH] o re-packaged classes in archiva-indexer o removed old directory o removed unnecessary references to RepositoryIndexException and RepositoryIndexSearchException which have been removed git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@746146 13f79535-47bb-0310-9956-ffa450edef68 --- .../indexer/search/NexusRepositorySearch.java | 3 --- .../archiva/indexer/search/RepositorySearch.java | 2 -- .../archiva/indexer/search/SearchResultHit.java | 4 ++-- .../archiva/indexer/search/SearchResultLimits.java | 4 ++-- .../archiva/indexer/search/SearchResults.java | 5 +++-- .../indexer/search/NexusRepositorySearchTest.java | 3 --- .../maven/archiva/web/action/SearchAction.java | 12 +++++------- .../maven/archiva/web/action/SearchActionTest.java | 6 +++--- .../web/xmlrpc/services/SearchServiceImpl.java | 6 +++--- .../web/xmlrpc/services/SearchServiceImplTest.java | 6 +++--- 10 files changed, 21 insertions(+), 30 deletions(-) rename archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/{maven => }/archiva/indexer/search/SearchResultHit.java (96%) rename archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/{maven => }/archiva/indexer/search/SearchResultLimits.java (93%) rename archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/{maven => }/archiva/indexer/search/SearchResults.java (95%) diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java index cdf73f48a..9f0b38f01 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java @@ -31,9 +31,6 @@ import org.apache.lucene.search.BooleanClause.Occur; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.maven.archiva.indexer.search.SearchResultHit; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonatype.nexus.index.ArtifactInfo; diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/RepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/RepositorySearch.java index 7e20f0892..b0f64c129 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/RepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/RepositorySearch.java @@ -21,8 +21,6 @@ package org.apache.archiva.indexer.search; import java.util.List; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; public interface RepositorySearch { diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResultHit.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java similarity index 96% rename from archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResultHit.java rename to archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java index 590280b2d..c5a1f0134 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResultHit.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java @@ -1,4 +1,4 @@ -package org.apache.maven.archiva.indexer.search; +package org.apache.archiva.indexer.search; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -28,7 +28,7 @@ import java.util.List; /** * SearchResultHit * - * @version $Id$ + * @version $Id: SearchResultHit.java 740552 2009-02-04 01:09:17Z oching $ */ public class SearchResultHit { diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResultLimits.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultLimits.java similarity index 93% rename from archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResultLimits.java rename to archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultLimits.java index 89b84ccdd..a756dba61 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResultLimits.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultLimits.java @@ -1,4 +1,4 @@ -package org.apache.maven.archiva.indexer.search; +package org.apache.archiva.indexer.search; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -23,7 +23,7 @@ package org.apache.maven.archiva.indexer.search; * SearchResultLimits - used to provide the search some limits on how the results are returned. * This can provide paging for the * - * @version $Id$ + * @version $Id: SearchResultLimits.java 718864 2008-11-19 06:33:35Z brett $ */ public class SearchResultLimits { diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResults.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java similarity index 95% rename from archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResults.java rename to archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java index 472bd1a82..4fc3e22b7 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/SearchResults.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java @@ -1,4 +1,4 @@ -package org.apache.maven.archiva.indexer.search; +package org.apache.archiva.indexer.search; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -24,10 +24,11 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + /** * SearchResults * - * @version $Id$ + * @version $Id: SearchResults.java 742859 2009-02-10 05:35:05Z jdumay $ */ public class SearchResults { diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java index 85f0c0304..51235cdad 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java @@ -28,9 +28,6 @@ import org.apache.commons.io.FileUtils; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.maven.archiva.indexer.search.SearchResultHit; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; import org.sonatype.nexus.index.ArtifactContext; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java index 8b43995d9..84045e92d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java @@ -29,6 +29,9 @@ import java.util.Map; import org.apache.archiva.indexer.search.RepositorySearch; import org.apache.archiva.indexer.search.RepositorySearchException; import org.apache.archiva.indexer.search.SearchFields; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.maven.archiva.configuration.ArchivaConfiguration; @@ -37,10 +40,6 @@ import org.apache.maven.archiva.database.ArchivaDAO; import org.apache.maven.archiva.database.ArtifactDAO; import org.apache.maven.archiva.database.Constraint; import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint; -import org.apache.maven.archiva.indexer.RepositoryIndexException; -import org.apache.maven.archiva.indexer.RepositoryIndexSearchException; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; import org.apache.maven.archiva.security.AccessDeniedException; import org.apache.maven.archiva.security.ArchivaSecurityException; import org.apache.maven.archiva.security.ArchivaXworkUser; @@ -51,7 +50,6 @@ import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.Preparable; import org.apache.maven.archiva.common.utils.VersionUtil; import org.apache.maven.archiva.database.constraints.UniqueVersionConstraint; -import org.apache.maven.archiva.indexer.search.SearchResultHit; import org.apache.struts2.ServletActionContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -189,7 +187,7 @@ public class SearchAction // advanced search MRM-90 -- filtered search public String filteredSearch() - throws MalformedURLException, RepositoryIndexException, RepositoryIndexSearchException + throws MalformedURLException { if ( ( groupId == null || "".equals( groupId ) ) && ( artifactId == null || "".equals( artifactId ) ) && ( className == null || "".equals( className ) ) && @@ -265,7 +263,7 @@ public class SearchAction } public String quickSearch() - throws MalformedURLException, RepositoryIndexException, RepositoryIndexSearchException + throws MalformedURLException { /* TODO: give action message if indexing is in progress. * This should be based off a count of 'unprocessed' artifacts. diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/SearchActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/SearchActionTest.java index b01a3d8b0..cef9ccc96 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/SearchActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/SearchActionTest.java @@ -25,15 +25,15 @@ import java.util.List; import org.apache.archiva.indexer.search.RepositorySearch; import org.apache.archiva.indexer.search.SearchFields; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.archiva.indexer.util.SearchUtil; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.database.ArchivaDAO; import org.apache.maven.archiva.database.ArtifactDAO; import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint; import org.apache.maven.archiva.database.constraints.UniqueVersionConstraint; -import org.apache.maven.archiva.indexer.search.SearchResultHit; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.security.ArchivaXworkUser; import org.apache.maven.archiva.security.UserRepositories; diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java index 4b842ed8f..da5714d4a 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java @@ -24,6 +24,9 @@ import java.util.Date; import java.util.List; import org.apache.archiva.indexer.search.RepositorySearch; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.archiva.web.xmlrpc.api.SearchService; import org.apache.archiva.web.xmlrpc.api.beans.Artifact; import org.apache.archiva.web.xmlrpc.api.beans.Dependency; @@ -35,9 +38,6 @@ import org.apache.maven.archiva.database.ObjectNotFoundException; import org.apache.maven.archiva.database.browsing.BrowsingResults; import org.apache.maven.archiva.database.browsing.RepositoryBrowsing; import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint; -import org.apache.maven.archiva.indexer.search.SearchResultHit; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaProjectModel; diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java index c722ae901..bf9598bfc 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java @@ -25,6 +25,9 @@ import java.util.Date; import java.util.List; import org.apache.archiva.indexer.search.RepositorySearch; +import org.apache.archiva.indexer.search.SearchResultHit; +import org.apache.archiva.indexer.search.SearchResultLimits; +import org.apache.archiva.indexer.search.SearchResults; import org.apache.archiva.indexer.util.SearchUtil; import org.apache.archiva.web.xmlrpc.api.SearchService; import org.apache.archiva.web.xmlrpc.api.beans.Artifact; @@ -36,9 +39,6 @@ import org.apache.maven.archiva.database.ObjectNotFoundException; import org.apache.maven.archiva.database.browsing.BrowsingResults; import org.apache.maven.archiva.database.browsing.RepositoryBrowsing; import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint; -import org.apache.maven.archiva.indexer.search.SearchResultHit; -import org.apache.maven.archiva.indexer.search.SearchResultLimits; -import org.apache.maven.archiva.indexer.search.SearchResults; import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaProjectModel; import org.codehaus.plexus.spring.PlexusInSpringTestCase; -- 2.39.5