public class LDAPOperationManager extends Object
This class provides a set of operations to manage LDAP trees.
| Constructor and Description |
|---|
LDAPOperationManager(LDAPConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String dn,
Attribute attribute)
Adds the given
Attribute instance using the given DN. |
void |
authenticate(String dn,
String password)
Performs a simple authentication using the given DN and password to bind to the authentication context.
|
void |
createSubContext(String name,
Attributes attributes) |
String |
decodeEntryUUID(Object entryUUID) |
Attributes |
getAttributes(String entryUUID,
String baseDN,
Set<String> returningAttributes) |
String |
getFilterById(String id) |
SearchResult |
lookupById(String baseDN,
String id,
Collection<String> returningAttributes) |
void |
modifyAttribute(String dn,
Attribute attribute)
Modifies the given
Attribute instance using the given DN. |
void |
modifyAttributes(String dn,
ModificationItem[] mods) |
void |
modifyAttributes(String dn,
NamingEnumeration<Attribute> attributes)
Modifies the given
Attribute instances using the given DN. |
void |
removeAttribute(String dn,
Attribute attribute)
Removes the given
Attribute instance using the given DN. |
void |
removeEntry(String entryDn)
Removes the object from the LDAP tree
|
List<SearchResult> |
search(String baseDN,
String filter,
Collection<String> returningAttributes,
int searchScope) |
List<SearchResult> |
searchPaginated(String baseDN,
String filter,
LDAPQuery identityQuery) |
public LDAPOperationManager(LDAPConfig config) throws NamingException
NamingExceptionpublic void modifyAttribute(String dn, Attribute attribute)
Modifies the given Attribute instance using the given DN. This method performs a REPLACE_ATTRIBUTE
operation.
dn - attribute - public void modifyAttributes(String dn, NamingEnumeration<Attribute> attributes)
Modifies the given Attribute instances using the given DN. This method performs a REPLACE_ATTRIBUTE
operation.
dn - attributes - public void removeAttribute(String dn, Attribute attribute)
Removes the given Attribute instance using the given DN. This method performs a REMOVE_ATTRIBUTE
operation.
dn - attribute - public void addAttribute(String dn, Attribute attribute)
Adds the given Attribute instance using the given DN. This method performs a ADD_ATTRIBUTE operation.
dn - attribute - public void removeEntry(String entryDn)
Removes the object from the LDAP tree
public List<SearchResult> search(String baseDN, String filter, Collection<String> returningAttributes, int searchScope) throws NamingException
NamingExceptionpublic List<SearchResult> searchPaginated(String baseDN, String filter, LDAPQuery identityQuery) throws NamingException
NamingExceptionpublic SearchResult lookupById(String baseDN, String id, Collection<String> returningAttributes)
public void authenticate(String dn, String password) throws AuthenticationException
Performs a simple authentication using the given DN and password to bind to the authentication context.
dn - password - AuthenticationException - if authentication is not successfulpublic void modifyAttributes(String dn, ModificationItem[] mods)
public void createSubContext(String name, Attributes attributes)
public Attributes getAttributes(String entryUUID, String baseDN, Set<String> returningAttributes)
Copyright © 2016 JBoss by Red Hat. All rights reserved.