]> source.dussan.org Git - archiva.git/blob
3573b7f61aaefd00f8ee5713295024d9b3a7c123
[archiva.git] /
1 package org.apache.archiva.rest.api.services;
2 /*
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
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
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
18  * under the License.
19  */
20
21 import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
22 import org.apache.archiva.admin.model.beans.LdapConfiguration;
23 import org.apache.archiva.redback.authorization.RedbackAuthorization;
24 import org.apache.archiva.rest.api.model.RBACManagerImplementationInformation;
25 import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
26 import org.apache.archiva.security.common.ArchivaRoleConstants;
27
28 import javax.ws.rs.Consumes;
29 import javax.ws.rs.GET;
30 import javax.ws.rs.POST;
31 import javax.ws.rs.PUT;
32 import javax.ws.rs.Path;
33 import javax.ws.rs.Produces;
34 import javax.ws.rs.core.MediaType;
35 import java.util.List;
36
37 /**
38  * @author Olivier Lamy
39  * @since 1.4-M4
40  */
41 @Path("/redbackRuntimeConfigurationService/")
42 public interface RedbackRuntimeConfigurationService
43 {
44     @Path("redbackRuntimeConfiguration")
45     @GET
46     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
47     @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
48     RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
49         throws ArchivaRestServiceException;
50
51     @Path("redbackRuntimeConfiguration")
52     @PUT
53     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
54     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
55     @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
56     Boolean updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
57         throws ArchivaRestServiceException;
58
59     @Path("userManagerImplementationInformations")
60     @GET
61     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
62     @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
63     List<UserManagerImplementationInformation> getUserManagerImplementationInformations()
64         throws ArchivaRestServiceException;
65
66     @Path("rbacManagerImplementationInformations")
67     @GET
68     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
69     @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
70     List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations()
71         throws ArchivaRestServiceException;
72
73
74     @Path( "checkLdapConnection" )
75     @GET
76     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
77     @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
78     Boolean checkLdapConnection()
79         throws ArchivaRestServiceException;
80
81     @Path( "checkLdapConnection" )
82     @POST
83     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
84     @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
85     @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
86     Boolean checkLdapConnection( LdapConfiguration ldapConfiguration )
87         throws ArchivaRestServiceException;
88 }