summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
committerAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
commit171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch)
tree1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
parentadad2fcee8a29fdb82376fbce07dedb11fccc182 (diff)
downloadpki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java68
1 files changed, 30 insertions, 38 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
index 2d064ae8..1cbd3229 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordMapper.java
@@ -17,6 +17,7 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.dbs;
+
import java.math.BigInteger;
import java.util.Enumeration;
import java.util.Vector;
@@ -32,12 +33,14 @@ import com.netscape.certsrv.dbs.IDBObj;
import com.netscape.certsrv.dbs.keydb.IKeyRecord;
import com.netscape.certsrv.dbs.keydb.IKeyRepository;
import com.netscape.certsrv.logging.ILogger;
+
/**
- * A class represents a mapper to serialize key record into database.
+ * A class represents a mapper to serialize
+ * key record into database.
* <P>
- *
- * @author thomask
+ *
+ * @author thomask
* @version $Revision$, $Date$
*/
public class KeyRecordMapper implements IDBAttrMapper {
@@ -56,8 +59,8 @@ public class KeyRecordMapper implements IDBAttrMapper {
return v.elements();
}
- public void mapObjectToLDAPAttributeSet(IDBObj parent, String name,
- Object obj, LDAPAttributeSet attrs) throws EBaseException {
+ public void mapObjectToLDAPAttributeSet(IDBObj parent, String name,
+ Object obj, LDAPAttributeSet attrs) throws EBaseException {
try {
KeyRecord rec = (KeyRecord) obj;
@@ -65,58 +68,47 @@ public class KeyRecordMapper implements IDBAttrMapper {
rec.getSerialNumber().toString()));
} catch (Exception e) {
- /*
- * LogDoc
- *
- * @phase Maps object to ldap attribute set
- *
+ /*LogDoc
+ *
+ * @phase Maps object to ldap attribute set
* @message KeyRecordMapper: <exception thrown>
*/
- mLogger.log(
- ILogger.EV_SYSTEM,
- ILogger.S_DB,
- ILogger.LL_FAILURE,
- CMS.getLogMessage("CMSCORE_DBS_KEYRECORD_MAPPER_ERROR",
- e.toString()));
- throw new EDBException(CMS.getUserMessage(
- "CMS_DBS_SERIALIZE_FAILED", name));
+ mLogger.log(ILogger.EV_SYSTEM, ILogger.S_DB, ILogger.LL_FAILURE,
+ CMS.getLogMessage("CMSCORE_DBS_KEYRECORD_MAPPER_ERROR", e.toString()));
+ throw new EDBException(
+ CMS.getUserMessage("CMS_DBS_SERIALIZE_FAILED", name));
}
}
- public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs,
- String name, IDBObj parent) throws EBaseException {
- try {
- LDAPAttribute attr = attrs
- .getAttribute(KeyDBSchema.LDAP_ATTR_KEY_RECORD_ID);
+ public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs,
+ String name, IDBObj parent) throws EBaseException {
+ try {
+ LDAPAttribute attr = attrs.getAttribute(
+ KeyDBSchema.LDAP_ATTR_KEY_RECORD_ID);
if (attr == null)
return;
String serialno = (String) attr.getStringValues().nextElement();
- IKeyRecord rec = mDB.readKeyRecord(new BigInteger(serialno));
+ IKeyRecord rec = mDB.readKeyRecord(new
+ BigInteger(serialno));
parent.set(name, rec);
} catch (Exception e) {
- /*
- * LogDoc
- *
- * @phase Maps ldap attribute set to object
- *
+ /*LogDoc
+ *
+ * @phase Maps ldap attribute set to object
* @message KeyRecordMapper: <exception thrown>
*/
- mLogger.log(
- ILogger.EV_SYSTEM,
- ILogger.S_DB,
- ILogger.LL_FAILURE,
- CMS.getLogMessage("CMSCORE_DBS_KEYRECORD_MAPPER_ERROR",
- e.toString()));
- throw new EDBException(CMS.getUserMessage(
- "CMS_DBS_DESERIALIZE_FAILED", name));
+ mLogger.log(ILogger.EV_SYSTEM, ILogger.S_DB, ILogger.LL_FAILURE,
+ CMS.getLogMessage("CMSCORE_DBS_KEYRECORD_MAPPER_ERROR", e.toString()));
+ throw new EDBException(
+ CMS.getUserMessage("CMS_DBS_DESERIALIZE_FAILED", name));
}
}
public String mapSearchFilter(String name, String op, String value)
- throws EBaseException {
+ throws EBaseException {
return name + op + value;
}
}