Package com.netscape.cmscore.dbs
Class LDAPDatabase<E extends IDBObj>
java.lang.Object
com.netscape.cmscore.dbs.Database<E>
com.netscape.cmscore.dbs.LDAPDatabase<E>
This class implements LDAP database.
- Author:
- Endi S. Dewata
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.LoggerFields inherited from class com.netscape.cmscore.dbs.Database
DEFAULT_SIZE, name, records -
Constructor Summary
ConstructorsConstructorDescriptionLDAPDatabase(String name, DBSubsystem dbSubsystem, String baseDN, Class<E> recordType) -
Method Summary
Modifier and TypeMethodDescriptionvoidabstract StringvoidcreateFilter(StringBuilder sb, Map<String, String> attributes) abstract StringcreateFilter(String keyword, Map<String, String> attributes) createMapper(Class<?> attrType, DBAttribute dbAttribute) findRecords(String keyword) Find records matching filterfindRecords(String keyword, Map<String, String> attributes) Search for LDAP records with the specified keyword and attributes.voidvoidremoveRecord(String id) voidupdateRecord(String id, E record)
-
Field Details
-
logger
public static org.slf4j.Logger logger -
dbSubsystem
-
baseDN
-
recordType
-
-
Constructor Details
-
LDAPDatabase
public LDAPDatabase(String name, DBSubsystem dbSubsystem, String baseDN, Class<E> recordType) throws EBaseException - Throws:
EBaseException
-
-
Method Details
-
createMapper
- Throws:
EBaseException
-
register
- Throws:
EBaseException
-
createDN
-
createFilter
-
createFilter
-
findRecords
Description copied from class:DatabaseFind records matching filter- Overrides:
findRecordsin classDatabase<E extends IDBObj>- Throws:
Exception
-
findRecords
Search for LDAP records with the specified keyword and attributes. The keyword parameter will be used to search with wildcards on certain attributes. The attributes parameter will be used to find exact matches of the specified attributes.- Throws:
Exception
-
findRecords
public IDBVirtualList<E> findRecords(String keyword, Map<String, String> attributes, String[] sortKeys, int pageSize) throws Exception- Throws:
Exception
-
getRecord
-
addRecord
-
updateRecord
- Overrides:
updateRecordin classDatabase<E extends IDBObj>- Throws:
Exception
-
removeRecord
- Overrides:
removeRecordin classDatabase<E extends IDBObj>- Throws:
Exception
-