Package com.netscape.certsrv.dbs
Class DBAttrMapper
java.lang.Object
com.netscape.certsrv.dbs.DBAttrMapper
- Direct Known Subclasses:
BigIntegerMapper
,ByteArrayMapper
,DateArrayMapper
,DateMapper
,DBDynAttrMapper
,IntegerMapper
,KeyStateMapper
,LongMapper
,MetaInfoMapper
,ObjectStreamMapper
,PublicKeyMapper
,RequestAttrsMapper
,RequestIdMapper
,RequestStateMapper
,RevocationInfoMapper
,StringMapper
,StringVectorMapper
,X500NameMapper
,X509CertImplMapper
A class represents an attribute mapper. A mapper
has knowledge on how to convert a db attribute into
zero or more LDAP attribute, and vice versa.
- Version:
- $Revision$, $Date$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Enumeration<String>
Retrieves a list of LDAP attributes that are used in the mapper.abstract void
mapLDAPAttributeSetToObject
(netscape.ldap.LDAPAttributeSet attrs, String name, IDBObj parent) Maps LDAP attributes into object, and puts the object into 'parent'.abstract void
mapObjectToLDAPAttributeSet
(IDBObj parent, String name, Object obj, netscape.ldap.LDAPAttributeSet attrs) Maps object attribute into LDAP attributes.abstract String
mapSearchFilter
(String name, String op, String value) Maps search filters into LDAP search filter.
-
Constructor Details
-
DBAttrMapper
public DBAttrMapper()
-
-
Method Details
-
getSupportedLDAPAttributeNames
Retrieves a list of LDAP attributes that are used in the mapper. By having this, the framework can provide search on selective attributes.- Returns:
- a list of supported attribute names
-
mapObjectToLDAPAttributeSet
public abstract void mapObjectToLDAPAttributeSet(IDBObj parent, String name, Object obj, netscape.ldap.LDAPAttributeSet attrs) throws EBaseException Maps object attribute into LDAP attributes.- Parameters:
parent
- parent object where the object comes fromname
- name of db attributeobj
- object itselfattrs
- LDAP attribute set where the result should be stored- Throws:
EBaseException
- failed to map object
-
mapLDAPAttributeSetToObject
public abstract void mapLDAPAttributeSetToObject(netscape.ldap.LDAPAttributeSet attrs, String name, IDBObj parent) throws EBaseException Maps LDAP attributes into object, and puts the object into 'parent'.- Parameters:
attrs
- LDAP attribute setname
- name of db attribute to be processedparent
- parent object where the object should be added- Throws:
EBaseException
- failed to map object
-
mapSearchFilter
Maps search filters into LDAP search filter.- Parameters:
name
- name of db attributeop
- filte operation (i.e. "=", ">=")value
- attribute value- Throws:
EBaseException
- failed to map filter
-