Interface LdapClient
- Since:
- 3.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe specifications for theauthenticate()request.static interfaceThe specifications for thebind(String)request.static interfaceA mutable builder for creating anLdapClient.static interfaceThe specifications for thelistBindings(String)request.static interfaceThe specifications for thelist(String)request.static interfaceLdapClient.MappedSearchSpec<T extends @Nullable Object>A specification for retrieving mapped search results with various cardinality options.static interfaceThe specifications for themodify(String)request.static interfaceThe specifications for thesearch()request.static interfaceThe specifications for theunbind(String)request. -
Method Summary
Modifier and TypeMethodDescriptionStart building an authentication request.Start building a bind request, using the givennameas the identifier.Start building a bind or rebind request, using the givennameas the identifier.static LdapClient.Builderbuilder()Deprecated.static LdapClientcreate(ContextSource contextSource) Create an instance ofLdapClientstatic LdapClientcreate(LdapTemplate ldap) Create an instance ofLdapClientStart building a request for all children of the givenname.Start building a request for all children of the givenname.listBindings(String name) Start building a request for all children of the givenname.listBindings(Name name) Start building a request for all children of the givenname.Start building a request to modify name or attributes of an entry, using the givennameas the identifier.Start building a request to modify name or attributes of an entry, using the givennameas the identifier.mutate()Return a builder to create a newLdapClientwhose settings are replicated from the currentLdapClient.search()Start building a search request.Start building a request to remove thenameentry.Start building a request to remove thenameentry.static LdapClient.BuilderwithContextSource(ContextSource contextSource) Obtain aLdapClientbuilder.
-
Method Details
-
list
Start building a request for all children of the givenname.- Parameters:
name- the distinguished name to find children for- Returns:
- a spec for specifying the list parameters
-
list
Start building a request for all children of the givenname.- Parameters:
name- the distinguished name to find children for- Returns:
- a spec for specifying the list parameters
-
listBindings
Start building a request for all children of the givenname. The result will include the object bound to the name.- Parameters:
name- the distinguished name to find children for- Returns:
- a spec for specifying the list parameters
-
listBindings
Start building a request for all children of the givenname. The result will include the object bound to the name.- Parameters:
name- the distinguished name to find children for- Returns:
- a spec for specifying the list parameters
-
search
LdapClient.SearchSpec search()Start building a search request.- Returns:
- a spec for specifying the search parameters
-
authenticate
LdapClient.AuthenticateSpec authenticate()Start building an authentication request.- Returns:
- a spec for specifying the authentication parameters
-
bind
Start building a bind request, using the givennameas the identifier.- Returns:
- a spec for specifying the bind parameters
-
bind
Start building a bind or rebind request, using the givennameas the identifier.- Returns:
- a spec for specifying the bind parameters
-
modify
Start building a request to modify name or attributes of an entry, using the givennameas the identifier.Note that a
modify(Name)is different from a rebind in that entries are changed instead of removed and recreated.A change in name uses LDAP's
Context.rename(Name, Name)function. A change in attributes uses LDAP'sDirContext.modifyAttributes(Name, int, Attributes)function. Therenameaction is optimistically performed before themodifyfunction. A rollback of the name is attempted in the event that attribute modification fails.- Parameters:
name- the name of the entry to modify- Returns:
- a spec for specifying the modify parameters
-
modify
Start building a request to modify name or attributes of an entry, using the givennameas the identifier.Note that a
modify(Name)is different from a rebind in that entries are changed instead of removed and recreated.A change in name uses LDAP's
Context.rename(Name, Name)function. A change in attributes uses LDAP'sDirContext.modifyAttributes(Name, int, Attributes)function. Therenameaction is optimistically performed before themodifyfunction. A rollback of the name is attempted in the event that attribute modification fails.- Parameters:
name- the name of the entry to modify- Returns:
- a spec for specifying the modify parameters
-
unbind
Start building a request to remove thenameentry.- Parameters:
name- the name of the entry to remove- Returns:
- a spec for specifying the unbind parameters
-
unbind
Start building a request to remove thenameentry.- Parameters:
name- the name of the entry to remove- Returns:
- a spec for specifying the unbind parameters
-
mutate
LdapClient.Builder mutate()Return a builder to create a newLdapClientwhose settings are replicated from the currentLdapClient. -
withContextSource
Obtain aLdapClientbuilder.- Parameters:
contextSource- theContextSourcefor all requests- Since:
- 4.1
-
create
Create an instance ofLdapClient- Parameters:
contextSource- theContextSourcefor all requests- See Also:
-
create
Create an instance ofLdapClient- Parameters:
ldap- theLdapTemplateto base this client off of- Since:
- 3.3
- See Also:
-
builder
Deprecated.Please provide aContextSourceusingwithContextSource(ContextSource)Obtain aLdapClientbuilder.
-
ContextSourceusingwithContextSource(ContextSource)