Package com.netscape.cmscore.request
Class DBDynAttrMapper
- java.lang.Object
-
- com.netscape.certsrv.dbs.DBAttrMapper
-
- com.netscape.cmscore.request.DBDynAttrMapper
-
- Direct Known Subclasses:
ExtAttrDynMapper
public class DBDynAttrMapper extends DBAttrMapper
A class representing a dynamic attribute mapper. A dynamic mapper has knowledge on how to convert a set of dynamically assigned db attribute into zero or more dynamically assigned LDAP attributes, and vice versa.
-
-
Constructor Summary
Constructors Constructor Description DBDynAttrMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration<java.lang.String>getSupportedLDAPAttributeNames()Retrieves a list of LDAP attributes that are used in the mapper.voidmapLDAPAttributeSetToObject(netscape.ldap.LDAPAttributeSet attrs, java.lang.String name, IDBObj parent)Maps LDAP attributes into object, and puts the object into 'parent'.voidmapObjectToLDAPAttributeSet(IDBObj parent, java.lang.String name, java.lang.Object obj, netscape.ldap.LDAPAttributeSet attrs)Maps object attribute into LDAP attributes.java.lang.StringmapSearchFilter(java.lang.String name, java.lang.String op, java.lang.String value)Maps search filters into LDAP search filter.booleansupportsLDAPAttributeName(java.lang.String attrName)Returns true if the LDAP attribute can be mapped by this dynamic mapper.
-
-
-
Method Detail
-
supportsLDAPAttributeName
public boolean supportsLDAPAttributeName(java.lang.String attrName)
Returns true if the LDAP attribute can be mapped by this dynamic mapper.- Parameters:
attrName- LDAP attribute name to check- Returns:
- a list of supported attribute names
-
getSupportedLDAPAttributeNames
public java.util.Enumeration<java.lang.String> getSupportedLDAPAttributeNames()
Description copied from class:DBAttrMapperRetrieves a list of LDAP attributes that are used in the mapper. By having this, the framework can provide search on selective attributes.- Specified by:
getSupportedLDAPAttributeNamesin classDBAttrMapper- Returns:
- a list of supported attribute names
-
mapObjectToLDAPAttributeSet
public void mapObjectToLDAPAttributeSet(IDBObj parent, java.lang.String name, java.lang.Object obj, netscape.ldap.LDAPAttributeSet attrs) throws EBaseException
Description copied from class:DBAttrMapperMaps object attribute into LDAP attributes.- Specified by:
mapObjectToLDAPAttributeSetin classDBAttrMapper- 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 void mapLDAPAttributeSetToObject(netscape.ldap.LDAPAttributeSet attrs, java.lang.String name, IDBObj parent) throws EBaseExceptionDescription copied from class:DBAttrMapperMaps LDAP attributes into object, and puts the object into 'parent'.- Specified by:
mapLDAPAttributeSetToObjectin classDBAttrMapper- 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
public java.lang.String mapSearchFilter(java.lang.String name, java.lang.String op, java.lang.String value) throws EBaseExceptionDescription copied from class:DBAttrMapperMaps search filters into LDAP search filter.- Specified by:
mapSearchFilterin classDBAttrMapper- Parameters:
name- name of db attributeop- filte operation (i.e. "=", ">=")value- attribute value- Throws:
EBaseException- failed to map filter
-
-