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 | |
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
22 files changed, 0 insertions, 206 deletions
diff --git a/base/common/src/com/netscape/certsrv/cert/CertRequestResource.java b/base/common/src/com/netscape/certsrv/cert/CertRequestResource.java index e1514293b..b9ae1f1fe 100644 --- a/base/common/src/com/netscape/certsrv/cert/CertRequestResource.java +++ b/base/common/src/com/netscape/certsrv/cert/CertRequestResource.java @@ -22,7 +22,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; @@ -42,15 +41,12 @@ public interface CertRequestResource { @POST @Path("certrequests") @ClientResponseType(entityType=CertRequestInfos.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) public Response enrollCert(MultivaluedMap<String, String> form); @POST @Path("certrequests") @ClientResponseType(entityType=CertRequestInfos.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response enrollCert(CertEnrollmentRequest data); /** @@ -59,7 +55,6 @@ public interface CertRequestResource { @GET @Path("certrequests/{id}") @ClientResponseType(entityType=CertRequestInfo.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getRequestInfo(@PathParam("id") RequestId id); /** @@ -68,7 +63,6 @@ public interface CertRequestResource { @GET @Path("agent/certrequests") @ClientResponseType(entityType=CertRequestInfos.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response listRequests(@QueryParam("requestState") String requestState, @@ -81,7 +75,6 @@ public interface CertRequestResource { @GET @Path("agent/certrequests/{id}") @ClientResponseType(entityType=CertReviewResponse.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response reviewRequest(@PathParam("id") RequestId id); @@ -89,7 +82,6 @@ public interface CertRequestResource { @GET @Path("certrequests/profiles") @ClientResponseType(entityType=ProfileDataInfos.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response listEnrollmentTemplates( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -97,13 +89,11 @@ public interface CertRequestResource { @GET @Path("certrequests/profiles/{id}") @ClientResponseType(entityType=CertEnrollmentRequest.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getEnrollmentTemplate(@PathParam("id") String id); @POST @Path("agent/certrequests/{id}/approve") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response approveRequest(@PathParam("id") RequestId id, CertReviewResponse data); @@ -111,7 +101,6 @@ public interface CertRequestResource { @POST @Path("agent/certrequests/{id}/reject") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response rejectRequest(@PathParam("id") RequestId id, CertReviewResponse data); @@ -119,7 +108,6 @@ public interface CertRequestResource { @POST @Path("agent/certrequests/{id}/cancel") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response cancelRequest(@PathParam("id") RequestId id, CertReviewResponse data); @@ -127,7 +115,6 @@ public interface CertRequestResource { @POST @Path("agent/certrequests/{id}/update") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response updateRequest(@PathParam("id") RequestId id, CertReviewResponse data); @@ -135,7 +122,6 @@ public interface CertRequestResource { @POST @Path("agent/certrequests/{id}/validate") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response validateRequest(@PathParam("id") RequestId id, CertReviewResponse data); @@ -143,7 +129,6 @@ public interface CertRequestResource { @POST @Path("agent/certrequests/{id}/unassign") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response unassignRequest(@PathParam("id") RequestId id, CertReviewResponse data); @@ -151,7 +136,6 @@ public interface CertRequestResource { @POST @Path("agent/certrequests/{id}/assign") @ClientResponseType(entityType=Void.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certrequests") @AuthMethodMapping("certrequests") public Response assignRequest(@PathParam("id") RequestId id, CertReviewResponse data); diff --git a/base/common/src/com/netscape/certsrv/cert/CertResource.java b/base/common/src/com/netscape/certsrv/cert/CertResource.java index 23e898755..c5a5823ea 100644 --- a/base/common/src/com/netscape/certsrv/cert/CertResource.java +++ b/base/common/src/com/netscape/certsrv/cert/CertResource.java @@ -1,13 +1,10 @@ package com.netscape.certsrv.cert; -import javax.ws.rs.Consumes; 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.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -22,7 +19,6 @@ public interface CertResource { @GET @Path("certs") @ClientResponseType(entityType=CertDataInfos.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response listCerts( @QueryParam("status") String status, @QueryParam("maxResults") Integer maxResults, @@ -33,8 +29,6 @@ public interface CertResource { @POST @Path("certs/search") @ClientResponseType(entityType=CertDataInfos.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response searchCerts( CertSearchRequest data, @QueryParam("start") Integer start, @@ -43,13 +37,11 @@ public interface CertResource { @GET @Path("certs/{id}") @ClientResponseType(entityType=CertData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getCert(@PathParam("id") CertId id); @GET @Path("agent/certs/{id}") @ClientResponseType(entityType=CertData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certs") @AuthMethodMapping("certs") public Response reviewCert(@PathParam("id") CertId id); @@ -57,8 +49,6 @@ public interface CertResource { @POST @Path("agent/certs/{id}/revoke-ca") @ClientResponseType(entityType=CertRequestInfo.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certs") @AuthMethodMapping("certs") public Response revokeCACert(@PathParam("id") CertId id, CertRevokeRequest request); @@ -66,8 +56,6 @@ public interface CertResource { @POST @Path("agent/certs/{id}/revoke") @ClientResponseType(entityType=CertRequestInfo.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certs") @AuthMethodMapping("certs") public Response revokeCert(@PathParam("id") CertId id, CertRevokeRequest request); @@ -75,8 +63,6 @@ public interface CertResource { @POST @Path("agent/certs/{id}/unrevoke") @ClientResponseType(entityType=CertRequestInfo.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("certs") @AuthMethodMapping("certs") public Response unrevokeCert(@PathParam("id") CertId id, CertUnrevokeRequest request); diff --git a/base/common/src/com/netscape/certsrv/group/GroupResource.java b/base/common/src/com/netscape/certsrv/group/GroupResource.java index f1dfe4026..2f42f4aa7 100644 --- a/base/common/src/com/netscape/certsrv/group/GroupResource.java +++ b/base/common/src/com/netscape/certsrv/group/GroupResource.java @@ -18,15 +18,12 @@ package com.netscape.certsrv.group; -import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; 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.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -45,7 +42,6 @@ public interface GroupResource { @GET @ClientResponseType(entityType=GroupCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findGroups( @QueryParam("filter") String filter, @QueryParam("start") Integer start, @@ -53,33 +49,26 @@ public interface GroupResource { @POST @ClientResponseType(entityType=GroupData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addGroup(GroupData groupData); @GET @Path("{groupID}") @ClientResponseType(entityType=GroupData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getGroup(@PathParam("groupID") String groupID); @PATCH @Path("{groupID}") @ClientResponseType(entityType=GroupData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response modifyGroup(@PathParam("groupID") String groupID, GroupData groupData); @DELETE @Path("{groupID}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeGroup(@PathParam("groupID") String groupID); @GET @Path("{groupID}/members") @ClientResponseType(entityType=GroupMemberCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findGroupMembers( @PathParam("groupID") String groupID, @QueryParam("start") Integer start, @@ -88,19 +77,15 @@ public interface GroupResource { @POST @Path("{groupID}/members") @ClientResponseType(entityType=GroupMemberData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addGroupMember(@PathParam("groupID") String groupID, String memberID); @GET @Path("{groupID}/members/{memberID}") @ClientResponseType(entityType=GroupMemberData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getGroupMember(@PathParam("groupID") String groupID, @PathParam("memberID") String memberID); @DELETE @Path("{groupID}/members/{memberID}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeGroupMember(@PathParam("groupID") String groupID, @PathParam("memberID") String memberID); } 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<String, String> 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<String, String> form); } diff --git a/base/common/src/com/netscape/certsrv/logging/ActivityResource.java b/base/common/src/com/netscape/certsrv/logging/ActivityResource.java index 715233e63..bc6d375ca 100644 --- a/base/common/src/com/netscape/certsrv/logging/ActivityResource.java +++ b/base/common/src/com/netscape/certsrv/logging/ActivityResource.java @@ -20,9 +20,7 @@ package com.netscape.certsrv.logging; 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 ActivityResource { @GET @ClientResponseType(entityType=ActivityCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findActivities( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -44,6 +41,5 @@ public interface ActivityResource { @GET @Path("{activityID}") @ClientResponseType(entityType=ActivityData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getActivity(@PathParam("activityID") String activityID); } diff --git a/base/common/src/com/netscape/certsrv/logging/AuditResource.java b/base/common/src/com/netscape/certsrv/logging/AuditResource.java index 1220b89bc..13be4d827 100644 --- a/base/common/src/com/netscape/certsrv/logging/AuditResource.java +++ b/base/common/src/com/netscape/certsrv/logging/AuditResource.java @@ -17,12 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.logging; -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; @@ -36,12 +33,9 @@ public interface AuditResource { @GET @ClientResponseType(entityType=AuditConfig.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getAuditConfig(); @PUT @ClientResponseType(entityType=AuditConfig.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response updateAuditConfig(AuditConfig configData); } diff --git a/base/common/src/com/netscape/certsrv/profile/ProfileResource.java b/base/common/src/com/netscape/certsrv/profile/ProfileResource.java index 28b173bd4..87449b27e 100644 --- a/base/common/src/com/netscape/certsrv/profile/ProfileResource.java +++ b/base/common/src/com/netscape/certsrv/profile/ProfileResource.java @@ -1,15 +1,12 @@ package com.netscape.certsrv.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; @@ -24,7 +21,6 @@ public interface ProfileResource { @GET @ClientResponseType(entityType=ProfileDataInfos.class) @ACLMapping("profiles.list") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response listProfiles( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -33,36 +29,28 @@ public interface ProfileResource { @Path("{id}") @ClientResponseType(entityType=ProfileData.class) @ACLMapping("profiles.read") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response retrieveProfile(@PathParam("id") String id); @POST @ClientResponseType(entityType=ProfileData.class) @ACLMapping("profiles.create") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response createProfile(ProfileData data); @POST @Path("{id}") @ClientResponseType(entityType=Void.class) @ACLMapping("profiles.approve") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response modifyProfileState(@PathParam("id") String id, @QueryParam("action") String action); @PUT @Path("{id}") @ClientResponseType(entityType=ProfileData.class) @ACLMapping("profiles.modify") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response modifyProfile(@PathParam("id") String id, ProfileData data); @DELETE @Path("{id}") @ClientResponseType(entityType=Void.class) @ACLMapping("profiles.delete") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response deleteProfile(@PathParam("id") String id); - }
\ No newline at end of file diff --git a/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java b/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java index 35c322d86..90dfcb4b1 100644 --- a/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java +++ b/base/common/src/com/netscape/certsrv/selftests/SelfTestResource.java @@ -21,9 +21,7 @@ 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.Response; import org.jboss.resteasy.annotations.ClientResponseType; @@ -42,20 +40,17 @@ public interface SelfTestResource { @GET @ClientResponseType(entityType=SelfTestCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findSelfTests( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @POST @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("selftests.execute") public Response executeSelfTests(@QueryParam("action") String action); @GET @Path("{selfTestID}") @ClientResponseType(entityType=SelfTestData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getSelfTest(@PathParam("selfTestID") String selfTestID); } diff --git a/base/common/src/com/netscape/certsrv/system/KRAConnectorResource.java b/base/common/src/com/netscape/certsrv/system/KRAConnectorResource.java index 474994e9e..970224b9a 100644 --- a/base/common/src/com/netscape/certsrv/system/KRAConnectorResource.java +++ b/base/common/src/com/netscape/certsrv/system/KRAConnectorResource.java @@ -21,7 +21,6 @@ import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; @@ -38,19 +37,15 @@ public interface KRAConnectorResource { @POST @Path("add") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public void addConnector(KRAConnectorInfo info); @POST @Path("add") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) public void addConnector(MultivaluedMap<String, String> form); @POST @Path("remove") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) public void removeConnector(@FormParam("host") String host, @FormParam("port") String port); diff --git a/base/common/src/com/netscape/certsrv/system/SecurityDomainResource.java b/base/common/src/com/netscape/certsrv/system/SecurityDomainResource.java index 740786f79..7522c53a6 100644 --- a/base/common/src/com/netscape/certsrv/system/SecurityDomainResource.java +++ b/base/common/src/com/netscape/certsrv/system/SecurityDomainResource.java @@ -19,9 +19,7 @@ package com.netscape.certsrv.system; import javax.ws.rs.GET; import javax.ws.rs.Path; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import com.netscape.certsrv.acls.ACLMapping; import com.netscape.certsrv.authentication.AuthMethodMapping; @@ -34,7 +32,6 @@ public interface SecurityDomainResource { @GET @Path("installToken") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ACLMapping("securityDomain.installToken") @AuthMethodMapping("securityDomain.installToken") public InstallToken getInstallToken( @@ -43,6 +40,5 @@ public interface SecurityDomainResource { @GET @Path("domainInfo") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public DomainInfo getDomainInfo(); } diff --git a/base/common/src/com/netscape/certsrv/system/SystemCertResource.java b/base/common/src/com/netscape/certsrv/system/SystemCertResource.java index d13be9ab4..3a9d6e125 100644 --- a/base/common/src/com/netscape/certsrv/system/SystemCertResource.java +++ b/base/common/src/com/netscape/certsrv/system/SystemCertResource.java @@ -2,8 +2,6 @@ package com.netscape.certsrv.system; import javax.ws.rs.GET; 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; @@ -19,7 +17,6 @@ public interface SystemCertResource { @GET @Path("transport") @ClientResponseType(entityType=CertData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getTransportCert(); }
\ No newline at end of file diff --git a/base/common/src/com/netscape/certsrv/system/SystemConfigResource.java b/base/common/src/com/netscape/certsrv/system/SystemConfigResource.java index 2809baaa6..db4f35ac3 100644 --- a/base/common/src/com/netscape/certsrv/system/SystemConfigResource.java +++ b/base/common/src/com/netscape/certsrv/system/SystemConfigResource.java @@ -20,7 +20,6 @@ package com.netscape.certsrv.system; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; -import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; @@ -33,13 +32,10 @@ public interface SystemConfigResource { @POST @Path("configure") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) public ConfigurationResponse configure(MultivaluedMap<String, String> form); @POST @Path("configure") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public ConfigurationResponse configure(ConfigurationRequest data); } diff --git a/base/common/src/com/netscape/certsrv/system/TPSConnectorResource.java b/base/common/src/com/netscape/certsrv/system/TPSConnectorResource.java index 43213d0f4..af440d35e 100644 --- a/base/common/src/com/netscape/certsrv/system/TPSConnectorResource.java +++ b/base/common/src/com/netscape/certsrv/system/TPSConnectorResource.java @@ -17,16 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.system; -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; @@ -43,7 +40,6 @@ import com.netscape.certsrv.key.KeyData; public interface TPSConnectorResource { @GET @ClientResponseType(entityType=TPSConnectorCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findConnectors( @QueryParam("start") Integer start, @QueryParam("size") Integer size); @@ -51,27 +47,22 @@ public interface TPSConnectorResource { @GET @Path("{id}") @ClientResponseType(entityType=TPSConnectorData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getConnector(@PathParam("id") String id); @GET @Path("search") @ClientResponseType(entityType=TPSConnectorData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getConnector(@QueryParam("host") String host, @QueryParam("port") String port); @POST @ClientResponseType(entityType=TPSConnectorData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response createConnector(@QueryParam("host") String host, @QueryParam("port") String port); @POST @Path("{id}") @ClientResponseType(entityType=TPSConnectorData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response modifyConnector(@PathParam("id") String id, TPSConnectorData data); @DELETE @@ -83,14 +74,12 @@ public interface TPSConnectorResource { @Path("{id}/shared-secret") @ClientResponseType(entityType=KeyData.class) @ACLMapping("admin.sharedsecret") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response createSharedSecret(@PathParam("id") String id); @PUT @Path("{id}/shared-secret") @ClientResponseType(entityType=KeyData.class) @ACLMapping("admin.sharedsecret") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response replaceSharedSecret(@PathParam("id") String id); @DELETE @@ -101,7 +90,6 @@ public interface TPSConnectorResource { @DELETE @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response deleteConnector(@QueryParam("host") String host, @QueryParam("port") String port); @@ -109,6 +97,5 @@ public interface TPSConnectorResource { @Path("{id}/shared-secret") @ClientResponseType(entityType=KeyData.class) @ACLMapping("admin.sharedsecret") - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getSharedSecret(@PathParam("id") String id); } 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); } diff --git a/base/common/src/com/netscape/certsrv/user/UserResource.java b/base/common/src/com/netscape/certsrv/user/UserResource.java index cbda69a4c..771750f31 100644 --- a/base/common/src/com/netscape/certsrv/user/UserResource.java +++ b/base/common/src/com/netscape/certsrv/user/UserResource.java @@ -18,16 +18,13 @@ package com.netscape.certsrv.user; -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; @@ -49,7 +46,6 @@ public interface UserResource { @GET @ClientResponseType(entityType=UserCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findUsers( @QueryParam("filter") String filter, @QueryParam("start") Integer start, @@ -57,40 +53,31 @@ public interface UserResource { @POST @ClientResponseType(entityType=UserData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addUser(UserData userData); @GET @Path("{userID}") @ClientResponseType(entityType=UserData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getUser(@PathParam("userID") String userID); @PUT @Path("{userID}") @ClientResponseType(entityType=UserData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response replaceUser(@PathParam("userID") String userID, UserData userData); @PATCH @Path("{userID}") @ClientResponseType(entityType=UserData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response modifyUser(@PathParam("userID") String userID, UserData userData); @DELETE @Path("{userID}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeUser(@PathParam("userID") String userID); @GET @Path("{userID}/certs") @ClientResponseType(entityType=UserCertCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findUserCerts( @PathParam("userID") String userID, @QueryParam("start") Integer start, @@ -100,26 +87,21 @@ public interface UserResource { @POST @Path("{userID}/certs") @ClientResponseType(entityType=UserCertData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addUserCert(@PathParam("userID") String userID, UserCertData userCertData); @GET @Path("{userID}/certs/{certID}") @ClientResponseType(entityType=UserCertData.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response getUserCert(@PathParam("userID") String userID, @PathParam("certID") String certID); @DELETE @Path("{userID}/certs/{certID}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeUserCert(@PathParam("userID") String userID, @PathParam("certID") String certID); @GET @Path("{userID}/memberships") @ClientResponseType(entityType=UserMembershipCollection.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response findUserMemberships( @PathParam("userID") String userID, @QueryParam("start") Integer start, @@ -128,13 +110,10 @@ public interface UserResource { @POST @Path("{userID}/memberships") @ClientResponseType(entityType=UserMembershipData.class) - @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response addUserMembership(@PathParam("userID") String userID, String groupID); @DELETE @Path("{userID}/memberships/{groupID}") @ClientResponseType(entityType=Void.class) - @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response removeUserMembership(@PathParam("userID") String userID, @PathParam("groupID") String groupID); } |