diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-02-14 13:22:03 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-02-18 11:35:25 -0500 |
commit | e4c002c7a47025ec99ee11f093749a2cc50f22d2 (patch) | |
tree | bd62ee2f477e5d8bf41cd0600c52dfdea39e222e /base/common/src/com/netscape/certsrv/logging | |
parent | 841672c941c1d1cb3ae7a4b2a678e7e5521bccf6 (diff) | |
download | pki-e4c002c7a47025ec99ee11f093749a2cc50f22d2.tar.gz pki-e4c002c7a47025ec99ee11f093749a2cc50f22d2.tar.xz pki-e4c002c7a47025ec99ee11f093749a2cc50f22d2.zip |
Updated REST interface for audit.
The REST interface for audit has been modified to return Response
objects to allow better handling of server responses.
Ticket #554
Diffstat (limited to 'base/common/src/com/netscape/certsrv/logging')
-rw-r--r-- | base/common/src/com/netscape/certsrv/logging/AuditClient.java | 3 | ||||
-rw-r--r-- | base/common/src/com/netscape/certsrv/logging/AuditResource.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/AuditClient.java b/base/common/src/com/netscape/certsrv/logging/AuditClient.java index 959304d92..95d2c7fb4 100644 --- a/base/common/src/com/netscape/certsrv/logging/AuditClient.java +++ b/base/common/src/com/netscape/certsrv/logging/AuditClient.java @@ -41,7 +41,8 @@ public class AuditClient extends Client { } public AuditConfig getAuditConfig() { - return resource.getAuditConfig(); + Response response = resource.getAuditConfig(); + return client.getEntity(response, AuditConfig.class); } public AuditConfig updateAuditConfig(AuditConfig auditConfig) { diff --git a/base/common/src/com/netscape/certsrv/logging/AuditResource.java b/base/common/src/com/netscape/certsrv/logging/AuditResource.java index 4b705a5f9..1220b89bc 100644 --- a/base/common/src/com/netscape/certsrv/logging/AuditResource.java +++ b/base/common/src/com/netscape/certsrv/logging/AuditResource.java @@ -35,8 +35,9 @@ import org.jboss.resteasy.annotations.ClientResponseType; public interface AuditResource { @GET + @ClientResponseType(entityType=AuditConfig.class) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - public AuditConfig getAuditConfig(); + public Response getAuditConfig(); @PUT @ClientResponseType(entityType=AuditConfig.class) |