T - type of object to managepublic class DefaultLdapEntryManager<T> extends Object implements LdapEntryManager<T>
LdapEntryMapper to convert objects to entries, then
invokes LDAP operations with those objects. By default all attributes are requested using both the '*' and '+'
syntaxes. For attributes that must be requested by name, use DefaultLdapEntryManager(LdapEntryMapper,
ConnectionFactory, String[]).| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class.
|
| Constructor and Description |
|---|
DefaultLdapEntryManager(LdapEntryMapper<T> mapper,
ConnectionFactory factory)
Creates a new default ldap entry manager.
|
DefaultLdapEntryManager(LdapEntryMapper<T> mapper,
ConnectionFactory factory,
String[] attrs)
Creates a new default ldap entry manager.
|
| Modifier and Type | Method and Description |
|---|---|
Response<Void> |
add(T object)
Adds the supplied annotated object to an LDAP.
|
Response<Void> |
delete(T object)
Deletes the supplied annotated object from an LDAP.
|
T |
find(T object)
Searches for the supplied annotated object in an LDAP and returns the object mapped with it's ldap attribute
properties set.
|
ConnectionFactory |
getConnectionFactory()
Returns the connection factory.
|
LdapEntryMapper<T> |
getLdapEntryMapper()
Returns the ldap entry mapper.
|
String[] |
getReturnAttributes()
Returns the return attributes.
|
Response<Void> |
merge(T object)
Merges the supplied annotated object in an LDAP.
|
public DefaultLdapEntryManager(LdapEntryMapper<T> mapper, ConnectionFactory factory)
mapper - for object conversionfactory - for LDAP communicationpublic DefaultLdapEntryManager(LdapEntryMapper<T> mapper, ConnectionFactory factory, String[] attrs)
mapper - for object conversionfactory - for LDAP communicationattrs - additional return attributespublic LdapEntryMapper<T> getLdapEntryMapper()
public ConnectionFactory getConnectionFactory()
public String[] getReturnAttributes()
public T find(T object) throws LdapException
LdapEntryManagerfind in interface LdapEntryManager<T>object - to findLdapException - if the object cannot be foundpublic Response<Void> add(T object) throws LdapException
LdapEntryManageradd in interface LdapEntryManager<T>object - to addLdapException - if the add failspublic Response<Void> merge(T object) throws LdapException
LdapEntryManagerMergeOperation.merge in interface LdapEntryManager<T>object - to mergeLdapException - if the merge failspublic Response<Void> delete(T object) throws LdapException
LdapEntryManagerdelete in interface LdapEntryManager<T>object - to deleteLdapException - if the delete failsCopyright © 2023. All rights reserved.