diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-01-30 05:23:17 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-03-04 22:49:04 -0500 |
commit | 316e66bf974eaaa576336e45670b6aaf90ba476c (patch) | |
tree | 9dc124f602ca5c746d58529a6073b6f6794d10e6 /base/common/src/com/netscape/certsrv/tps | |
parent | 56b9ead088c59ea76d796002e74d42d7e31eac44 (diff) | |
download | pki-316e66bf974eaaa576336e45670b6aaf90ba476c.tar.gz pki-316e66bf974eaaa576336e45670b6aaf90ba476c.tar.xz pki-316e66bf974eaaa576336e45670b6aaf90ba476c.zip |
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
Diffstat (limited to 'base/common/src/com/netscape/certsrv/tps')
7 files changed, 0 insertions, 70 deletions
diff --git a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java index 452f8ea56..ce570edf1 100644 --- a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java +++ b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorResource.java @@ -17,16 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.tps.authenticator; -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.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -45,7 +42,6 @@ public interface AuthenticatorResource { @GET @ClientResponseType(entityType=AuthenticatorCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findAuthenticators( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -53,22 +49,17 @@ public interface AuthenticatorResource { @GET @Path("{authenticatorID}") @ClientResponseType(entityType=AuthenticatorData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getAuthenticator(@PathParam("authenticatorID") String authenticatorID); @POST @ACLMapping("authenticators.add") @ClientResponseType(entityType=AuthenticatorData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addAuthenticator(AuthenticatorData authenticatorData); @PUT @Path("{authenticatorID}") @ACLMapping("authenticators.modify") @ClientResponseType(entityType=AuthenticatorData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response updateAuthenticator( @PathParam("authenticatorID") String authenticatorID, AuthenticatorData authenticatorData); @@ -77,8 +68,6 @@ public interface AuthenticatorResource { @Path("{authenticatorID}") @ACLMapping("authenticators.approve") @ClientResponseType(entityType=AuthenticatorData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response changeAuthenticatorStatus( @PathParam("authenticatorID") String authenticatorID, @QueryParam("action") String action); @@ -87,6 +76,5 @@ public interface AuthenticatorResource { @Path("{authenticatorID}") @ClientResponseType(entityType=Void.class) @ACLMapping("authenticators.remove") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeAuthenticator(@PathParam("authenticatorID") String authenticatorID); } diff --git a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java index 2ea24eed8..cf95dad89 100644 --- a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java +++ b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertResource.java @@ -20,9 +20,7 @@ package com.netscape.certsrv.tps.cert; import javax.ws.rs.GET; 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.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -36,7 +34,6 @@ public interface TPSCertResource { @GET @ClientResponseType(entityType=TPSCertCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findCerts( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -44,6 +41,5 @@ public interface TPSCertResource { @GET @Path("{certID}") @ClientResponseType(entityType=TPSCertData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getCert(@PathParam("certID") String certID); } diff --git a/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java b/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java index 6c2187a2a..a7f33fada 100644 --- a/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java +++ b/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java @@ -17,12 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.tps.config; -import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -41,13 +38,10 @@ public interface ConfigResource { @GET @ClientResponseType(entityType=ConfigData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getConfig(); @PUT @ClientResponseType(entityType=ConfigData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("config.modify") public Response updateConfig(ConfigData configData); } diff --git a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java index 72334a04b..136cc8784 100644 --- a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java +++ b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionResource.java @@ -17,16 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.tps.connection; -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.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -45,7 +42,6 @@ public interface ConnectionResource { @GET @ClientResponseType(entityType=ConnectionCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findConnections( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -53,22 +49,17 @@ public interface ConnectionResource { @GET @Path("{connectionID}") @ClientResponseType(entityType=ConnectionData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getConnection(@PathParam("connectionID") String connectionID); @POST @ACLMapping("connections.add") @ClientResponseType(entityType=ConnectionData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addConnection(ConnectionData connectionData); @PUT @Path("{connectionID}") @ACLMapping("connections.modify") @ClientResponseType(entityType=ConnectionData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response updateConnection( @PathParam("connectionID") String connectionID, ConnectionData connectionData); @@ -77,8 +68,6 @@ public interface ConnectionResource { @Path("{connectionID}") @ACLMapping("connections.approve") @ClientResponseType(entityType=ConnectionData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response changeConnectionStatus( @PathParam("connectionID") String connectionID, @QueryParam("action") String action); @@ -87,6 +76,5 @@ public interface ConnectionResource { @Path("{connectionID}") @ClientResponseType(entityType=Void.class) @ACLMapping("connections.remove") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeConnection(@PathParam("connectionID") String connectionID); } diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java index 19d62bce0..694a1810e 100644 --- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java +++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java @@ -17,16 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.tps.profile; -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.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -45,7 +42,6 @@ public interface ProfileMappingResource { @GET @ClientResponseType(entityType=ProfileMappingCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findProfileMappings( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -53,22 +49,17 @@ public interface ProfileMappingResource { @GET @Path("{profileMappingID}") @ClientResponseType(entityType=ProfileMappingData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getProfileMapping(@PathParam("profileMappingID") String profileMappingID); @POST @ACLMapping("profile-mappings.add") @ClientResponseType(entityType=ProfileMappingData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addProfileMapping(ProfileMappingData profileMappingData); @PUT @Path("{profileMappingID}") @ACLMapping("profile-mappings.modify") @ClientResponseType(entityType=ProfileMappingData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response updateProfileMapping( @PathParam("profileMappingID") String profileMappingID, ProfileMappingData profileMappingData); @@ -77,8 +68,6 @@ public interface ProfileMappingResource { @Path("{profileMappingID}") @ACLMapping("profiles-mappings.approve") @ClientResponseType(entityType=ProfileMappingData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response changeProfileMappingStatus( @PathParam("profileMappingID") String profileMappingID, @QueryParam("action") String action); @@ -87,6 +76,5 @@ public interface ProfileMappingResource { @Path("{profileMappingID}") @ClientResponseType(entityType=Void.class) @ACLMapping("profile-mappings.remove") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeProfileMapping(@PathParam("profileMappingID") String profileMappingID); } diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java index 45e0520c4..4cb466f2f 100644 --- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java +++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileResource.java @@ -17,16 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.tps.profile; -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.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -45,7 +42,6 @@ public interface ProfileResource { @GET @ClientResponseType(entityType=ProfileCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findProfiles( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -53,22 +49,17 @@ public interface ProfileResource { @GET @Path("{profileID}") @ClientResponseType(entityType=ProfileData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getProfile(@PathParam("profileID") String profileID); @POST @ACLMapping("profiles.add") @ClientResponseType(entityType=ProfileData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addProfile(ProfileData profileData); @PUT @Path("{profileID}") @ACLMapping("profiles.modify") @ClientResponseType(entityType=ProfileData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response updateProfile( @PathParam("profileID") String profileID, ProfileData profileData); @@ -77,8 +68,6 @@ public interface ProfileResource { @Path("{profileID}") @ACLMapping("profiles.approve") @ClientResponseType(entityType=ProfileData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response changeProfileStatus( @PathParam("profileID") String profileID, @QueryParam("action") String action); @@ -87,6 +76,5 @@ public interface ProfileResource { @Path("{profileID}") @ClientResponseType(entityType=Void.class) @ACLMapping("profiles.remove") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeProfile(@PathParam("profileID") String profileID); } diff --git a/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java b/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java index 294ace128..f88ce399c 100644 --- a/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java +++ b/base/common/src/com/netscape/certsrv/tps/token/TokenResource.java @@ -17,16 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.tps.token; -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.PathParam; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -46,7 +43,6 @@ public interface TokenResource { @GET @ClientResponseType(entityType=TokenCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findTokens( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -54,21 +50,16 @@ public interface TokenResource { @GET @Path("{tokenID}") @ClientResponseType(entityType=TokenData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getToken(@PathParam("tokenID") String tokenID); @POST @ClientResponseType(entityType=TokenData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("tokens.add") public Response addToken(TokenData tokenData); @PUT @Path("{tokenID}") @ClientResponseType(entityType=TokenData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("tokens.modify") public Response replaceToken( @PathParam("tokenID") String tokenID, @@ -77,8 +68,6 @@ public interface TokenResource { @PATCH @Path("{tokenID}") @ClientResponseType(entityType=TokenData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("tokens.modify") public Response modifyToken( @PathParam("tokenID") String tokenID, @@ -87,7 +76,6 @@ public interface TokenResource { @DELETE @Path("{tokenID}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("tokens.remove") public Response removeToken(@PathParam("tokenID") String tokenID); } |