From 316e66bf974eaaa576336e45670b6aaf90ba476c Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 30 Jan 2014 05:23:17 -0500 Subject: Removed @Consumes and @Provides. The @Consumes and @Provides annotations have been removed from all methods (except from methods that consume forms) to allow client to use the default consumes and provides specified in the proxy. Ticket #554 --- base/common/src/com/netscape/certsrv/key/KeyRequestResource.java | 6 ------ base/common/src/com/netscape/certsrv/key/KeyResource.java | 8 -------- 2 files changed, 14 deletions(-) (limited to 'base/common/src/com/netscape/certsrv/key') diff --git a/base/common/src/com/netscape/certsrv/key/KeyRequestResource.java b/base/common/src/com/netscape/certsrv/key/KeyRequestResource.java index f5a652872..fb82afe19 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyRequestResource.java +++ b/base/common/src/com/netscape/certsrv/key/KeyRequestResource.java @@ -5,7 +5,6 @@ import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; @@ -41,7 +40,6 @@ public interface KeyRequestResource { */ @GET @ClientResponseType(entityType=KeyRequestInfoCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response listRequests(@QueryParam("requestState") String requestState, @QueryParam("requestType") String requestType, @QueryParam("clientKeyID") String clientKeyID, @@ -52,14 +50,11 @@ public interface KeyRequestResource { @POST @ClientResponseType(entityType=KeyRequestResponse.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_FORM_URLENCODED}) public Response createRequest(MultivaluedMap form); @POST @ClientResponseType(entityType=KeyRequestResponse.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response createRequest(ResourceMessage data); /** @@ -68,7 +63,6 @@ public interface KeyRequestResource { @GET @Path("{id}") @ClientResponseType(entityType=KeyRequestInfo.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getRequestInfo(@PathParam("id") RequestId id); @POST diff --git a/base/common/src/com/netscape/certsrv/key/KeyResource.java b/base/common/src/com/netscape/certsrv/key/KeyResource.java index 4b1281a4f..4ec577dbf 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyResource.java +++ b/base/common/src/com/netscape/certsrv/key/KeyResource.java @@ -5,7 +5,6 @@ import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; @@ -25,7 +24,6 @@ public interface KeyResource { @GET @ClientResponseType(entityType=KeyInfoCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response listKeys(@QueryParam("clientKeyID") String clientKeyID, @QueryParam("status") String status, @QueryParam("maxResults") Integer maxResults, @@ -36,19 +34,16 @@ public interface KeyResource { @GET @Path("active/{clientKeyID}") @ClientResponseType(entityType=KeyInfo.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getActiveKeyInfo(@PathParam("clientKeyID") String clientKeyID); @GET @Path("{id}") @ClientResponseType(entityType=KeyInfo.class) - @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getKeyInfo(@PathParam("id") KeyId id); @POST @Path("{id}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response modifyKeyStatus(@PathParam("id") KeyId id, @QueryParam("status") String status); @@ -60,15 +55,12 @@ public interface KeyResource { @POST @Path("retrieve") @ClientResponseType(entityType=KeyData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response retrieveKey(KeyRecoveryRequest data); // retrieval - used to test integration with a browser @POST @Path("retrieve") @ClientResponseType(entityType=KeyData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) public Response retrieveKey(MultivaluedMap form); } -- cgit