diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/test-settings.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/test-settings.xml new file mode 100644 index 000000000..ab9e16e42 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/test-settings.xml @@ -0,0 +1,55 @@ + + + + + + + + it-repo + + true + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java index 213bdea65..8e1d0db37 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java @@ -19,8 +19,12 @@ package org.apache.archiva; */ import junit.framework.TestCase; +import org.apache.archiva.rest.api.services.ManagedRepositoriesService; import org.apache.archiva.rest.api.services.ProxyConnectorService; import org.apache.archiva.rest.api.services.RemoteRepositoriesService; +import org.apache.archiva.rest.api.services.RepositoriesService; +import org.apache.archiva.rest.api.services.RepositoryGroupService; +import org.apache.archiva.rest.api.services.SearchService; import org.apache.archiva.webdav.RepositoryServlet; import org.apache.commons.lang.StringUtils; import org.apache.cxf.common.util.Base64Utility; @@ -76,10 +80,7 @@ public abstract class AbstractDownloadTest } - protected String getSpringConfigLocation() - { - return "classpath*:META-INF/spring-context.xml classpath*:spring-context-artifacts-download.xml"; - } + protected abstract String getSpringConfigLocation(); protected String getRestServicesPath() @@ -134,7 +135,6 @@ public abstract class AbstractDownloadTest } - protected abstract Class getServletClass(); @After public void tearDown() @@ -171,6 +171,51 @@ public abstract class AbstractDownloadTest return service; } + protected ManagedRepositoriesService getManagedRepositoriesService() + { + ManagedRepositoriesService service = + JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", + ManagedRepositoriesService.class ); + + WebClient.client( service ).header( "Authorization", authorizationHeader ); + WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); + return service; + } + + + protected RepositoryGroupService getRepositoryGroupService() + { + RepositoryGroupService service = + JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", + RepositoryGroupService.class ); + + WebClient.client( service ).header( "Authorization", authorizationHeader ); + WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); + return service; + } + + protected RepositoriesService getRepositoriesService() + { + RepositoriesService service = + JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", + RepositoriesService.class ); + + WebClient.client( service ).header( "Authorization", authorizationHeader ); + WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); + return service; + } + + protected SearchService getSearchService() + { + SearchService service = + JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", + SearchService.class ); + + WebClient.client( service ).header( "Authorization", authorizationHeader ); + WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); + return service; + } + protected String getBaseUrl() { String baseUrlSysProps = System.getProperty( "archiva.baseRestUrl" ); @@ -216,4 +261,5 @@ public abstract class AbstractDownloadTest "http://localhost:" + port + "/" + getRestServicesPath() + "/fakeCreateAdminService/", FakeCreateAdminService.class ); } + } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java index 1b70c8c8e..0684e6295 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java @@ -78,6 +78,11 @@ public class DownloadArtifactsTest System.setProperty( "appserver.base", previousAppServerBase ); } + protected String getSpringConfigLocation() + { + return "classpath*:META-INF/spring-context.xml classpath*:spring-context-artifacts-download.xml"; + } + @Before public void startServer() throws Exception @@ -87,7 +92,7 @@ public class DownloadArtifactsTest //redirect handler this.redirectServer = new Server( 0 ); - ServletHolder shRedirect = new ServletHolder( getServletClass() ); + ServletHolder shRedirect = new ServletHolder( RedirectServlet.class ); ServletContextHandler contextRedirect = new ServletContextHandler(); contextRedirect.setContextPath( "/" ); @@ -173,11 +178,6 @@ public class DownloadArtifactsTest return Collections.emptyList(); } - @Override - protected Class getServletClass() - { - return RedirectServlet.class; - } public static class RedirectServlet extends HttpServlet diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadMergedIndexTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadMergedIndexTest.java index 49e4ccdcb..0de67cedc 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadMergedIndexTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadMergedIndexTest.java @@ -18,16 +18,147 @@ package org.apache.archiva; * under the License. */ -import junit.framework.TestCase; +import org.apache.archiva.admin.model.beans.ManagedRepository; +import org.apache.archiva.admin.model.beans.ProxyConnector; +import org.apache.archiva.admin.model.beans.RemoteRepository; +import org.apache.archiva.admin.model.beans.RepositoryGroup; +import org.apache.archiva.rest.api.model.Artifact; +import org.apache.archiva.rest.api.model.SearchRequest; +import org.apache.archiva.rest.api.services.ManagedRepositoriesService; +import org.apache.archiva.rest.api.services.ProxyConnectorService; +import org.apache.archiva.rest.api.services.RepositoriesService; +import org.apache.archiva.rest.api.services.RepositoryGroupService; +import org.apache.archiva.rest.api.services.SearchService; +import org.codehaus.redback.integration.security.role.RedbackRoleConstants; +import org.codehaus.redback.rest.services.FakeCreateAdminService; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import java.util.Arrays; +import java.util.List; + /** * @author Olivier Lamy */ @RunWith( JUnit4.class ) public class DownloadMergedIndexTest - extends TestCase + extends AbstractDownloadTest { + @BeforeClass + public static void setAppServerBase() + { + previousAppServerBase = System.getProperty( "appserver.base" ); + System.setProperty( "appserver.base", "target/" + DownloadMergedIndexTest.class.getName() ); + } + + @AfterClass + public static void resetAppServerBase() + { + System.setProperty( "appserver.base", previousAppServerBase ); + } + + protected String getSpringConfigLocation() + { + return "classpath*:META-INF/spring-context.xml classpath*:spring-context-merge-index-download.xml"; + } + + @Test + public void downloadMergedIndex() + throws Exception + { + String id = Long.toString( System.currentTimeMillis() ); + ManagedRepository managedRepository = new ManagedRepository(); + managedRepository.setId( id ); + managedRepository.setName( "name of " + id ); + managedRepository.setLocation( "src/test/repositories/test-repo" ); + managedRepository.setIndexDirectory( "target/tmpIndex/" + id ); + + ManagedRepositoriesService managedRepositoriesService = getManagedRepositoriesService(); + + if ( managedRepositoriesService.getManagedRepository( id ) != null ) + { + managedRepositoriesService.deleteManagedRepository( id, false ); + } + + getManagedRepositoriesService().addManagedRepository( managedRepository ); + + RepositoriesService repositoriesService = getRepositoriesService(); + + repositoriesService.scanRepositoryNow( id, true ); + + // wait a bit to ensure index is finished + int timeout = 20000; + while ( timeout > 0 && repositoriesService.alreadyScanning( id ) ) + { + Thread.sleep( 500 ); + timeout -= 500; + } + + RepositoryGroupService repositoryGroupService = getRepositoryGroupService(); + + RepositoryGroup repositoryGroup = new RepositoryGroup(); + repositoryGroup.setId( "test-group" ); + repositoryGroup.setRepositories( Arrays.asList( id ) ); + + repositoryGroupService.addRepositoryGroup( repositoryGroup ); + + // create a repo with a remote on the one with index + id = Long.toString( System.currentTimeMillis() ); + managedRepository = new ManagedRepository(); + managedRepository.setId( id ); + managedRepository.setName( "name of " + id ); + managedRepository.setLocation( "src/test/repositories/test-repo" ); + managedRepository.setIndexDirectory( "target/tmpIndex/" + id ); + + if ( managedRepositoriesService.getManagedRepository( id ) != null ) + { + managedRepositoriesService.deleteManagedRepository( id, false ); + } + + getManagedRepositoriesService().addManagedRepository( managedRepository ); + + RemoteRepository remoteRepository = new RemoteRepository(); + remoteRepository.setId( "all-merged" ); + remoteRepository.setName( "all-merged" ); + remoteRepository.setDownloadRemoteIndex( true ); + remoteRepository.setUrl( "http://localhost:" + port + "/repository/test-group" ); + remoteRepository.setRemoteIndexUrl( "http://localhost:" + port + "/repository/test-group/.indexer" ); + remoteRepository.setUserName( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME ); + remoteRepository.setPassword( FakeCreateAdminService.ADMIN_TEST_PWD ); + + getRemoteRepositoriesService().addRemoteRepository( remoteRepository ); + + ProxyConnectorService proxyConnectorService = getProxyConnectorService(); + ProxyConnector proxyConnector = new ProxyConnector(); + proxyConnector.setProxyId( "foo-bar" ); + proxyConnector.setSourceRepoId( id ); + proxyConnector.setTargetRepoId( "all-merged" ); + proxyConnectorService.addProxyConnector( proxyConnector ); + + repositoriesService.scheduleDownloadRemoteIndex( "all-merged", true, true ); + + // wait a bit + timeout = 20000; + while ( timeout > 0 ) + { + Thread.sleep( 500 ); + timeout -= 500; + } + + SearchService searchService = getSearchService(); + + SearchRequest request = new SearchRequest( ); + request.setRepositories( Arrays.asList( id ) ); + request.setGroupId( "org.apache.felix" ); + + List artifacts = searchService.searchArtifacts( request ); + assertFalse( artifacts.isEmpty() ); + assertEquals( 1, artifacts.size() ); + } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar new file mode 100644 index 000000000..9c16c3ced Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-patch1.jar differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar new file mode 100644 index 000000000..9c16c3ced Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0-sources.jar differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar new file mode 100644 index 000000000..9c16c3ced Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom new file mode 100644 index 000000000..b0d983fde --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.pom @@ -0,0 +1,28 @@ + + 4.0.0 + org.apache.archiva + archiva-search + jar + 1.0 + Archiva Search + http://archiva.apache.org + + + junit + junit + 3.8.1 + test + + + commons-lang + commons-lang + 2.3 + + + log4j + log4j + 1.2.8 + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar new file mode 100644 index 000000000..843ee45bc Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.jar differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom new file mode 100644 index 000000000..0b037a3a5 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/1.0/archiva-test-1.0.pom @@ -0,0 +1,23 @@ + + 4.0.0 + org.apache.archiva + archiva-test + jar + 1.0 + archiva-test + http://maven.apache.org + + + junit + junit + 3.8.1 + test + + + commons-lang + commons-lang + 2.3 + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar new file mode 100644 index 000000000..e904a17c4 Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom new file mode 100644 index 000000000..04fdb4859 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.pom @@ -0,0 +1,28 @@ + + 4.0.0 + org.apache.archiva + archiva-test + jar + 2.0 + Archiva Test + http://archiva.apache.org + + + junit + junit + 3.8.1 + test + + + commons-lang + commons-lang + 2.3 + + + commons-io + commons-io + 1.4 + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom new file mode 100644 index 000000000..ca28dc132 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.pom @@ -0,0 +1,23 @@ + + 4.0.0 + org.apache.archiva + archiva-webapp + war + 1.0 + Archiva Webapp + http://archiva.apache.org + + + junit + junit + 3.8.1 + test + + + log4j + log4j + 1.2.8 + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/archiva-webapp/1.0/archiva-webapp-1.0.war new file mode 100644 index 000000000..e69de29bb diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/test-webapp/1.0-SNAPSHOT/test-webapp-1.0-SNAPSHOT.war b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/test-webapp/1.0-SNAPSHOT/test-webapp-1.0-SNAPSHOT.war new file mode 100644 index 000000000..5559103fd Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/archiva/test-webapp/1.0-SNAPSHOT/test-webapp-1.0-SNAPSHOT.war differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar new file mode 100644 index 000000000..218330e3f Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom new file mode 100644 index 000000000..19831eefa --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/repositories/test-repo/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.pom @@ -0,0 +1,138 @@ + + + + org.apache.felix + felix-parent + 2.1 + ../pom/pom.xml + + 4.0.0 + bundle + Apache Felix Bundle Repository + Bundle repository service. + org.apache.felix.bundlerepository + 1.6.6 + + scm:svn:http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.bundlerepository-1.6.6 + scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.bundlerepository-1.6.6 + http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.bundlerepository-1.6.6 + + + + ${project.groupId} + org.apache.felix.utils + 1.1.0 + true + + + ${project.groupId} + org.osgi.service.obr + 1.0.2 + true + + + ${project.groupId} + org.apache.felix.shell + 1.4.1 + true + + + net.sf.kxml + kxml2 + 2.3.0 + true + + + xmlpull + xmlpull + + + + + org.osgi + org.osgi.compendium + 4.0.0 + true + + + org.osgi + org.osgi.core + 4.1.0 + + + org.codehaus.woodstox + woodstox-core-asl + 4.0.7 + true + + + org.easymock + easymock + 2.4 + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + + org.apache.felix.bundlerepository;version="2.0" + + org.kxml2.io, + org.xmlpull.v1, + org.apache.felix.bundlerepository.impl.*, + org.apache.felix.utils.* + + !javax.xml.parsers,!org.xml.sax,org.osgi.service.log;resolution:=optional,org.osgi.service.obr;resolution:=optional,javax.xml.stream;resolution:=optional,* + org.apache.felix.shell + ${project.artifactId}.impl.Activator + http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html + http://felix.apache.org/site/downloads.cgi + http://felix.apache.org/site/downloads.cgi + ${project.artifactId} + The Apache Software Foundation + org.apache.felix.bundlerepository.RepositoryAdmin,org.osgi.service.obr.RepositoryAdmin + <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@))) + META-INF/LICENSE=LICENSE,META-INF/LICENSE.kxml2=LICENSE.kxml2,META-INF/NOTICE=NOTICE,META-INF/DEPENDENCIES=DEPENDENCIES + + + + + org.apache.rat + apache-rat-plugin + + false + true + true + + doc/* + maven-eclipse.xml + .checkstyle + .externalToolBuilders/* + + + + + + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/spring-context-merge-index-download.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/spring-context-merge-index-download.xml new file mode 100644 index 000000000..ca111ea22 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/spring-context-merge-index-download.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java index c04ae9766..23ef4adc4 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java @@ -19,18 +19,17 @@ package org.apache.archiva.web.xmlrpc.api; * under the License. */ -import java.util.Date; -import java.util.List; - +import com.atlassian.xmlrpc.ServiceObject; import org.apache.archiva.web.xmlrpc.api.beans.Artifact; import org.apache.archiva.web.xmlrpc.api.beans.Dependency; -import com.atlassian.xmlrpc.ServiceObject; +import java.util.Date; +import java.util.List; -@ServiceObject("SearchService") +@ServiceObject( "SearchService" ) public interface SearchService { - /* + /* * quick/general text search which returns a list of artifacts * query for an artifact based on a checksum * query for all available versions of an artifact, sorted in version significance order @@ -40,21 +39,25 @@ public interface SearchService * query for all artifacts that depend on a given artifact */ - public List quickSearch( String queryString ) - throws Exception; + public List quickSearch( String queryString ) + throws Exception; - public List getArtifactByChecksum( String checksum) throws Exception; - - public List getArtifactVersions( String groupId, String artifactId ) throws Exception; - - public List getArtifactVersionsByDate( String groupId, String artifactId, String version, Date whenGathered ) - throws Exception; + public List getArtifactByChecksum( String checksum ) + throws Exception; + + public List getArtifactVersions( String groupId, String artifactId ) + throws Exception; + + public List getArtifactVersionsByDate( String groupId, String artifactId, String version, + Date whenGathered ) + throws Exception; + + public List getDependencies( String groupId, String artifactId, String version ) + throws Exception; + + public List getDependencyTree( String groupId, String artifactId, String version ) + throws Exception; - public List getDependencies( String groupId, String artifactId, String version ) - throws Exception; - - public List getDependencyTree( String groupId, String artifactId, String version ) throws Exception; - public List getDependees( String groupId, String artifactId, String version ) - throws Exception; + throws Exception; }