diff options
author | Olivier Lamy <olamy@apache.org> | 2014-05-20 15:04:47 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-05-20 15:04:47 +1000 |
commit | 85047d3bb6163b3223ec9a4b90dae2a968d6bcb6 (patch) | |
tree | 0bb1aea69b92646fda9877707da91d266be28252 /archiva-modules/archiva-web/archiva-rest/archiva-rest-api | |
parent | a78b6070bc5c8e866011b6602b196a7c17f42c7d (diff) | |
download | archiva-85047d3bb6163b3223ec9a4b90dae2a968d6bcb6.tar.gz archiva-85047d3bb6163b3223ec9a4b90dae2a968d6bcb6.zip |
[MRM-1843] provide mechanism to obtain the latest version of an artifact
start download api currently redirect
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-api')
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java index de884541c..319abdfeb 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/SearchService.java @@ -21,10 +21,10 @@ package org.apache.archiva.rest.api.services; import org.apache.archiva.maven2.model.Artifact; +import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.model.GroupIdList; import org.apache.archiva.rest.api.model.SearchRequest; import org.apache.archiva.rest.api.model.StringList; -import org.apache.archiva.redback.authorization.RedbackAuthorization; import javax.ws.rs.GET; import javax.ws.rs.POST; @@ -32,6 +32,7 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; import java.util.List; @Path( "/searchService/" ) @@ -60,8 +61,7 @@ public interface SearchService @POST @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @RedbackAuthorization( noPermission = true, noRestriction = true ) - - List<Artifact> quickSearchWithRepositories( SearchRequest searchRequest ) + List<Artifact> quickSearchWithRepositories( SearchRequest searchRequest ) throws ArchivaRestServiceException; /** @@ -127,4 +127,13 @@ public interface SearchService throws ArchivaRestServiceException; */ + @GET + @Path( "/artifact" ) + @Produces( "text/html" ) + @RedbackAuthorization( noPermission = true, noRestriction = true ) + Response redirectToArtifactFile( @QueryParam( "r" ) String repositoryId, @QueryParam( "g" ) String groupId, + @QueryParam( "a" ) String artifactId, @QueryParam( "v" ) String version, + @QueryParam( "p" ) String packaging, @QueryParam( "c" ) String classifier ) + throws ArchivaRestServiceException; + } |