This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.rest.api.services;
002/*
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 *   http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing,
014 * software distributed under the License is distributed on an
015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016 * KIND, either express or implied.  See the License for the
017 * specific language governing permissions and limitations
018 * under the License.
019 */
020
021import org.apache.archiva.admin.model.beans.LdapConfiguration;
022import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
023import org.apache.archiva.redback.authorization.RedbackAuthorization;
024import org.apache.archiva.rest.api.model.RBACManagerImplementationInformation;
025import org.apache.archiva.rest.api.model.RedbackImplementationsInformations;
026import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
027import org.apache.archiva.security.common.ArchivaRoleConstants;
028
029import javax.ws.rs.Consumes;
030import javax.ws.rs.GET;
031import javax.ws.rs.POST;
032import javax.ws.rs.PUT;
033import javax.ws.rs.Path;
034import javax.ws.rs.Produces;
035import javax.ws.rs.core.MediaType;
036import java.util.List;
037
038/**
039 * @author Olivier Lamy
040 * @since 1.4-M4
041 */
042@Path("/redbackRuntimeConfigurationService/")
043public interface RedbackRuntimeConfigurationService
044{
045    @Path("redbackRuntimeConfiguration")
046    @GET
047    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
048    @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
049    RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
050        throws ArchivaRestServiceException;
051
052    @Path("redbackRuntimeConfiguration")
053    @PUT
054    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
055    @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
056    @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
057    Boolean updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
058        throws ArchivaRestServiceException;
059
060    @Path("userManagerImplementationInformations")
061    @GET
062    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
063    @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
064    List<UserManagerImplementationInformation> getUserManagerImplementationInformations()
065        throws ArchivaRestServiceException;
066
067    @Path("rbacManagerImplementationInformations")
068    @GET
069    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
070    @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
071    List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations()
072        throws ArchivaRestServiceException;
073
074
075    @Path("redbackImplementationsInformations")
076    @GET
077    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
078    @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
079    RedbackImplementationsInformations getRedbackImplementationsInformations()
080        throws ArchivaRestServiceException;
081
082    @Path( "checkLdapConnection" )
083    @GET
084    @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
085    @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
086    Boolean checkLdapConnection()
087        throws ArchivaRestServiceException;
088
089    @Path("checkLdapConnection")
090    @POST
091    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
092    @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
093    @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
094    Boolean checkLdapConnection( LdapConfiguration ldapConfiguration )
095        throws ArchivaRestServiceException;
096}