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 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;
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;
38 * @author Olivier Lamy
41 @Path("/redbackRuntimeConfigurationService/")
42 public interface RedbackRuntimeConfigurationService
44 @Path("redbackRuntimeConfiguration")
46 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
47 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
48 RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
49 throws ArchivaRestServiceException;
51 @Path("redbackRuntimeConfiguration")
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;
59 @Path("userManagerImplementationInformations")
61 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
62 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
63 List<UserManagerImplementationInformation> getUserManagerImplementationInformations()
64 throws ArchivaRestServiceException;
66 @Path("rbacManagerImplementationInformations")
68 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
69 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
70 List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations()
71 throws ArchivaRestServiceException;
74 @Path( "checkLdapConnection" )
76 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
77 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
78 Boolean checkLdapConnection()
79 throws ArchivaRestServiceException;
81 @Path( "checkLdapConnection" )
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;