|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LdapOperations
Interface that specifies a basic set of LDAP operations. Implemented by LdapTemplate, but it might be a useful option to use this interface in order to enhance testability.
Method Summary | |
---|---|
boolean |
authenticate(Name base,
String filter,
String password)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(Name base,
String filter,
String password,
AuthenticatedLdapEntryContextCallback callback)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(Name base,
String filter,
String password,
AuthenticatedLdapEntryContextCallback callback,
AuthenticationErrorCallback errorCallback)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(Name base,
String filter,
String password,
AuthenticationErrorCallback errorCallback)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(String base,
String filter,
String password)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(String base,
String filter,
String password,
AuthenticatedLdapEntryContextCallback callback)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(String base,
String filter,
String password,
AuthenticatedLdapEntryContextCallback callback,
AuthenticationErrorCallback errorCallback)
Utility method to perform a simple LDAP 'bind' authentication. |
boolean |
authenticate(String base,
String filter,
String password,
AuthenticationErrorCallback errorCallback)
Utility method to perform a simple LDAP 'bind' authentication. |
void |
bind(DirContextOperations ctx)
Bind the data in the supplied context in the tree. |
void |
bind(Name dn,
Object obj,
Attributes attributes)
Create an entry in the LDAP tree. |
void |
bind(String dn,
Object obj,
Attributes attributes)
Create an entry in the LDAP tree. |
Object |
executeReadOnly(ContextExecutor ce)
Perform an operation (or series of operations) on a read-only context. |
Object |
executeReadWrite(ContextExecutor ce)
Perform an operation (or series of operations) on a read-write context. |
List |
list(Name base)
Perform a non-recursive listing of the children of the given base . |
void |
list(Name base,
NameClassPairCallbackHandler handler)
Perform a non-recursive listing of the children of the given base . |
List |
list(Name base,
NameClassPairMapper mapper)
Perform a non-recursive listing of the children of the given base . |
List |
list(String base)
Perform a non-recursive listing of the children of the given base . |
void |
list(String base,
NameClassPairCallbackHandler handler)
Perform a non-recursive listing of the children of the given base . |
List |
list(String base,
NameClassPairMapper mapper)
Perform a non-recursive listing of the children of the given base . |
List |
listBindings(Name base)
Perform a non-recursive listing of children of the given base . |
List |
listBindings(Name base,
ContextMapper mapper)
Perform a non-recursive listing of the children of the given base . |
void |
listBindings(Name base,
NameClassPairCallbackHandler handler)
Perform a non-recursive listing of the children of the given base . |
List |
listBindings(Name base,
NameClassPairMapper mapper)
Perform a non-recursive listing of the children of the given base . |
List |
listBindings(String base)
Perform a non-recursive listing of children of the given base . |
List |
listBindings(String base,
ContextMapper mapper)
Perform a non-recursive listing of the children of the given base . |
void |
listBindings(String base,
NameClassPairCallbackHandler handler)
Perform a non-recursive listing of the children of the given base . |
List |
listBindings(String base,
NameClassPairMapper mapper)
Perform a non-recursive listing of the children of the given base . |
Object |
lookup(Name dn)
Lookup the supplied DN and return the found object. |
Object |
lookup(Name dn,
AttributesMapper mapper)
Convenience method to get the attributes of a specified DN and automatically pass them to an AttributesMapper . |
Object |
lookup(Name dn,
ContextMapper mapper)
Convenience method to lookup a specified DN and automatically pass the found object to a ContextMapper . |
Object |
lookup(Name dn,
String[] attributes,
AttributesMapper mapper)
Convenience method to get the specified attributes of a specified DN and automatically pass them to an AttributesMapper . |
Object |
lookup(Name dn,
String[] attributes,
ContextMapper mapper)
Convenience method to get the specified attributes of a specified DN and automatically pass them to a ContextMapper . |
Object |
lookup(String dn)
Lookup the supplied DN and return the found object. |
Object |
lookup(String dn,
AttributesMapper mapper)
Convenience method to get the attributes of a specified DN and automatically pass them to an AttributesMapper . |
Object |
lookup(String dn,
ContextMapper mapper)
Convenience method to lookup a specified DN and automatically pass the found object to a ContextMapper . |
Object |
lookup(String dn,
String[] attributes,
AttributesMapper mapper)
Convenience method to get the specified attributes of a specified DN and automatically pass them to an AttributesMapper . |
Object |
lookup(String dn,
String[] attributes,
ContextMapper mapper)
Convenience method to get the specified attributes of a specified DN and automatically pass them to a ContextMapper . |
DirContextOperations |
lookupContext(Name dn)
Convenience method to lookup the supplied DN and automatically cast it to DirContextOperations . |
DirContextOperations |
lookupContext(String dn)
Convenience method to lookup the supplied DN and automatically cast it to DirContextOperations . |
void |
modifyAttributes(DirContextOperations ctx)
Modify the attributes of the entry referenced by the supplied DirContextOperations instance. |
void |
modifyAttributes(Name dn,
ModificationItem[] mods)
Modify an entry in the LDAP tree using the supplied ModificationItems . |
void |
modifyAttributes(String dn,
ModificationItem[] mods)
Modify an entry in the LDAP tree using the supplied ModificationItems . |
void |
rebind(DirContextOperations ctx)
Remove an entry and replace it with a new one. |
void |
rebind(Name dn,
Object obj,
Attributes attributes)
Remove an entry and replace it with a new one. |
void |
rebind(String dn,
Object obj,
Attributes attributes)
Remove an entry and replace it with a new one. |
void |
rename(Name oldDn,
Name newDn)
Move an entry in the LDAP tree to a new location. |
void |
rename(String oldDn,
String newDn)
Move an entry in the LDAP tree to a new location. |
List |
search(Name base,
String filter,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
int searchScope,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
void |
search(Name base,
String filter,
int searchScope,
boolean returningObjFlag,
NameClassPairCallbackHandler handler)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
int searchScope,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
int searchScope,
String[] attrs,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
int searchScope,
String[] attrs,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
void |
search(Name base,
String filter,
NameClassPairCallbackHandler handler)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
SearchControls controls,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
SearchControls controls,
AttributesMapper mapper,
DirContextProcessor processor)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
SearchControls controls,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(Name base,
String filter,
SearchControls controls,
ContextMapper mapper,
DirContextProcessor processor)
Search for all objects matching the supplied filter. |
void |
search(Name base,
String filter,
SearchControls controls,
NameClassPairCallbackHandler handler)
Search for all objects matching the supplied filter. |
void |
search(Name base,
String filter,
SearchControls controls,
NameClassPairCallbackHandler handler,
DirContextProcessor processor)
Search for all objects matching the supplied filter. |
void |
search(SearchExecutor se,
NameClassPairCallbackHandler handler)
Perform a search using a particular SearchExecutor . |
void |
search(SearchExecutor se,
NameClassPairCallbackHandler handler,
DirContextProcessor processor)
Perform a search using a particular SearchExecutor and context
processor. |
List |
search(String base,
String filter,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
int searchScope,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
void |
search(String base,
String filter,
int searchScope,
boolean returningObjFlag,
NameClassPairCallbackHandler handler)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
int searchScope,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
int searchScope,
String[] attrs,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
int searchScope,
String[] attrs,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
void |
search(String base,
String filter,
NameClassPairCallbackHandler handler)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
SearchControls controls,
AttributesMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
SearchControls controls,
AttributesMapper mapper,
DirContextProcessor processor)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
SearchControls controls,
ContextMapper mapper)
Search for all objects matching the supplied filter. |
List |
search(String base,
String filter,
SearchControls controls,
ContextMapper mapper,
DirContextProcessor processor)
Search for all objects matching the supplied filter. |
void |
search(String base,
String filter,
SearchControls controls,
NameClassPairCallbackHandler handler)
Search for all objects matching the supplied filter. |
void |
search(String base,
String filter,
SearchControls controls,
NameClassPairCallbackHandler handler,
DirContextProcessor processor)
Search for all objects matching the supplied filter. |
Object |
searchForObject(Name base,
String filter,
ContextMapper mapper)
Perform a search for a unique entry matching the specified search criteria and return the found object. |
Object |
searchForObject(String base,
String filter,
ContextMapper mapper)
Perform a search for a unique entry matching the specified search criteria and return the found object. |
void |
unbind(Name dn)
Remove an entry from the LDAP tree. |
void |
unbind(Name dn,
boolean recursive)
Remove an entry from the LDAP tree, optionally removing all descendants in the process. |
void |
unbind(String dn)
Remove an entry from the LDAP tree. |
void |
unbind(String dn,
boolean recursive)
Remove an entry from the LDAP tree, optionally removing all descendants in the process. |
Method Detail |
---|
void search(SearchExecutor se, NameClassPairCallbackHandler handler, DirContextProcessor processor) throws NamingException
SearchExecutor
and context
processor. Use this method only if especially needed - for the most cases
there is an overloaded convenience method which calls this one with
suitable argments. This method handles all the plumbing; getting a
readonly context; looping through the NamingEnumeration
and
closing the context and enumeration. The actual search is delegated to
the SearchExecutor and each found NameClassPair
is passed to
the CallbackHandler
. Any encountered
NamingException
will be translated using
LdapUtils.convertLdapException(javax.naming.NamingException)
.
se
- The SearchExecutor
to use for performing the
actual search.handler
- The NameClassPairCallbackHandler
to which
each found entry will be passed.processor
- DirContextProcessor
for custom pre- and
post-processing.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted as no entries being found.void search(SearchExecutor se, NameClassPairCallbackHandler handler) throws NamingException
SearchExecutor
. Use this
method only if especially needed - for the most cases there is an
overloaded convenience method which calls this one with suitable
argments. This method handles all the plumbing; getting a readonly
context; looping through the NamingEnumeration
and closing
the context and enumeration. The actual search is delegated to the
SearchExecutor
and each found NameClassPair
is
passed to the CallbackHandler
. Any encountered
NamingException
will be translated using the
LdapUtils.convertLdapException(javax.naming.NamingException)
.
se
- The SearchExecutor
to use for performing the
actual search.handler
- The NameClassPairCallbackHandler
to which
each found entry will be passed.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted as no entries being found.search(Name, String, AttributesMapper)
,
search(Name, String, ContextMapper)
Object executeReadOnly(ContextExecutor ce) throws NamingException
DirContext
,
translating any Exceptions and closing the context afterwards. This
method is not intended for searches; use
search(SearchExecutor, NameClassPairCallbackHandler)
or any of
the overloaded search methods for this.
ce
- The ContextExecutor
to which the actual operation
on the DirContext
will be delegated.
NamingException
- if the operation resulted in a
NamingException
.search(SearchExecutor, NameClassPairCallbackHandler)
,
search(Name, String, AttributesMapper)
,
search(Name, String, ContextMapper)
Object executeReadWrite(ContextExecutor ce) throws NamingException
DirContext
,
translating any exceptions and closing the context afterwards. This
method is intended only for very particular cases, where there is no
suitable method in this interface to use.
ce
- The ContextExecutor
to which the actual operation
on the DirContext
will be delegated.
NamingException
- if the operation resulted in a
NamingException
.bind(Name, Object, Attributes)
,
unbind(Name)
,
rebind(Name, Object, Attributes)
,
rename(Name, Name)
,
modifyAttributes(Name, ModificationItem[])
void search(Name base, String filter, SearchControls controls, NameClassPairCallbackHandler handler) throws NamingException
SearchResult
is supplied to the specified
NameClassPairCallbackHandler
. The SearchScope
specified in the supplied SearchControls
will be used in the
search. Note that if you are using a ContextMapper
, the
returningObjFlag needs to be set to true in the
SearchControls
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.handler
- The NameClassPairCallbackHandler
to supply
the SearchResult
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(String base, String filter, SearchControls controls, NameClassPairCallbackHandler handler) throws NamingException
search(Name, String, SearchControls, NameClassPairCallbackHandler)
for details.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.handler
- The NameClassPairCallbackHandler
to supply
the SearchResult
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(Name base, String filter, SearchControls controls, NameClassPairCallbackHandler handler, DirContextProcessor processor) throws NamingException
SearchResult
is supplied to the specified
NameClassPairCallbackHandler
. The SearchScope
specified in the supplied SearchControls
will be used in the
search. Note that if you are using a ContextMapper
, the
returningObjFlag needs to be set to true in the
SearchControls
. The given DirContextProcessor
will be called before and after the search.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.handler
- The NameClassPairCallbackHandler
to supply
the SearchResult
to.processor
- The DirContextProcessor
to use before and
after the search.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, SearchControls controls, AttributesMapper mapper, DirContextProcessor processor) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
. The SearchScope
specified in
the supplied SearchControls
will be used in the search. The
given DirContextProcessor
will be called before and after
the search.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.mapper
- The AttributesMapper
to use for translating
each entry.processor
- The DirContextProcessor
to use before and
after the search.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, SearchControls controls, AttributesMapper mapper, DirContextProcessor processor) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
. The SearchScope
specified in
the supplied SearchControls
will be used in the search. The
given DirContextProcessor
will be called before and after
the search.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.mapper
- The AttributesMapper
to use for translating
each entry.processor
- The DirContextProcessor
to use before and
after the search.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, SearchControls controls, ContextMapper mapper, DirContextProcessor processor) throws NamingException
SearchResult
is supplied to the specified
ContextMapper
. The SearchScope
specified in the
supplied SearchControls
will be used in the search. The
given DirContextProcessor
will be called before and after
the search.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search. If
the returnObjFlag is not set in the SearchControls
, this
method will set it automatically, as this is required for the
ContextMapper
to work.mapper
- The ContextMapper
to use for translating each
entry.processor
- The DirContextProcessor
to use before and
after the search.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, SearchControls controls, ContextMapper mapper, DirContextProcessor processor) throws NamingException
SearchResult
is supplied to the specified
ContextMapper
. The SearchScope
specified in the
supplied SearchControls
will be used in the search. The
given DirContextProcessor
will be called before and after
the search.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search. If
the returnObjFlag is not set in the SearchControls
, this
method will set it automatically, as this is required for the
ContextMapper
to work.mapper
- The ContextMapper
to use for translating each
entry.processor
- The DirContextProcessor
to use before and
after the search.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(String base, String filter, SearchControls controls, NameClassPairCallbackHandler handler, DirContextProcessor processor) throws NamingException
search(Name, String, SearchControls, NameClassPairCallbackHandler, DirContextProcessor)
for details.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.handler
- The NameClassPairCallbackHandler
to supply
the SearchResults
to.processor
- The DirContextProcessor
to use before and
after the search.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(Name base, String filter, int searchScope, boolean returningObjFlag, NameClassPairCallbackHandler handler) throws NamingException
SearchResult
is supplied to the specified
NameClassPairCallbackHandler
. Use the specified values for
search scope and return objects flag.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.returningObjFlag
- Whether the bound object should be returned in
search results. Must be set to true
if a
ContextMapper
is used.handler
- The NameClassPairCallbackHandler
to supply
the SearchResults
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(String base, String filter, int searchScope, boolean returningObjFlag, NameClassPairCallbackHandler handler) throws NamingException
SearchResult
is supplied to the specified
NameClassPairCallbackHandler
. Use the specified values for
search scope and return objects flag.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.returningObjFlag
- Whether the bound object should be returned in
search results. Must be set to true
if a
ContextMapper
is used.handler
- The NameClassPairCallbackHandler
to supply
the SearchResults
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(Name base, String filter, NameClassPairCallbackHandler handler) throws NamingException
SearchResult
is supplied to the specified
NameClassPairCallbackHandler
. The default Search scope (
SearchControls.SUBTREE_SCOPE
) will be used and the
returnObjects flag will be set to false
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.handler
- The NameClassPairCallbackHandler
to supply
the SearchResults
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void search(String base, String filter, NameClassPairCallbackHandler handler) throws NamingException
SearchResult
is supplied to the specified
NameClassPairCallbackHandler
. The default Search scope (
SearchControls.SUBTREE_SCOPE
) will be used and the
returnObjects flag will be set to false
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.handler
- The NameClassPairCallbackHandler
to supply
the SearchResults
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, int searchScope, String[] attrs, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.attrs
- The attributes to return, null
means returning
all attributes.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, int searchScope, String[] attrs, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.attrs
- The attributes to return, null
means returning
all attributes.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, int searchScope, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, int searchScope, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
. The default search scope will be used.
base
- The base DN where the search should begin.filter
- The filter to use in the search.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
. The default search scope will be used.
base
- The base DN where the search should begin.filter
- The filter to use in the search.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
AttributesMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, int searchScope, String[] attrs, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
. Only return the
supplied attributes.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.attrs
- The attributes to return, null
means all
attributes.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, int searchScope, String[] attrs, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
. Only return the
supplied attributes.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.attrs
- The attributes to return, null
means all
attributes.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, int searchScope, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, int searchScope, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.searchScope
- The search scope to set in SearchControls
.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
. The default search
scope (SearchControls.SUBTREE_SCOPE
) will be used.
base
- The base DN where the search should begin.filter
- The filter to use in the search.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
. The default search
scope (SearchControls.SUBTREE_SCOPE
) will be used.
base
- The base DN where the search should begin.filter
- The filter to use in the search.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, SearchControls controls, ContextMapper mapper) throws NamingException
Object
returned in each SearchResult
is
supplied to the specified ContextMapper
. The default search
scope (SearchControls.SUBTREE_SCOPE
) will be used.
base
- The base DN where the search should begin.filter
- The filter to use in the search.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, SearchControls controls, ContextMapper mapper) throws NamingException
SearchResult
is supplied to the specified
ContextMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search. If
the returnObjFlag is not set in the SearchControls
, this
method will set it automatically, as this is required for the
ContextMapper
to work.mapper
- The ContextMapper
to use for translating each
entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(String base, String filter, SearchControls controls, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List search(Name base, String filter, SearchControls controls, AttributesMapper mapper) throws NamingException
SearchResult
is supplied to the specified
AttributesMapper
.
base
- The base DN where the search should begin.filter
- The filter to use in the search.controls
- The SearchControls
to use in the search.mapper
- The AttributesMapper
to use for translating
each entry.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void list(String base, NameClassPairCallbackHandler handler) throws NamingException
base
. Each resulting NameClassPair
is supplied
to the specified NameClassPairCallbackHandler
.
base
- The base DN where the list should be performed.handler
- The NameClassPairCallbackHandler
to supply
each NameClassPair
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void list(Name base, NameClassPairCallbackHandler handler) throws NamingException
base
. Each resulting NameClassPair
is supplied
to the specified NameClassPairCallbackHandler
.
base
- The base DN where the list should be performed.handler
- The NameClassPairCallbackHandler
to supply
each NameClassPair
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List list(String base, NameClassPairMapper mapper) throws NamingException
base
. Pass all the found NameClassPair
objects
to the supplied NameClassPairMapper
and return all the
returned values as a List
.
base
- The base DN where the list should be performed.mapper
- The NameClassPairMapper
to supply each
NameClassPair
to.
List
containing the Objects returned from the
Mapper.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List list(Name base, NameClassPairMapper mapper) throws NamingException
base
. Pass all the found NameClassPair
objects
to the supplied NameClassPairMapper
and return all the
returned values as a List
.
base
- The base DN where the list should be performed.mapper
- The NameClassPairMapper
to supply each
NameClassPair
to.
List
containing the Objects returned from the
Mapper.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List list(String base) throws NamingException
base
.
base
- The base DN where the list should be performed.
base
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List list(Name base) throws NamingException
base
.
base
- The base DN where the list should be performed.
base
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void listBindings(String base, NameClassPairCallbackHandler handler) throws NamingException
base
. Each resulting Binding
is supplied to the
specified NameClassPairCallbackHandler
.
base
- The base DN where the list should be performed.handler
- The NameClassPairCallbackHandler
to supply
each Binding
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.void listBindings(Name base, NameClassPairCallbackHandler handler) throws NamingException
base
. Each resulting Binding
is supplied to the
specified NameClassPairCallbackHandler
.
base
- The base DN where the list should be performed.handler
- The NameClassPairCallbackHandler
to supply
each Binding
to.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List listBindings(String base, NameClassPairMapper mapper) throws NamingException
base
. Pass all the found Binding
objects to the
supplied NameClassPairMapper
and return all the returned
values as a List
.
base
- The base DN where the list should be performed.mapper
- The NameClassPairMapper
to supply each
Binding
to.
List
containing the Objects returned from the
Mapper.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List listBindings(Name base, NameClassPairMapper mapper) throws NamingException
base
. Pass all the found Binding
objects to the
supplied NameClassPairMapper
and return all the returned
values as a List
.
base
- The base DN where the list should be performed.mapper
- The NameClassPairMapper
to supply each
Binding
to.
List
containing the Objects returned from the
Mapper.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List listBindings(String base) throws NamingException
base
.
base
- The base DN where the list should be performed.
List
containing the names of all the contexts
bound to base
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List listBindings(Name base) throws NamingException
base
.
base
- The base DN where the list should be performed.
List
containing the names of all the contexts
bound to base
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List listBindings(String base, ContextMapper mapper) throws NamingException
base
. The Object returned in each Binding
is
supplied to the specified ContextMapper
.
base
- The base DN where the list should be performed.mapper
- The ContextMapper
to use for mapping the found
object.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.List listBindings(Name base, ContextMapper mapper) throws NamingException
base
. The Object returned in each Binding
is
supplied to the specified ContextMapper
.
base
- The base DN where the list should be performed.mapper
- The ContextMapper
to use for mapping the found
object.
List
containing all entries received from the
ContextMapper
.
NamingException
- if any error occurs. Note that a
NameNotFoundException
will be ignored. Instead this is
interpreted that no entries were found.Object lookup(Name dn) throws NamingException
DirContextAdapter
, unless the DirObjectFactory
has been modified in the ContextSource
.
dn
- The distinguished name of the object to find.
DirContextAdapter
instance.
NamingException
- if any error occurs.lookupContext(Name)
,
AbstractContextSource.setDirObjectFactory(Class)
Object lookup(String dn) throws NamingException
DirContextAdapter
, unless the DirObjectFactory
has been modified in the ContextSource
.
dn
- The distinguished name of the object to find.
DirContextAdapter
instance.
NamingException
- if any error occurs.lookupContext(String)
,
AbstractContextSource.setDirObjectFactory(Class)
Object lookup(Name dn, AttributesMapper mapper) throws NamingException
AttributesMapper
.
dn
- The distinguished name to find.mapper
- The AttributesMapper
to use for mapping the
found object.
NamingException
- if any error occurs.Object lookup(String dn, AttributesMapper mapper) throws NamingException
AttributesMapper
.
dn
- The distinguished name to find.mapper
- The AttributesMapper
to use for mapping the
found object.
NamingException
- if any error occurs.Object lookup(Name dn, ContextMapper mapper) throws NamingException
ContextMapper
.
dn
- The distinguished name to find.mapper
- The ContextMapper
to use for mapping the found
object.
NamingException
- if any error occurs.Object lookup(String dn, ContextMapper mapper) throws NamingException
ContextMapper
.
dn
- The distinguished name to find.mapper
- The ContextMapper
to use for mapping the found
object.
NamingException
- if any error occurs.Object lookup(Name dn, String[] attributes, AttributesMapper mapper) throws NamingException
AttributesMapper
.
dn
- The distinguished name to find.attributes
- The names of the attributes to pass to the mapper.mapper
- The AttributesMapper
to use for mapping the
found object.
NamingException
- if any error occurs.Object lookup(String dn, String[] attributes, AttributesMapper mapper) throws NamingException
AttributesMapper
.
dn
- The distinguished name to find.attributes
- The names of the attributes to pass to the mapper.mapper
- The AttributesMapper
to use for mapping the
found object.
NamingException
- if any error occurs.Object lookup(Name dn, String[] attributes, ContextMapper mapper) throws NamingException
ContextMapper
.
dn
- The distinguished name to find.attributes
- The names of the attributes to pass to the mapper.mapper
- The ContextMapper
to use for mapping the found
object.
NamingException
- if any error occurs.Object lookup(String dn, String[] attributes, ContextMapper mapper) throws NamingException
ContextMapper
.
dn
- The distinguished name to find.attributes
- The names of the attributes to pass to the mapper.mapper
- The ContextMapper
to use for mapping the found
object.
NamingException
- if any error occurs.void modifyAttributes(Name dn, ModificationItem[] mods) throws NamingException
ModificationItems
.
dn
- The distinguished name of the node to modify.mods
- The modifications to perform.
NamingException
- if any error occurs.modifyAttributes(DirContextOperations)
void modifyAttributes(String dn, ModificationItem[] mods) throws NamingException
ModificationItems
.
dn
- The distinguished name of the node to modify.mods
- The modifications to perform.
NamingException
- if any error occurs.modifyAttributes(DirContextOperations)
void bind(Name dn, Object obj, Attributes attributes) throws NamingException
obj
parameter or the
attributes
parameter (or both). One of these parameters may
be null
but not both.
dn
- The distinguished name to bind the object and attributes to.obj
- The object to bind, may be null
. Typically a
DirContext
implementation.attributes
- The attributes to bind, may be null
.
NamingException
- if any error occurs.DirContextAdapter
void bind(String dn, Object obj, Attributes attributes) throws NamingException
obj
parameter or the
attributes
parameter (or both). One of these parameters may
be null
but not both.
dn
- The distinguished name to bind the object and attributes to.obj
- The object to bind, may be null
. Typically a
DirContext
implementation.attributes
- The attributes to bind, may be null
.
NamingException
- if any error occurs.DirContextAdapter
void unbind(Name dn) throws NamingException
unbind(Name, boolean)
in stead.
dn
- The distinguished name of the entry to remove.
NamingException
- if any error occurs.void unbind(String dn) throws NamingException
unbind(Name, boolean)
in stead.
dn
- The distinguished name to unbind.
NamingException
- if any error occurs.void unbind(Name dn, boolean recursive) throws NamingException
dn
- The distinguished name to unbind.recursive
- Whether to unbind all subcontexts as well. If this
parameter is false
and the entry has children, the operation
will fail.
NamingException
- if any error occurs.void unbind(String dn, boolean recursive) throws NamingException
dn
- The distinguished name to unbind.recursive
- Whether to unbind all subcontexts as well. If this
parameter is false
and the entry has children, the operation
will fail.
NamingException
- if any error occurs.void rebind(Name dn, Object obj, Attributes attributes) throws NamingException
obj
parameter
or the attributes
parameter (or both). One of these
parameters may be null
but not both. This method assumes
that the specified context already exists - if not it will fail.
dn
- The distinguished name to rebind.obj
- The object to bind to the DN, may be null
.
Typically a DirContext
implementation.attributes
- The attributes to bind, may be null
.
NamingException
- if any error occurs.DirContextAdapter
void rebind(String dn, Object obj, Attributes attributes) throws NamingException
obj
parameter
or the attributes
parameter (or both). One of these
parameters may be null
but not both. This method assumes
that the specified context already exists - if not it will fail.
dn
- The distinguished name to rebind.obj
- The object to bind to the DN, may be null
.
Typically a DirContext
implementation.attributes
- The attributes to bind, may be null
.
NamingException
- if any error occurs.DirContextAdapter
void rename(Name oldDn, Name newDn) throws NamingException
oldDn
- The distinguished name of the entry to move; may not be
null
or empty.newDn
- The distinguished name where the entry should be moved; may
not be null
or empty.
ContextNotEmptyException
- if newDn is already bound
NamingException
- if any other error occurs.void rename(String oldDn, String newDn) throws NamingException
oldDn
- The distinguished name of the entry to move; may not be
null
or empty.newDn
- The distinguished name where the entry should be moved; may
not be null
or empty.
ContextNotEmptyException
- if newDn is already bound
NamingException
- if any other error occurs.DirContextOperations lookupContext(Name dn) throws NamingException, ClassCastException
DirContextOperations
.
dn
- The distinguished name of the object to find.
DirContextOperations
.
ClassCastException
- if an alternative
DirObjectFactory
has been registered with the
ContextSource
, causing the actual class of the returned
object to be something else than DirContextOperations
.
NamingException
- if any other error occurs.lookup(Name)
,
modifyAttributes(DirContextOperations)
DirContextOperations lookupContext(String dn) throws NamingException, ClassCastException
DirContextOperations
.
dn
- The distinguished name of the object to find.
DirContextOperations
.
ClassCastException
- if an alternative
DirObjectFactory
has been registered with the
ContextSource
, causing the actual class of the returned
object to be something else than DirContextOperations
.
NamingException
- if any other error occurs.lookup(String)
,
modifyAttributes(DirContextOperations)
void modifyAttributes(DirContextOperations ctx) throws IllegalStateException, NamingException
DirContextOperations
instance. The DN to update will be the DN of
the DirContextOperations
instance, and the
ModificationItem
array is retrieved from the
DirContextOperations
instance using a call to
AttributeModificationsAware.getModificationItems()
. NB:
The supplied instance needs to have been properly initialized; this means
that if it hasn't been received from a lookup
operation, its
DN needs to be initialized and it must have been put in update mode (
DirContextAdapter.setUpdateMode(boolean)
).
Typical use of this method would be as follows:
public void update(Person person) { DirContextOperations ctx = ldapOperations.lookupContext(person.getDn()); ctx.setAttributeValue("description", person.getDescription()); ctx.setAttributeValue("telephoneNumber", person.getPhone()); // More modifications here ldapOperations.modifyAttributes(ctx); }
ctx
- the DirContextOperations instance to use in the update.
IllegalStateException
- if the supplied instance is not in update
mode or has not been properly initialized.
NamingException
- if any other error occurs.lookupContext(Name)
,
DirContextAdapter
void bind(DirContextOperations ctx)
ctx
in will be bound to the DN set on ctx
.
Example:
DirContextOperations ctx = new DirContextAdapter(dn); ctx.setAttributeValue("cn", "john doe"); ctx.setAttributeValue("description", "some description"); //More initialization here. ldapTemplate.bind(ctx);
ctx
- the context to bind
IllegalStateException
- if no DN is set or if the instance is in
update mode.void rebind(DirContextOperations ctx)
ctx
parameter. This
method assumes that the specified context already exists - if not it will
fail. The entry will be bound to the DN set on ctx
.
Example:
DirContextOperations ctx = new DirContextAdapter(dn); ctx.setAttributeValue("cn", "john doe"); ctx.setAttributeValue("description", "some description"); //More initialization here. ldapTemplate.rebind(ctx);
ctx
- the context to rebind
IllegalStateException
- if no DN is set or if the instance is in
update mode.boolean authenticate(Name base, String filter, String password)
ContextSource.getContext(String, String)
, thus authenticating the
entry.
Example:
AndFilter filter = new AndFilter(); filter.and("objectclass", "person").and("uid", userId); boolean authenticated = ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH, filter.toString(), password);
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.
true
if the authentication was successful,
false
otherwise.boolean authenticate(String base, String filter, String password)
ContextSource.getContext(String, String)
, thus authenticating the
entry.
Example:
AndFilter filter = new AndFilter(); filter.and("objectclass", "person").and("uid", userId); boolean authenticated = ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH, filter.toString(), password);
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.
true
if the authentication was successful,
false
otherwise.boolean authenticate(Name base, String filter, String password, AuthenticatedLdapEntryContextCallback callback)
ContextSource.getContext(String, String)
, thus authenticating the
entry. The resulting DirContext instance is then used as input to the
supplied AuthenticatedLdapEntryContextCallback
to perform any
additional LDAP operations against the authenticated DirContext.
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.callback
- the callback to that will be called to perform operations
on the DirContext authenticated with the found user.
true
if the authentication was successful,
false
otherwise.authenticate(Name, String, String)
boolean authenticate(String base, String filter, String password, AuthenticatedLdapEntryContextCallback callback)
ContextSource.getContext(String, String)
, thus authenticating the
entry. The resulting DirContext instance is then used as input to the
supplied AuthenticatedLdapEntryContextCallback
to perform any
additional LDAP operations against the authenticated DirContext.
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.callback
- the callback to that will be called to perform operations
on the DirContext authenticated with the found user.
true
if the authentication was successful,
false
otherwise.authenticate(String, String, String)
boolean authenticate(Name base, String filter, String password, AuthenticatedLdapEntryContextCallback callback, AuthenticationErrorCallback errorCallback)
ContextSource.getContext(String, String)
, thus authenticating the
entry. The resulting DirContext instance is then used as input to the
supplied AuthenticatedLdapEntryContextCallback
to perform any
additional LDAP operations against the authenticated DirContext. If an
exception is caught, the same exception is passed on to the given
AuthenticationErrorCallback
. This enables the caller to provide a
callback that, for example, collects the exception for later processing.
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.callback
- the callback that will be called to perform operations
on the DirContext authenticated with the found user.errorCallback
- the callback that will be called if an exception is caught.
true
if the authentication was successful,
false
otherwise.authenticate(Name, String, String, AuthenticatedLdapEntryContextCallback)
boolean authenticate(String base, String filter, String password, AuthenticatedLdapEntryContextCallback callback, AuthenticationErrorCallback errorCallback)
ContextSource.getContext(String, String)
, thus authenticating the
entry. The resulting DirContext instance is then used as input to the
supplied AuthenticatedLdapEntryContextCallback
to perform any
additional LDAP operations against the authenticated DirContext. If an
exception is caught, the same exception is passed on to the given
AuthenticationErrorCallback
. This enables the caller to provide a
callback that, for example, collects the exception for later processing.
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.callback
- the callback that will be called to perform operations
on the DirContext authenticated with the found user.errorCallback
- the callback that will be called if an exception is caught.
true
if the authentication was successful,
false
otherwise.authenticate(String, String, String, AuthenticatedLdapEntryContextCallback)
boolean authenticate(Name base, String filter, String password, AuthenticationErrorCallback errorCallback)
ContextSource.getContext(String, String)
, thus authenticating the
entry. If an exception is caught, the same exception is passed on to the given
AuthenticationErrorCallback
. This enables the caller to provide a
callback that, for example, collects the exception for later processing.
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.errorCallback
- the callback that will be called if an exception is caught.
true
if the authentication was successful,
false
otherwise.authenticate(Name, String, String, AuthenticatedLdapEntryContextCallback, AuthenticationErrorCallback)
boolean authenticate(String base, String filter, String password, AuthenticationErrorCallback errorCallback)
ContextSource.getContext(String, String)
, thus authenticating the
entry. If an exception is caught, the same exception is passed on to the given
AuthenticationErrorCallback
. This enables the caller to provide a
callback that, for example, collects the exception for later processing.
base
- the DN to use as the base of the search.filter
- the search filter - must result in a unique result.password
- the password to use for authentication.errorCallback
- the callback that will be called if an exception is caught.
true
if the authentication was successful,
false
otherwise.
IncorrectResultSizeDataAccessException
- if more than one users were foundauthenticate(String, String, String, AuthenticatedLdapEntryContextCallback, AuthenticationErrorCallback)
Object searchForObject(Name base, String filter, ContextMapper mapper)
IncorrectResultSizeDataAccessException
is thrown.
base
- the DN to use as the base of the search.filter
- the search filter.mapper
- the mapper to use for the search.
IncorrectResultSizeDataAccessException
- if the result is not one unique entryObject searchForObject(String base, String filter, ContextMapper mapper)
IncorrectResultSizeDataAccessException
is thrown.
base
- the DN to use as the base of the search.filter
- the search filter.mapper
- the mapper to use for the search.
IncorrectResultSizeDataAccessException
- if the result is not one unique entry
|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |