From 0b39b68e4e72cbcf0f4d28488d54ce06117efa9c Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 1 Mar 2012 19:58:34 -0600 Subject: Added CMSException. The CMSException was added to simplify error handling in REST services. The exception may include an error message and some other attributes. When the server throws a CMSException (or its subclass), the exception will be marshalled into XML and unmarshalled by the client, then thrown again as a new exception which can be caught by the application. Ticket #100 --- base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'base/common/src/com/netscape/certsrv/dbs') diff --git a/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java b/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java index f998bf97a..b8bb1870b 100644 --- a/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java +++ b/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java @@ -95,6 +95,17 @@ public class KeyId { return value.toString(); } + /** + * Converts the KeyId into its hex string representation. The string + * form can be stored in a database (such as the LDAP directory) + * + * @return + * a string containing the hex (hex 16) value for the identifier. + */ + public String toHexString() { + return "0x"+value.toString(16); + } + @Override public int hashCode() { final int prime = 31; -- cgit