summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-09 23:32:31 -0500
committerAde Lee <alee@redhat.com>2012-01-09 23:32:31 -0500
commit466533710c179f62865e08b3031748072a0247a3 (patch)
tree4c04c20d50239be26ba8319076de90226526a542 /pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
parentc9e3c48de53fce6908f625f40ac2b2f75d66b5a1 (diff)
downloadpki-466533710c179f62865e08b3031748072a0247a3.tar.gz
pki-466533710c179f62865e08b3031748072a0247a3.tar.xz
pki-466533710c179f62865e08b3031748072a0247a3.zip
Formatting (no wrap)
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java32
1 files changed, 14 insertions, 18 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
index 39fdac87..c4a8ca96 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/StringMapper.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.dbs;
-
import java.util.Enumeration;
import java.util.NoSuchElementException;
import java.util.Vector;
@@ -29,14 +28,12 @@ import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.IDBAttrMapper;
import com.netscape.certsrv.dbs.IDBObj;
-
/**
- * A class represents ann attribute mapper that maps
- * a Java String object into LDAP attribute,
- * and vice versa.
- *
+ * A class represents ann attribute mapper that maps a Java String object into
+ * LDAP attribute, and vice versa.
+ *
* @author thomask
- * @version $Revision$, $Date$
+ * @version $Revision$, $Date$
*/
public class StringMapper implements IDBAttrMapper {
@@ -61,19 +58,18 @@ public class StringMapper implements IDBAttrMapper {
/**
* Maps attribute value to ldap attributes.
*/
- 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, (String) 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) {
@@ -81,7 +77,7 @@ public class StringMapper implements IDBAttrMapper {
}
try {
parent.set(name, (String)
- attr.getStringValues().nextElement());
+ attr.getStringValues().nextElement());
} catch (NoSuchElementException e) {
// attribute present, but without value
}
@@ -90,8 +86,8 @@ public class StringMapper implements IDBAttrMapper {
/**
* Maps search filters into LDAP search filter.
*/
- public String mapSearchFilter(String name, String op,
- String value) throws EBaseException {
+ public String mapSearchFilter(String name, String op,
+ String value) throws EBaseException {
return mLdapName + op + value;
}
}