summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.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/CertRecordMapper.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/CertRecordMapper.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java41
1 files changed, 23 insertions, 18 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java
index 7eda230d5..510da3c54 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/CertRecordMapper.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;
@@ -33,11 +34,13 @@ import com.netscape.certsrv.dbs.certdb.ICertRecord;
import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
import com.netscape.cmscore.util.Debug;
+
/**
- * A class represents a mapper to serialize certificate record into database.
+ * A class represents a mapper to serialize
+ * certificate record into database.
* <P>
- *
- * @author thomask
+ *
+ * @author thomask
* @version $Revision$, $Date$
*/
public class CertRecordMapper implements IDBAttrMapper {
@@ -55,42 +58,44 @@ public class CertRecordMapper 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 {
CertRecord rec = (CertRecord) obj;
- attrs.add(new LDAPAttribute(CertDBSchema.LDAP_ATTR_CERT_RECORD_ID,
+ attrs.add(new LDAPAttribute(
+ CertDBSchema.LDAP_ATTR_CERT_RECORD_ID,
rec.getSerialNumber().toString()));
} catch (Exception e) {
Debug.trace(e.toString());
- throw new EDBException(CMS.getUserMessage(
- "CMS_DBS_SERIALIZE_FAILED", name));
+ 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(CertDBSchema.LDAP_ATTR_CERT_RECORD_ID);
+ public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs,
+ String name, IDBObj parent) throws EBaseException {
+ try {
+ LDAPAttribute attr = attrs.getAttribute(
+ CertDBSchema.LDAP_ATTR_CERT_RECORD_ID);
if (attr == null)
return;
String serialno = (String) attr.getStringValues().nextElement();
- ICertRecord rec = mDB
- .readCertificateRecord(new BigInteger(serialno));
+ ICertRecord rec = mDB.readCertificateRecord(
+ new BigInteger(serialno));
parent.set(name, rec);
} catch (Exception e) {
Debug.trace(e.toString());
- throw new EDBException(CMS.getUserMessage(
- "CMS_DBS_DESERIALIZE_FAILED", name));
+ 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;
}
}