diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java index 8a2d1f2d..88aeda3a 100644 --- a/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java +++ b/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.dbs; - import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.Enumeration; @@ -32,16 +31,14 @@ import com.netscape.certsrv.dbs.IDBAttrMapper; import com.netscape.certsrv.dbs.IDBObj; import com.netscape.certsrv.logging.ILogger; import com.netscape.cmscore.cert.CertUtils; - /** - * A class represents an attribute mapper that maps - * a public key data into LDAP attribute and - * vice versa. + * A class represents an attribute mapper that maps a public key data into LDAP + * attribute and vice versa. * <P> - * + * * @author thomask - * @version $Revision$, $Date$ + * @version $Revision$, $Date$ */ public class PublicKeyMapper implements IDBAttrMapper { @@ -68,18 +65,17 @@ public class PublicKeyMapper implements IDBAttrMapper { /** * Maps object to ldap attribute set. */ - 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 { attrs.add(new LDAPAttribute(mLdapName, (byte[]) obj)); } /** - * Maps LDAP attributes into object, and put the object - * into 'parent'. + * Maps LDAP attributes into object, and put the object into 'parent'. */ - public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs, - String name, IDBObj parent) throws EBaseException { + public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs, + String name, IDBObj parent) throws EBaseException { LDAPAttribute attr = attrs.getAttribute(mLdapName); if (attr == null) { @@ -89,11 +85,11 @@ public class PublicKeyMapper implements IDBAttrMapper { } /** - * Maps search filters into LDAP search filter. It knows - * how to extract public key from the certificate. + * Maps search filters into LDAP search filter. It knows how to extract + * public key from the certificate. */ - public String mapSearchFilter(String name, String op, - String value) throws EBaseException { + public String mapSearchFilter(String name, String op, + String value) throws EBaseException { int i = value.indexOf("#"); if (i != -1) { @@ -111,14 +107,16 @@ public class PublicKeyMapper implements IDBAttrMapper { return mLdapName + op + escapeBinaryData(pub); } catch (Exception e) { - /*LogDoc - * + /* + * LogDoc + * * @phase Maps search filters into LDAP search filter + * * @message PublicKeyMapper: <exception thrown> */ - mLogger.log(ILogger.EV_SYSTEM, ILogger.S_DB, ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_DBS_PUBLICKEY_MAPPER_ERROR", - e.toString())); + mLogger.log(ILogger.EV_SYSTEM, ILogger.S_DB, ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_DBS_PUBLICKEY_MAPPER_ERROR", + e.toString())); } } return mLdapName + op + value; |