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.Logger
Fields 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 TypeMethodDescriptionvoid
abstract String
void
createFilter
(StringBuilder sb, Map<String, String> attributes) abstract String
createFilter
(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.void
void
removeRecord
(String id) void
updateRecord
(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:Database
Find records matching filter- Overrides:
findRecords
in 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:
updateRecord
in classDatabase<E extends IDBObj>
- Throws:
Exception
-
removeRecord
- Overrides:
removeRecord
in classDatabase<E extends IDBObj>
- Throws:
Exception
-