This project has retired. For details please refer to its Attic page.
RedbackRuntimeConfigurationService xref
View Javadoc
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.RedbackImplementationsInformations;
26  import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
27  import org.apache.archiva.security.common.ArchivaRoleConstants;
28  
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;
37  
38  /**
39   * @author Olivier Lamy
40   * @since 1.4-M4
41   */
42  @Path("/redbackRuntimeConfigurationService/")
43  public interface RedbackRuntimeConfigurationService
44  {
45      @Path("redbackRuntimeConfiguration")
46      @GET
47      @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
48      @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
49      RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
50          throws ArchivaRestServiceException;
51  
52      @Path("redbackRuntimeConfiguration")
53      @PUT
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;
59  
60      @Path("userManagerImplementationInformations")
61      @GET
62      @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
63      @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
64      List<UserManagerImplementationInformation> getUserManagerImplementationInformations()
65          throws ArchivaRestServiceException;
66  
67      @Path("rbacManagerImplementationInformations")
68      @GET
69      @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
70      @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
71      List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations()
72          throws ArchivaRestServiceException;
73  
74  
75      @Path("redbackImplementationsInformations")
76      @GET
77      @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
78      @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
79      RedbackImplementationsInformations getRedbackImplementationsInformations()
80          throws ArchivaRestServiceException;
81  
82      @Path( "checkLdapConnection" )
83      @GET
84      @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
85      @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
86      Boolean checkLdapConnection()
87          throws ArchivaRestServiceException;
88  
89      @Path("checkLdapConnection")
90      @POST
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;
96  }