diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-02-10 13:56:15 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-03-04 22:41:46 -0500 |
commit | 56b9ead088c59ea76d796002e74d42d7e31eac44 (patch) | |
tree | 38473afc8d126936ef806b44af2aae01f2ab8fcd /base/common/src/com/netscape/certsrv/base | |
parent | 9e14d6f3e5e69093067f0a76e5b7090c102e11d3 (diff) | |
download | pki-56b9ead088c59ea76d796002e74d42d7e31eac44.tar.gz pki-56b9ead088c59ea76d796002e74d42d7e31eac44.tar.xz pki-56b9ead088c59ea76d796002e74d42d7e31eac44.zip |
Added CLI parameter to select message format.
A new CLI parameter has been added to allow the user select the
REST message format. This is done by setting the default consumes
and produces when creating the client proxy. For this to work the
hard-coded @Consumes and @Produces annotations need to be removed
from the interface definition. A new interceptor has been added
to validate the message format before executing the operation.
Ticket #554
Diffstat (limited to 'base/common/src/com/netscape/certsrv/base')
-rw-r--r-- | base/common/src/com/netscape/certsrv/base/PKIException.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/base/PKIException.java b/base/common/src/com/netscape/certsrv/base/PKIException.java index ad55d139e..f89c1b18c 100644 --- a/base/common/src/com/netscape/certsrv/base/PKIException.java +++ b/base/common/src/com/netscape/certsrv/base/PKIException.java @@ -31,6 +31,11 @@ public class PKIException extends RuntimeException { public int code; + public PKIException(Response.Status status) { + super(status.getReasonPhrase()); + code = status.getStatusCode(); + } + public PKIException(String message) { super(message); code = Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(); |