From 9086d2f5fc486617b86fef0b465572189eedc05a Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 30 Jan 2013 17:43:13 +0000 Subject: [PATCH] use a better name for the interface git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1440549 13f79535-47bb-0310-9956-ffa450edef68 --- ...vice.java => LdapGroupMappingService.java} | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) rename redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/{LdapService.java => LdapGroupMappingService.java} (58%) diff --git a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LdapService.java b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LdapGroupMappingService.java similarity index 58% rename from redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LdapService.java rename to redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LdapGroupMappingService.java index dd7a64593..170cfeb09 100644 --- a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LdapService.java +++ b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LdapGroupMappingService.java @@ -22,7 +22,11 @@ import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants; import org.apache.archiva.redback.rest.api.model.LdapGroupMapping; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; @@ -33,10 +37,10 @@ import java.util.List; * @author Olivier Lamy * @since 2.1 */ -@Path( "/ldapService/" ) -public interface LdapService +@Path( "/ldapGroupMappingService/" ) +public interface LdapGroupMappingService { - @Path( "groups" ) + @Path( "ldapGroups" ) @GET @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @RedbackAuthorization( permissions = RedbackRoleConstants.USER_ADMINISTRATOR_ROLE ) @@ -44,7 +48,6 @@ public interface LdapService throws RedbackServiceException; - @Path( "groupsMapping" ) @GET @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @RedbackAuthorization( permissions = RedbackRoleConstants.USER_ADMINISTRATOR_ROLE ) @@ -52,5 +55,25 @@ public interface LdapService throws RedbackServiceException; + @PUT + @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @RedbackAuthorization( permissions = RedbackRoleConstants.USER_ADMINISTRATOR_ROLE ) + Boolean addLdapGroupMapping( LdapGroupMapping ldapGroupMapping ) + throws RedbackServiceException; + + @DELETE + @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @RedbackAuthorization( permissions = RedbackRoleConstants.USER_ADMINISTRATOR_ROLE ) + Boolean removeLdapGroupMapping( String group ) + throws RedbackServiceException; + + @POST + @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @RedbackAuthorization( permissions = RedbackRoleConstants.USER_ADMINISTRATOR_ROLE ) + Boolean updateLdapGroupMapping( LdapGroupMapping ldapGroupMapping ) + throws RedbackServiceException; } -- 2.39.5