1 package org.apache.archiva.rest.api.services;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import io.swagger.v3.oas.annotations.tags.Tag;
22 import org.apache.archiva.admin.model.beans.RepositoryGroup;
23 import org.apache.archiva.redback.authorization.RedbackAuthorization;
24 import org.apache.archiva.security.common.ArchivaRoleConstants;
26 import javax.ws.rs.Consumes;
27 import javax.ws.rs.GET;
28 import javax.ws.rs.POST;
29 import javax.ws.rs.Path;
30 import javax.ws.rs.PathParam;
31 import javax.ws.rs.Produces;
32 import javax.ws.rs.QueryParam;
33 import javax.ws.rs.core.MediaType;
34 import java.util.List;
37 * @author Olivier Lamy
40 @Path( "/repositoryGroupService/" )
41 @Tag( name="Repository-Group", description = "Managing of groups of repositories")
42 public interface RepositoryGroupService
44 @Path( "getRepositoriesGroups" )
46 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
47 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
48 List<RepositoryGroup> getRepositoriesGroups()
49 throws ArchivaRestServiceException;
51 @Path( "getRepositoryGroup/{repositoryGroupId}" )
53 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
54 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
55 RepositoryGroup getRepositoryGroup( @PathParam( "repositoryGroupId" ) String repositoryGroupId )
56 throws ArchivaRestServiceException;
58 @Path( "addRepositoryGroup" )
60 @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
61 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
62 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
63 Boolean addRepositoryGroup( RepositoryGroup repositoryGroup )
64 throws ArchivaRestServiceException;
66 @Path( "updateRepositoryGroup" )
68 @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
69 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
70 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
71 Boolean updateRepositoryGroup( RepositoryGroup repositoryGroup )
72 throws ArchivaRestServiceException;
74 @Path( "deleteRepositoryGroup/{repositoryGroupId}" )
76 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
77 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
78 Boolean deleteRepositoryGroup( @PathParam( "repositoryGroupId" ) String repositoryGroupId )
79 throws ArchivaRestServiceException;
81 @Path( "addRepositoryToGroup" )
83 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
84 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
85 Boolean addRepositoryToGroup( @QueryParam( "repositoryGroupId" ) String repositoryGroupId,
86 @QueryParam( "repositoryId" ) String repositoryId )
87 throws ArchivaRestServiceException;
89 @Path( "addRepositoryToGroup" )
91 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
92 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
93 Boolean deleteRepositoryFromGroup( @QueryParam( "repositoryGroupId" ) String repositoryGroupId,
94 @QueryParam( "repositoryId" ) String repositoryId )
95 throws ArchivaRestServiceException;