Interface LdapClient
- Since:
- 3.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe specifications for theauthenticate()request.static interfaceThe specifications for thebind(java.lang.String)request.static interfaceA mutable builder for creating anLdapClient.static interfaceThe specifications for thelistBindings(java.lang.String)request.static interfaceThe specifications for thelist(java.lang.String)request.static interfaceThe specifications for themodify(java.lang.String)request.static interfaceThe specifications for thesearch()request.static interfaceThe specifications for theunbind(java.lang.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()Obtain aLdapClientbuilder.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.
-
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(javax.naming.Name, javax.naming.Name)function. A change in attributes uses LDAP'sDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.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(javax.naming.Name, javax.naming.Name)function. A change in attributes uses LDAP'sDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.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. -
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
Obtain aLdapClientbuilder.
-