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.LdapConfiguration;
22 import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
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.RedbackImplementationsInformations;
26 import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
27 import org.apache.archiva.security.common.ArchivaRoleConstants;
29 import javax.ws.rs.Consumes;
30 import javax.ws.rs.GET;
31 import javax.ws.rs.POST;
32 import javax.ws.rs.PUT;
33 import javax.ws.rs.Path;
34 import javax.ws.rs.Produces;
35 import javax.ws.rs.core.MediaType;
36 import java.util.List;
39 * @author Olivier Lamy
42 @Path("/redbackRuntimeConfigurationService/")
43 public interface RedbackRuntimeConfigurationService
45 @Path("redbackRuntimeConfiguration")
47 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
48 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
49 RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
50 throws ArchivaRestServiceException;
52 @Path("redbackRuntimeConfiguration")
54 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
55 @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
56 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
57 Boolean updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
58 throws ArchivaRestServiceException;
60 @Path("userManagerImplementationInformations")
62 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
63 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
64 List<UserManagerImplementationInformation> getUserManagerImplementationInformations()
65 throws ArchivaRestServiceException;
67 @Path("rbacManagerImplementationInformations")
69 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
70 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
71 List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations()
72 throws ArchivaRestServiceException;
75 @Path("redbackImplementationsInformations")
77 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
78 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
79 RedbackImplementationsInformations getRedbackImplementationsInformations()
80 throws ArchivaRestServiceException;
82 @Path( "checkLdapConnection" )
84 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
85 @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
86 Boolean checkLdapConnection()
87 throws ArchivaRestServiceException;
89 @Path("checkLdapConnection")
91 @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
92 @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
93 @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
94 Boolean checkLdapConnection( LdapConfiguration ldapConfiguration )
95 throws ArchivaRestServiceException;