|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.ldap.LDAPConnection com.novell.ldap.SPMLConnection
Field Summary | |
static java.lang.String |
DEF_IMPL
Default spml implementation |
Fields inherited from class com.novell.ldap.LDAPConnection |
ALL_USER_ATTRS, DEFAULT_PORT, DEFAULT_SSL_PORT, LDAP_PROPERTY_PROTOCOL, LDAP_PROPERTY_SDK, LDAP_PROPERTY_SECURITY, LDAP_V3, NO_ATTRS, SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SCOPE_SUBORDINATESUBTREE, SERVER_SHUTDOWN_OID |
Constructor Summary | |
SPMLConnection()
Default Contructor, initilizes the http client |
|
SPMLConnection(LDAPSocketFactory factory)
Creates an instace of DsmlConnection ignoring the socket factory |
|
SPMLConnection(java.lang.String className)
|
|
SPMLConnection(java.lang.String className,
java.lang.ClassLoader loader)
|
Method Summary | |
void |
add(LDAPEntry entry)
Synchronously adds an entry to the directory. |
void |
add(LDAPEntry entry,
LDAPConstraints cont)
Synchronously adds an entry to the directory, using the specified constraints. |
LDAPResponseQueue |
add(LDAPEntry arg0,
LDAPResponseQueue arg1)
Asynchronously adds an entry to the directory. |
LDAPResponseQueue |
add(LDAPEntry arg0,
LDAPResponseQueue arg1,
LDAPConstraints arg2)
Asynchronously adds an entry to the directory, using the specified constraints. |
void |
bind(int arg0,
java.lang.String binddn,
byte[] pass)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, and LDAP version. |
void |
bind(int arg0,
java.lang.String binddn,
byte[] pass,
LDAPConstraints arg3)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and constraints. |
LDAPResponseQueue |
bind(int arg0,
java.lang.String arg1,
byte[] arg2,
LDAPResponseQueue arg3)
Asynchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and queue. |
LDAPResponseQueue |
bind(int arg0,
java.lang.String arg1,
byte[] arg2,
LDAPResponseQueue arg3,
LDAPConstraints arg4)
Asynchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, queue, and constraints. |
void |
bind(int arg0,
java.lang.String binddn,
java.lang.String pass)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, and LDAP version. |
void |
bind(int arg0,
java.lang.String binddn,
java.lang.String pass,
LDAPConstraints arg3)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and constraints. |
void |
bind(java.lang.String binddn,
java.lang.String password)
Synchronously authenticates to the LDAP server (that the object is currently connected to) as an LDAPv3 bind, using the specified name and password. |
void |
bind(java.lang.String binddn,
java.lang.String pass,
LDAPConstraints arg2)
Synchronously authenticates to the LDAP server (that the object is currently connected to) as an LDAPv3 bind, using the specified name, password, and constraints. |
void |
bind(java.lang.String binddn,
java.lang.String pass,
java.util.Map arg2,
java.lang.Object arg3)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms. |
void |
bind(java.lang.String binddn,
java.lang.String pass,
java.util.Map arg2,
java.lang.Object arg3,
LDAPConstraints arg4)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms. |
void |
bind(java.lang.String binddn,
java.lang.String arg1,
java.lang.String[] arg2,
java.util.Map arg3,
java.lang.Object arg4)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms. |
void |
bind(java.lang.String binddn,
java.lang.String pass,
java.lang.String[] arg2,
java.util.Map arg3,
java.lang.Object arg4,
LDAPConstraints arg5)
Synchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms. |
void |
connect(java.lang.String serverUrl,
int port)
Sets the host as the serverUrl, port is ignored |
void |
delete(java.lang.String dn)
Synchronously deletes the entry with the specified distinguished name from the directory. |
void |
delete(java.lang.String dn,
LDAPConstraints consts)
Synchronously deletes the entry with the specified distinguished name from the directory, using the specified constraints. |
LDAPResponseQueue |
delete(java.lang.String arg0,
LDAPResponseQueue arg1)
Asynchronously deletes the entry with the specified distinguished name from the directory and returns the results to the specified queue. |
LDAPResponseQueue |
delete(java.lang.String arg0,
LDAPResponseQueue arg1,
LDAPConstraints arg2)
Asynchronously deletes the entry with the specified distinguished name from the directory, using the specified contraints and queue. |
void |
disconnect()
Synchronously disconnects from the LDAP server. |
void |
disconnect(LDAPConstraints cons)
Synchronously disconnects from the LDAP server. |
java.lang.String |
getBinddn()
|
HttpRequestCallback |
getCallback()
|
HttpClient |
getCon()
|
java.lang.String |
getHost()
Returns the host name of the LDAP server to which the object is or was last connected, in the format originally specified. |
java.lang.String |
getPass()
|
java.lang.String |
getServerString()
|
boolean |
isBound()
Indicates whether the object has authenticated to the connected LDAP server. |
boolean |
isConnected()
Indicates whether the connection represented by this object is open at this time. |
boolean |
isConnectionAlive()
Checks whether the connection represented by this object is still alive or not. |
boolean |
isTLS()
Indicatates if the connection is protected by TLS. |
void |
modify(java.lang.String dn,
LDAPModification mod)
Synchronously makes a single change to an existing entry in the directory. |
void |
modify(java.lang.String dn,
LDAPModification[] mods)
Synchronously makes a set of changes to an existing entry in the directory. |
void |
modify(java.lang.String dn,
LDAPModification[] mods,
LDAPConstraints consts)
Synchronously makes a set of changes to an existing entry in the directory, using the specified constraints. |
LDAPResponseQueue |
modify(java.lang.String arg0,
LDAPModification[] arg1,
LDAPResponseQueue arg2)
Asynchronously makes a set of changes to an existing entry in the directory. |
LDAPResponseQueue |
modify(java.lang.String arg0,
LDAPModification[] arg1,
LDAPResponseQueue arg2,
LDAPConstraints arg3)
Asynchronously makes a set of changes to an existing entry in the directory, using the specified constraints and queue. |
void |
modify(java.lang.String dn,
LDAPModification mod,
LDAPConstraints consts)
Synchronously makes a single change to an existing entry in the directory, using the specified constraints. |
LDAPResponseQueue |
modify(java.lang.String arg0,
LDAPModification arg1,
LDAPResponseQueue arg2)
Asynchronously makes a single change to an existing entry in the directory. |
LDAPResponseQueue |
modify(java.lang.String arg0,
LDAPModification arg1,
LDAPResponseQueue arg2,
LDAPConstraints arg3)
Asynchronously makes a single change to an existing entry in the directory, using the specified constraints and queue. |
void |
rename(java.lang.String dn,
java.lang.String newDn,
boolean delOld)
Synchronously renames an existing entry in the directory. |
void |
rename(java.lang.String dn,
java.lang.String newDn,
boolean delOld,
LDAPConstraints consts)
Synchronously renames an existing entry in the directory, using the specified constraints. |
LDAPResponseQueue |
rename(java.lang.String arg0,
java.lang.String arg1,
boolean arg2,
LDAPResponseQueue arg3)
Asynchronously renames an existing entry in the directory. |
LDAPResponseQueue |
rename(java.lang.String arg0,
java.lang.String arg1,
boolean arg2,
LDAPResponseQueue arg3,
LDAPConstraints arg4)
Asynchronously renames an existing entry in the directory, using the specified constraints. |
void |
rename(java.lang.String dn,
java.lang.String newRdn,
java.lang.String newParentDN,
boolean delOld)
Synchronously renames an existing entry in the directory, possibly repositioning the entry in the directory tree. |
void |
rename(java.lang.String dn,
java.lang.String newRdn,
java.lang.String newParentDN,
boolean delOld,
LDAPConstraints constr)
Synchronously renames an existing entry in the directory, using the specified constraints and possibly repositioning the entry in the directory tree. |
LDAPResponseQueue |
rename(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
boolean arg3,
LDAPResponseQueue arg4)
Asynchronously renames an existing entry in the directory, possibly repositioning the entry in the directory. |
LDAPResponseQueue |
rename(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
boolean arg3,
LDAPResponseQueue arg4,
LDAPConstraints arg5)
Asynchronously renames an existing entry in the directory, using the specified constraints and possibily repositioning the entry in the directory. |
LDAPSearchResults |
search(java.lang.String base,
int scope,
java.lang.String filter,
java.lang.String[] attrs,
boolean typesOnly)
Synchronously performs the search specified by the parameters. |
LDAPSearchResults |
search(java.lang.String base,
int scope,
java.lang.String filter,
java.lang.String[] attrs,
boolean typesOnly,
LDAPSearchConstraints cons)
Synchronously performs the search specified by the parameters, using the specified search constraints (such as the maximum number of entries to find or the maximum time to wait for search results). |
LDAPSearchQueue |
search(java.lang.String base,
int scope,
java.lang.String filter,
java.lang.String[] attrs,
boolean typesOnly,
LDAPSearchQueue queue)
Asynchronously performs the search specified by the parameters. |
LDAPSearchQueue |
search(java.lang.String base,
int scope,
java.lang.String filter,
java.lang.String[] attrs,
boolean typesOnly,
LDAPSearchQueue queue,
LDAPSearchConstraints cons)
Asynchronously performs the search specified by the parameters, also allowing specification of constraints for the search (such as the maximum number of entries to find or the maximum time to wait for search results). |
LDAPMessageQueue |
sendRequest(LDAPMessage request,
LDAPMessageQueue queue)
Sends an LDAP request to a directory server. |
void |
setCallback(HttpRequestCallback call)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEF_IMPL
Constructor Detail |
public SPMLConnection()
public SPMLConnection(java.lang.String className)
public SPMLConnection(java.lang.String className, java.lang.ClassLoader loader)
public SPMLConnection(LDAPSocketFactory factory)
factory
- Method Detail |
public void connect(java.lang.String serverUrl, int port) throws LDAPException
connect
in class LDAPConnection
serverUrl
- The Server location and contextport
- The port (ignored)
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(int arg0, java.lang.String binddn, byte[] pass, LDAPConstraints arg3) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
arg0
- The LDAP protocol version, use LDAP_V3.
LDAP_V2 is not supported.
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
arg3
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue bind(int arg0, java.lang.String arg1, byte[] arg2, LDAPResponseQueue arg3, LDAPConstraints arg4) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object had already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
arg0
- The LDAP protocol version, use LDAP_V3.
LDAP_V2 is not supported.
arg1
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
arg2
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
arg3
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg4
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue bind(int arg0, java.lang.String arg1, byte[] arg2, LDAPResponseQueue arg3) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
arg0
- The LDAP protocol version, use LDAP_V3.
LDAP_V2 is not supported.
arg1
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
arg2
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
arg3
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(int arg0, java.lang.String binddn, byte[] pass) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
arg0
- The version of the LDAP protocol to use
in the bind, use LDAP_V3. LDAP_V2 is not supported.
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(int arg0, java.lang.String binddn, java.lang.String pass, LDAPConstraints arg3) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
arg0
- The LDAP protocol version, use LDAP_V3.
LDAP_V2 is not supported.
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
arg3
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(int arg0, java.lang.String binddn, java.lang.String pass) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
arg0
- The LDAP protocol version, use LDAP_V3.
LDAP_V2 is not supported.
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(java.lang.String binddn, java.lang.String pass, LDAPConstraints arg2) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
Note: the application should use care in the use
of String password objects. These are long lived
objects, and may expose a security risk, especially
in objects that are serialized. The LDAPConnection
keeps no long lived instances of these objects.
arg2
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(java.lang.String binddn, java.lang.String pass, java.util.Map arg2, java.lang.Object arg3, LDAPConstraints arg4) throws LDAPException
LDAPConnection
If none of the requested SASL mechanisms is available, an exception is thrown. If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded. If mechanisms is null, or if the first version of the method is called, the LDAP server will be interrogated for its supportedSaslMechanisms attribute of its root DSE. See RFC 2251 for a discussion of the SASL classes.
bind
in class LDAPConnection
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If not null and not empty, specifies an LDAP authzId to
pass to the SASL layer. If null or empty, the authzId
will be treated as an empty string and processed
as per RFC 2222.
arg2
- The optional qualifiers for the authentication
session.
arg3
- A class which may be called by the SASL client
implementation to obtain additional information
required, such as additional credentials.
If cbh is not of type
javax.security.auth.callback.CallbackHandler, a
RuntimeException will be thrown.
arg4
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(java.lang.String binddn, java.lang.String pass, java.util.Map arg2, java.lang.Object arg3) throws LDAPException
LDAPConnection
If none of the requested SASL mechanisms is available, an exception is thrown. If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded. If mechanisms is null, or if the first version of the method is called, the LDAP server will be interrogated for its supportedSaslMechanisms attribute of its root DSE. See RFC 2251 for a discussion of the SASL classes.
bind
in class LDAPConnection
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
pass
- If not null and not empty, specifies an LDAP authzId to
pass to the SASL layer. If null or empty, the authzId
will be treated as an empty string and processed
as per RFC 2222.
arg2
- The optional qualifiers for the authentication
session.
arg3
- A class which may be called by the SASL client
implementation to obtain additional information
required, such as additional credentials.
If cbh is not of type
javax.security.auth.callback.CallbackHandler, a
RuntimeException will be thrown.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(java.lang.String binddn, java.lang.String pass, java.lang.String[] arg2, java.util.Map arg3, java.lang.Object arg4, LDAPConstraints arg5) throws LDAPException
LDAPConnection
If none of the requested SASL mechanisms is available, an exception is thrown. If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded. If mechanisms is null, or if the first version of the method is called, the LDAP server will be interrogated for its supportedSaslMechanisms attribute of its root DSE. See RFC 2251 for a discussion of the SASL classes.
bind
in class LDAPConnection
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.pass
- If not null and not empty, specifies an LDAP authzId to
pass to the SASL layer. If null or empty, the authzId
will be treated as an empty string and processed
as per RFC 2222.
arg2
- An array of IANA-registered SASL mechanisms which
the client is willing to use for authentication.
arg3
- The optional qualifiers for the authentication
session.
arg4
- A class which may be called by the SASL client
implementation to obtain additional information
required, such as additional credentials.
If cbh is not of type
javax.security.auth.callback.CallbackHandler, a
RuntimeException will be thrown.
arg5
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(java.lang.String binddn, java.lang.String arg1, java.lang.String[] arg2, java.util.Map arg3, java.lang.Object arg4) throws LDAPException
LDAPConnection
If none of the requested SASL mechanisms is available, an exception is thrown. If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded. If mechanisms is null, or if the first version of the method is called, the LDAP server will be interrogated for its supportedSaslMechanisms attribute of its root DSE. See RFC 2251 for a discussion of the SASL classes.
bind
in class LDAPConnection
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.arg1
- If not null and not empty, specifies an LDAP authzId to
pass to the SASL layer. If null or empty, the authzId
will be treated as an empty string and processed
as per RFC 2222.
arg2
- An array of IANA-registered SASL mechanisms which
the client is willing to use for authentication.
arg3
- The optional qualifiers for the authentication
session.
arg4
- A class which may be called by the SASL client
implementation to obtain additional information
required, such as additional credentials.
If cbh is not of type
javax.security.auth.callback.CallbackHandler, a
RuntimeException will be thrown.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void bind(java.lang.String binddn, java.lang.String password) throws LDAPException
LDAPConnection
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind
in class LDAPConnection
binddn
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name.
password
- If non-null and non-empty, specifies that the
connection and all operations through it should
be authenticated with dn as the distinguished
name and passwd as password.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void add(LDAPEntry entry, LDAPConstraints cont) throws LDAPException
LDAPConnection
add
in class LDAPConnection
entry
- LDAPEntry object specifying the distinguished
name and attributes of the new entry.
cont
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue add(LDAPEntry arg0, LDAPResponseQueue arg1, LDAPConstraints arg2) throws LDAPException
LDAPConnection
add
in class LDAPConnection
arg0
- LDAPEntry object specifying the distinguished
name and attributes of the new entry.
arg1
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg2
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue add(LDAPEntry arg0, LDAPResponseQueue arg1) throws LDAPException
LDAPConnection
add
in class LDAPConnection
arg0
- LDAPEntry object specifying the distinguished
name and attributes of the new entry.
arg1
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void add(LDAPEntry entry) throws LDAPException
LDAPConnection
add
in class LDAPConnection
entry
- LDAPEntry object specifying the distinguished
name and attributes of the new entry.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void modify(java.lang.String dn, LDAPModification mod, LDAPConstraints consts) throws LDAPException
LDAPConnection
For example, this modify method changes the value of an attribute, adds a new attribute value, or removes an existing attribute value.
The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modification.
modify
in class LDAPConnection
dn
- The distinguished name of the entry to modify.
mod
- A single change to be made to the entry.
consts
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue modify(java.lang.String arg0, LDAPModification arg1, LDAPResponseQueue arg2, LDAPConstraints arg3) throws LDAPException
LDAPConnection
For example, this modify method can change the value of an attribute, add a new attribute value, or remove an existing attribute value.
The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modification.
modify
in class LDAPConnection
arg0
- Distinguished name of the entry to modify.
arg1
- A single change to be made to the entry.
arg2
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg3
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue modify(java.lang.String arg0, LDAPModification arg1, LDAPResponseQueue arg2) throws LDAPException
LDAPConnection
For example, this modify method can change the value of an attribute, add a new attribute value, or remove an existing attribute value.
The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modification.
modify
in class LDAPConnection
arg0
- Distinguished name of the entry to modify.
arg1
- A single change to be made to the entry.
arg2
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void modify(java.lang.String dn, LDAPModification mod) throws LDAPException
LDAPConnection
For example, this modify method changes the value of an attribute, adds a new attribute value, or removes an existing attribute value.
The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modification.
modify
in class LDAPConnection
dn
- The distinguished name of the entry to modify.
mod
- A single change to be made to the entry.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void modify(java.lang.String dn, LDAPModification[] mods, LDAPConstraints consts) throws LDAPException
LDAPConnection
For example, this modify method changes attribute values, adds new attribute values, or removes existing attribute values.
Because the server applies all changes in an LDAPModification array
atomically, the application can expect that no changes
have been performed if an error is returned.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modifications.
modify
in class LDAPConnection
dn
- The distinguished name of the entry to modify.
mods
- The changes to be made to the entry.
consts
- The constraints specific to the operation.
LDAPException
- A general exception which includes an
error message and an LDAP error code.public LDAPResponseQueue modify(java.lang.String arg0, LDAPModification[] arg1, LDAPResponseQueue arg2, LDAPConstraints arg3) throws LDAPException
LDAPConnection
For example, this modify method can change attribute values, add new attribute values, or remove existing attribute values.
Because the server applies all changes in an LDAPModification array
atomically, the application can expect that no changes
have been performed if an error is returned.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modifications.
modify
in class LDAPConnection
arg0
- The distinguished name of the entry to modify.
arg1
- The changes to be made to the entry.
arg2
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg3
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue modify(java.lang.String arg0, LDAPModification[] arg1, LDAPResponseQueue arg2) throws LDAPException
LDAPConnection
For example, this modify method can change attribute values, add new attribute values, or remove existing attribute values.
Because the server applies all changes in an LDAPModification array
atomically, the application can expect that no changes
have been performed if an error is returned.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modifications.
modify
in class LDAPConnection
arg0
- The distinguished name of the entry to modify.
arg1
- The changes to be made to the entry.
arg2
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void modify(java.lang.String dn, LDAPModification[] mods) throws LDAPException
LDAPConnection
For example, this modify method changes attribute values, adds new attribute values, or removes existing attribute values.
Because the server applies all changes in an LDAPModification array
atomically, the application can expect that no changes
have been performed if an error is returned.
If the request fails with LDAPException.CONNECT_ERROR
,
it is indeterminate whether or not the server made the modifications.
modify
in class LDAPConnection
dn
- Distinguished name of the entry to modify.
mods
- The changes to be made to the entry.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void rename(java.lang.String dn, java.lang.String newDn, boolean delOld, LDAPConstraints consts) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
dn
- The current distinguished name of the entry.
newDn
- The new relative distinguished name for the entry.
delOld
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
consts
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue rename(java.lang.String arg0, java.lang.String arg1, boolean arg2, LDAPResponseQueue arg3, LDAPConstraints arg4) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
arg0
- The current distinguished name of the entry.
arg1
- The new relative distinguished name for the entry.
arg2
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
arg3
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg4
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue rename(java.lang.String arg0, java.lang.String arg1, boolean arg2, LDAPResponseQueue arg3) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
arg0
- The current distinguished name of the entry.
arg1
- The new relative distinguished name for the entry.
arg2
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
arg3
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void rename(java.lang.String dn, java.lang.String newDn, boolean delOld) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
dn
- The current distinguished name of the entry.
newDn
- The new relative distinguished name for the entry.
delOld
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void rename(java.lang.String dn, java.lang.String newRdn, java.lang.String newParentDN, boolean delOld, LDAPConstraints constr) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
dn
- The current distinguished name of the entry.
newRdn
- The new relative distinguished name for the entry.
newParentDN
- The distinguished name of an existing entry which
is to be the new parent of the entry.
delOld
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
constr
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue rename(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, boolean arg3, LDAPResponseQueue arg4, LDAPConstraints arg5) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
arg0
- The current distinguished name of the entry.
arg1
- The new relative distinguished name for the entry.
arg2
- The distinguished name of an existing entry which
is to be the new parent of the entry.
arg3
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
arg4
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg5
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue rename(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, boolean arg3, LDAPResponseQueue arg4) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
arg0
- The current distinguished name of the entry.
arg1
- The new relative distinguished name for the entry.
arg2
- The distinguished name of an existing entry which
is to be the new parent of the entry.
arg3
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
arg4
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void rename(java.lang.String dn, java.lang.String newRdn, java.lang.String newParentDN, boolean delOld) throws LDAPException
LDAPConnection
rename
in class LDAPConnection
dn
- The current distinguished name of the entry.
newRdn
- The new relative distinguished name for the entry.
newParentDN
- The distinguished name of an existing entry which
is to be the new parent of the entry.
delOld
- If true, the old name is not retained as an
attribute value. If false, the old name is
retained as an attribute value.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void delete(java.lang.String dn, LDAPConstraints consts) throws LDAPException
LDAPConnection
Note: A Delete operation will not remove an entry that contains subordinate entries, nor will it dereference alias entries.
delete
in class LDAPConnection
dn
- The distinguished name of the entry to delete.
consts
- Constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue delete(java.lang.String arg0, LDAPResponseQueue arg1, LDAPConstraints arg2) throws LDAPException
LDAPConnection
Note: A Delete operation will not remove an entry that contains subordinate entries, nor will it dereference alias entries.
delete
in class LDAPConnection
arg0
- The distinguished name of the entry to delete.
arg1
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
arg2
- The constraints specific to the operation.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPResponseQueue delete(java.lang.String arg0, LDAPResponseQueue arg1) throws LDAPException
LDAPConnection
Note: A Delete operation will not remove an entry that contains subordinate entries, nor will it dereference alias entries.
delete
in class LDAPConnection
arg0
- The distinguished name of the entry to modify.
arg1
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void delete(java.lang.String dn) throws LDAPException
LDAPConnection
Note: A Delete operation will not remove an entry that contains subordinate entries, nor will it dereference alias entries.
delete
in class LDAPConnection
dn
- The distinguished name of the entry to delete.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPSearchResults search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchConstraints cons) throws LDAPException
LDAPConnection
As part of the search constraints, the method allows specifying whether or not the results are to be delivered all at once or in smaller batches. If specified that the results are to be delivered in smaller batches, each iteration blocks only until the next batch of results is returned.
search
in class LDAPConnection
base
- The base distinguished name to search from.
scope
- The scope of the entries to search. The following
are the valid options:
filter
- The search filter specifying the search criteria.
attrs
- The names of attributes to retrieve.
typesOnly
- If true, returns the names but not the values of
the attributes found. If false, returns the
names and values for attributes found.
cons
- The constraints specific to the search.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPSearchQueue search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchQueue queue, LDAPSearchConstraints cons) throws LDAPException
LDAPConnection
search
in class LDAPConnection
base
- The base distinguished name to search from.
scope
- The scope of the entries to search. The following
are the valid options:
filter
- The search filter specifying the search criteria.
attrs
- The names of attributes to retrieve.
typesOnly
- If true, returns the names but not the values of
the attributes found. If false, returns the
names and values for attributes found.
queue
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
cons
- The constraints specific to the search.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPSearchQueue search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchQueue queue) throws LDAPException
LDAPConnection
search
in class LDAPConnection
base
- The base distinguished name to search from.
scope
- The scope of the entries to search. The following
are the valid options:
filter
- Search filter specifying the search criteria.
attrs
- Names of attributes to retrieve.
typesOnly
- If true, returns the names but not the values of
the attributes found. If false, returns the
names and values for attributes found.
queue
- Handler for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPSearchResults search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly) throws LDAPException
LDAPConnection
search
in class LDAPConnection
base
- The base distinguished name to search from.
scope
- The scope of the entries to search. The following
are the valid options:
filter
- Search filter specifying the search criteria.
attrs
- Names of attributes to retrieve.
typesOnly
- If true, returns the names but not the values of
the attributes found. If false, returns the
names and values for attributes found.
LDAPException
- A general exception which includes an error
message and an LDAP error code.public boolean isConnectionAlive()
LDAPConnection
isConnectionAlive
in class LDAPConnection
public boolean isBound()
LDAPConnection
isBound
in class LDAPConnection
LDAPConnection.bind( String, String)
public boolean isConnected()
LDAPConnection
isConnected
in class LDAPConnection
public boolean isTLS()
LDAPConnection
isTLS
in class LDAPConnection
LDAPConnection.startTLS()
,
LDAPConnection.stopTLS()
public void disconnect() throws LDAPException
LDAPConnection
Before the object can perform LDAP operations again, it must reconnect to the server by calling connect.
The disconnect method abandons any outstanding requests, issues an unbind request to the server, and then closes the socket.
disconnect
in class LDAPConnection
LDAPException
- A general exception which includes an error
message and an LDAP error code.public void disconnect(LDAPConstraints cons) throws LDAPException
LDAPConnection
Before the object can perform LDAP operations again, it must reconnect to the server by calling connect.
The disconnect method abandons any outstanding requests, issues an unbind request to the server, and then closes the socket.
disconnect
in class LDAPConnection
cons
- LDPConstraints to be set with the unbind request
LDAPException
- A general exception which includes an error
message and an LDAP error code.public LDAPMessageQueue sendRequest(LDAPMessage request, LDAPMessageQueue queue) throws LDAPException
LDAPConnection
The specified the LDAP request is sent to the directory server
associated with this connection using default constraints. An LDAP
request object is a subclass LDAPMessage
with the operation
type set to one of the request types. You can build a request by using
the request classes found in this package
You should note that, since LDAP requests sent to the server using sendRequest are asynchronous, automatic referral following does not apply to these requests.
sendRequest
in class LDAPConnection
request
- The LDAP request to send to the directory server.queue
- The queue for messages returned from a server in
response to this request. If it is null, a
queue object is created internally.
LDAPException
- A general exception which includes an error
message and an LDAP error code.LDAPMessage.getType()
,
LDAPMessage.isRequest()
public HttpRequestCallback getCallback()
public void setCallback(HttpRequestCallback call)
call
- The call to set.public java.lang.String getBinddn()
public HttpClient getCon()
public java.lang.String getHost()
LDAPConnection
getHost
in class LDAPConnection
LDAPConnection.connect( String, int)
public java.lang.String getPass()
public java.lang.String getServerString()
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |