diff options
author | Olivier Lamy <olamy@apache.org> | 2012-07-05 20:43:58 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-07-05 20:43:58 +0000 |
commit | c7165afad7ccd3630e67d5be19035b4ac16cf1fe (patch) | |
tree | dd8e9437a132db4dbfaccc731b24c0630f37149f /archiva-modules/archiva-web/archiva-rest/archiva-rest-api | |
parent | 707cdb193ac7423404bf18b8bd86b814a1129724 (diff) | |
download | archiva-c7165afad7ccd3630e67d5be19035b4ac16cf1fe.tar.gz archiva-c7165afad7ccd3630e67d5be19035b4ac16cf1fe.zip |
oups missed some add files
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1357890 13f79535-47bb-0310-9956-ffa450edef68
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/ReportRepositoriesService.java | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ReportRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ReportRepositoriesService.java new file mode 100644 index 000000000..52365b9cd --- /dev/null +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ReportRepositoriesService.java @@ -0,0 +1,62 @@ +package org.apache.archiva.rest.api.services; + +/* + * Copyright 2012 Zenika + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.archiva.metadata.repository.stats.RepositoryStatistics; +import org.apache.archiva.redback.authorization.RedbackAuthorization; +import org.apache.archiva.reports.RepositoryProblemFacet; +import org.apache.archiva.security.common.ArchivaRoleConstants; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; +import java.util.Date; +import java.util.List; + +/** + * ReportRepositoriesService + * + * @author Adrien Lecharpentier <adrien.lecharpentier@zenika.com> + * @since 1.4-M3 + */ +@Path( "/reportServices/" ) +public interface ReportRepositoriesService +{ + + @Path( "getStatisticsReport" ) + @GET + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) + public List<RepositoryStatistics> getStatisticsReport( @QueryParam( "repository" ) List<String> repositoriesId, + @QueryParam( "rowCount" ) int rowCount, + @QueryParam( "startDate" ) Date startDate, + @QueryParam( "endDate" ) Date endDate ) + throws ArchivaRestServiceException; + + @Path( "getHealthReports/{repository}/{rowCount}" ) + @GET + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) + public List<RepositoryProblemFacet> getHealthReport( @PathParam( "repository" ) String repository, + @QueryParam( "groupId" ) String groupId, + @PathParam( "rowCount" ) int rowCount ) + throws ArchivaRestServiceException; + +} |