public class LdapConnectionWrapper extends Object implements LdapConnection, Wrapper<LdapConnection>
Wrapper for LdapConnection
objects. All methods are passed through to the wrapped
LdapConnection.| Modifier and Type | Field and Description |
|---|---|
protected LdapConnection |
connection |
| Modifier | Constructor and Description |
|---|---|
protected |
LdapConnectionWrapper(LdapConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
abandon(org.apache.directory.api.ldap.model.message.AbandonRequest abandonRequest)
An abandon request essentially with the request message ID of the operation to be canceled
and/or potentially some controls and timeout (the controls and timeout are not mandatory).
|
void |
abandon(int messageId)
Abandons a request submitted to the server for performing a particular operation.
|
org.apache.directory.api.ldap.model.message.AddResponse |
add(org.apache.directory.api.ldap.model.message.AddRequest addRequest)
Add an entry present in the
AddRequest to the server. |
void |
add(org.apache.directory.api.ldap.model.entry.Entry entry)
Add an entry to the server.
|
void |
anonymousBind()
Anonymous bind on a server.
|
void |
bind()
Bind on a server, using the
LdapConnectionConfig information of this connection. |
org.apache.directory.api.ldap.model.message.BindResponse |
bind(org.apache.directory.api.ldap.model.message.BindRequest bindRequest)
Bind to the server using a bind request object.
|
void |
bind(org.apache.directory.api.ldap.model.name.Dn name)
Unauthenticated authentication bind on a server.
|
void |
bind(org.apache.directory.api.ldap.model.name.Dn name,
String credentials)
Simple bind on a server.
|
void |
bind(String name)
Unauthenticated authentication bind on a server.
|
void |
bind(String name,
String credentials)
Simple bind on a server.
|
void |
close()
Disconnect from the remote LDAP server.
|
org.apache.directory.api.ldap.model.message.CompareResponse |
compare(org.apache.directory.api.ldap.model.message.CompareRequest compareRequest)
Compares an entry's attribute's value with that of the given value.
|
boolean |
compare(org.apache.directory.api.ldap.model.name.Dn dn,
String attributeName,
byte[] value)
Compares whether a given attribute's value matches that of the
existing value of the attribute present in the entry with the given distinguished name.
|
boolean |
compare(org.apache.directory.api.ldap.model.name.Dn dn,
String attributeName,
String value)
Compares whether a given attribute's value matches that of the
existing value of the attribute present in the entry with the given distinguished name.
|
boolean |
compare(org.apache.directory.api.ldap.model.name.Dn dn,
String attributeName,
org.apache.directory.api.ldap.model.entry.Value<?> value)
Compares whether a given attribute's value matches that of the
existing value of the attribute present in the entry with the given distinguished name.
|
boolean |
compare(String dn,
String attributeName,
byte[] value)
Compares whether a given attribute's value matches that of the
existing value of the attribute present in the entry with the given distinguished name.
|
boolean |
compare(String dn,
String attributeName,
String value)
Compares whether a given attribute's value matches that of the
existing value of the attribute present in the entry with the given distinguished name.
|
boolean |
compare(String dn,
String attributeName,
org.apache.directory.api.ldap.model.entry.Value<?> value)
Compares whether a given attribute's value matches that of the
existing value of the attribute present in the entry with the given distinguished name.
|
boolean |
connect()
Connect to the remote LDAP server.
|
org.apache.directory.api.ldap.model.message.DeleteResponse |
delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest)
Performs a delete operation based on the delete request object.
|
void |
delete(org.apache.directory.api.ldap.model.name.Dn dn)
Deletes the entry with the given distinguished name.
|
void |
delete(String dn)
Deletes the entry with the given distinguished name.
|
boolean |
doesFutureExistFor(int messageId)
Checks if there is a ResponseFuture associated with the given message ID.
|
boolean |
exists(org.apache.directory.api.ldap.model.name.Dn dn)
Tells if an Entry exists in the server.
|
boolean |
exists(String dn)
Tells if an entry exists in the server.
|
org.apache.directory.api.ldap.model.message.ExtendedResponse |
extended(org.apache.directory.api.ldap.model.message.ExtendedRequest extendedRequest)
Performs an extended operation based on the extended request object.
|
org.apache.directory.api.ldap.model.message.ExtendedResponse |
extended(org.apache.directory.api.asn1.util.Oid oid)
Sends a extended operation request to the server with the given OID and no value.
|
org.apache.directory.api.ldap.model.message.ExtendedResponse |
extended(org.apache.directory.api.asn1.util.Oid oid,
byte[] value)
Sends a extended operation request to the server with the given OID and value.
|
org.apache.directory.api.ldap.model.message.ExtendedResponse |
extended(String oid)
Sends a extended operation request to the server with the given OID and no value.
|
org.apache.directory.api.ldap.model.message.ExtendedResponse |
extended(String oid,
byte[] value)
Sends a extended operation request to the server with the given OID and value.
|
org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector |
getBinaryAttributeDetector() |
org.apache.directory.api.ldap.codec.api.LdapApiService |
getCodecService()
Gets the LDAP CODEC service responsible for encoding and decoding
messages.
|
org.apache.directory.api.ldap.model.entry.Entry |
getRootDse()
Get back the RooDSE from the connected server.
|
org.apache.directory.api.ldap.model.entry.Entry |
getRootDse(String... attributes)
Get back the RooDSE from the connected server.
|
org.apache.directory.api.ldap.model.schema.SchemaManager |
getSchemaManager() |
List<String> |
getSupportedControls()
Get the Controls supported by server.
|
boolean |
isAuthenticated()
Check if we are authenticated.
|
boolean |
isConnected()
Check if we are connected.
|
boolean |
isControlSupported(String controlOID)
Checks if a control with the given OID is supported.
|
void |
loadSchema()
Loads all the default schemas that are bundled with the API.
Note: This method enables all schemas prior to loading. |
void |
loadSchemaRelaxed()
Loads all the default schemas that are bundled with the API, in a relaxed mode.
Note: This method enables all schemas prior to loading. The relaxed mode will allow inconsistencies in the schema. |
org.apache.directory.api.ldap.model.entry.Entry |
lookup(org.apache.directory.api.ldap.model.name.Dn dn)
Searches for an entry having the given Dn.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.message.Control[] controls,
String... attributes)
Searches for an entry having the given Dn.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(org.apache.directory.api.ldap.model.name.Dn dn,
String... attributes)
Searches for an entry having the given Dn.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(String dn)
Searches for an entry having the given Dn.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(String dn,
org.apache.directory.api.ldap.model.message.Control[] controls,
String... attributes)
Searches for an entry having the given Dn.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(String dn,
String... attributes)
Searches for an entry having the given Dn.
|
void |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Modification... modifications)
Applies all the modifications to the entry specified by its distinguished name.
|
void |
modify(org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.entry.ModificationOperation modOp)
Modifies all the attributes present in the entry by applying the same operation.
|
org.apache.directory.api.ldap.model.message.ModifyResponse |
modify(org.apache.directory.api.ldap.model.message.ModifyRequest modRequest)
Performs an modify operation based on the modifications present in
the modify request.
|
void |
modify(String dn,
org.apache.directory.api.ldap.model.entry.Modification... modifications)
Applies all the modifications to the entry specified by its distinguished name.
|
org.apache.directory.api.ldap.model.message.ModifyDnResponse |
modifyDn(org.apache.directory.api.ldap.model.message.ModifyDnRequest modDnRequest)
Performs the modifyDn operation based on the given request object.
|
void |
move(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn)
Moves the given entry Dn under the new superior Dn.
|
void |
move(String entryDn,
String newSuperiorDn)
Moves the given entry Dn under the new superior Dn.
|
void |
moveAndRename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Dn newDn)
Moves and renames the given entryDn.
|
void |
moveAndRename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Dn newDn,
boolean deleteOldRdn)
Moves and renames the given entryDn.
|
void |
moveAndRename(String entryDn,
String newDn)
Moves and renames the given entryDn.The old Rdn will be deleted
|
void |
moveAndRename(String entryDn,
String newDn,
boolean deleteOldRdn)
Moves and renames the given entryDn.
|
void |
rename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn.
|
void |
rename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn if
deleteOldRdn is set to true.
|
void |
rename(String entryDn,
String newRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn.
|
void |
rename(String entryDn,
String newRdn,
boolean deleteOldRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn if
deleteOldRdn is set to true.
|
org.apache.directory.api.ldap.model.cursor.EntryCursor |
search(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
Do a search, on the base object, using the given filter and scope.
|
org.apache.directory.api.ldap.model.cursor.SearchCursor |
search(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest)
Performs search using a search request object.
|
org.apache.directory.api.ldap.model.cursor.EntryCursor |
search(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
Do a search, on the base object, using the given filter and scope.
|
void |
setBinaryAttributeDetector(org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector binaryAttributeDetecter)
Sets the object responsible for the detection of binary attributes.
|
void |
setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
sets a SchemaManager to be used by this connection
|
void |
setTimeOut(long timeOut)
Set the timeout for the responses.
|
void |
unBind()
UnBind from a server.
|
LdapConnection |
wrapped()
Returns the wrapped object.
|
protected LdapConnection connection
protected LdapConnectionWrapper(LdapConnection connection)
public LdapConnection wrapped()
wrapped in interface Wrapper<LdapConnection>public boolean isConnected()
LdapConnectionisConnected in interface LdapConnectiontrue if we are connected.public boolean isAuthenticated()
LdapConnectionisAuthenticated in interface LdapConnectiontrue if we are connected.public boolean connect()
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionconnect in interface LdapConnectiontrue if the connection is established, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void close()
throws IOException
LdapConnectionclose in interface Closeableclose in interface AutoCloseableclose in interface LdapConnectionIOException - if some I/O error occurspublic void add(org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionadd in interface LdapConnectionentry - The entry to addorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.message.AddResponse add(org.apache.directory.api.ldap.model.message.AddRequest addRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionAddRequest to the server.add in interface LdapConnectionaddRequest - the request object containing an entry and controls (if any)org.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void abandon(int messageId)
LdapConnectionabandon in interface LdapConnectionmessageId - the ID of the request message sent to the serverpublic void abandon(org.apache.directory.api.ldap.model.message.AbandonRequest abandonRequest)
LdapConnectionabandon in interface LdapConnectionabandonRequest - the abandon operation's requestpublic void bind()
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionLdapConnectionConfig information of this connection.bind in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void anonymousBind()
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionanonymousBind in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void bind(String name) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionbind in interface LdapConnectionname - The name we use to authenticate the user. It must be a
valid Dnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void bind(String name, String credentials) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionbind in interface LdapConnectionname - The name we use to authenticate the user. It must be a
valid Dncredentials - The password, it can't be nullorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void bind(org.apache.directory.api.ldap.model.name.Dn name)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionbind in interface LdapConnectionname - The name we use to authenticate the user.org.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void bind(org.apache.directory.api.ldap.model.name.Dn name,
String credentials)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionbind in interface LdapConnectionname - The name we use to authenticate the user.credentials - The password, it can't be nullorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.message.BindResponse bind(org.apache.directory.api.ldap.model.message.BindRequest bindRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionbind in interface LdapConnectionbindRequest - The bind request object containing all the needed parametersBindResponse containing the resultorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.cursor.EntryCursor search(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionsearch in interface LdapConnectionbaseDn - The base for the search. It must be a valid distinguished name and can't be emtpyfilter - The filter to use for this search. It can't be emptyscope - The search scope : OBJECT, ONELEVEL or SUBTREEattributes - The attributes to use for this searchEntryCursor on the result.org.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.cursor.EntryCursor search(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionsearch in interface LdapConnectionbaseDn - The base for the search. It must be a valid distinguished name, and can't be emtpyfilter - The filter to use for this search. It can't be emptyscope - The search scope : OBJECT, ONELEVEL or SUBTREEattributes - The attributes to use for this searchEntryCursor on the result.org.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.cursor.SearchCursor search(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionsearch in interface LdapConnectionsearchRequest - The search request object containing all the needed informationorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void unBind()
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionunBind in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void setTimeOut(long timeOut)
LdapConnectionsetTimeOut in interface LdapConnectiontimeOut - The timeout, in millisecondspublic void modify(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Modification... modifications)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmodify in interface LdapConnectiondn - The entry's distinguished namemodifications - The list of modifications to be appliedorg.apache.directory.api.ldap.model.exception.LdapException - in case of modify operation failure or timeout happenspublic void modify(String dn, org.apache.directory.api.ldap.model.entry.Modification... modifications) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmodify in interface LdapConnectiondn - The entry's distinguished name, it must be a valid Dnmodifications - The list of modifications to be appliedorg.apache.directory.api.ldap.model.exception.LdapException - in case of modify operation failure or timeout happenspublic void modify(org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.entry.ModificationOperation modOp)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmodify in interface LdapConnectionentry - the entry with the attributes to be modifiedmodOp - the operation to be applied on all the attributes of the above entryorg.apache.directory.api.ldap.model.exception.LdapException - in case of modify operation failure or timeout happenspublic org.apache.directory.api.ldap.model.message.ModifyResponse modify(org.apache.directory.api.ldap.model.message.ModifyRequest modRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmodify in interface LdapConnectionmodRequest - the modify request objectorg.apache.directory.api.ldap.model.exception.LdapException - in case of modify operation failure or timeout happenspublic void rename(String entryDn, String newRdn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionrename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target Dnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.rename(String, String, boolean)public void rename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionrename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target Dnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.rename(Dn, Rdn, boolean)public void rename(String entryDn, String newRdn, boolean deleteOldRdn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionrename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target DndeleteOldRdn - flag to indicate whether to delete the old Rdnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.rename(Dn, Rdn, boolean)public void rename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionrename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target DndeleteOldRdn - flag to indicate whether to delete the old Rdnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void move(String entryDn, String newSuperiorDn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmove in interface LdapConnectionentryDn - the Dn of the target entrynewSuperiorDn - Dn of the new parent/superiororg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.move(Dn, Dn)public void move(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmove in interface LdapConnectionentryDn - the Dn of the target entrynewSuperiorDn - Dn of the new parent/superiororg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Dn newDn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmoveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new entry Dnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.moveAndRename(Dn, Dn, boolean)public void moveAndRename(String entryDn, String newDn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmoveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new entry Dnorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.moveAndRename(Dn, Dn, boolean)public void moveAndRename(org.apache.directory.api.ldap.model.name.Dn entryDn,
org.apache.directory.api.ldap.model.name.Dn newDn,
boolean deleteOldRdn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmoveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new entry DndeleteOldRdn - Tells if the old Rdn must be removedorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void moveAndRename(String entryDn, String newDn, boolean deleteOldRdn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmoveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new entry DndeleteOldRdn - Tells if the old Rdn must be removedorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.message.ModifyDnResponse modifyDn(org.apache.directory.api.ldap.model.message.ModifyDnRequest modDnRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionmodifyDn in interface LdapConnectionmodDnRequest - the request objectorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void delete(String dn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectiondelete in interface LdapConnectiondn - the target entry's distinguished name, it must be a valid Dnorg.apache.directory.api.ldap.model.exception.LdapException - If the Dn is not valid or if the deletion failedpublic void delete(org.apache.directory.api.ldap.model.name.Dn dn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectiondelete in interface LdapConnectiondn - the target entry's distinguished nameorg.apache.directory.api.ldap.model.exception.LdapException - If the Dn is not valid or if the deletion failedpublic org.apache.directory.api.ldap.model.message.DeleteResponse delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectiondelete in interface LdapConnectiondeleteRequest - the delete operation's requestorg.apache.directory.api.ldap.model.exception.LdapException - If the Dn is not valid or if the deletion failedpublic boolean compare(String dn, String attributeName, String value) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectiondn - the target entry's distinguished name, it must be a valid DnattributeName - the attribute's namevalue - a String value with which the target entry's attribute value to be compared withtrue if the value matches, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic boolean compare(String dn, String attributeName, byte[] value) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectiondn - the target entry's distinguished name, it must be a valid DnattributeName - the attribute's namevalue - a byte[] value with which the target entry's attribute value to be compared withtrue if the value matches, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic boolean compare(String dn, String attributeName, org.apache.directory.api.ldap.model.entry.Value<?> value) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectiondn - the target entry's distinguished name, it must be a valid DnattributeName - the attribute's namevalue - a Value> value with which the target entry's attribute value to be compared withtrue if the value matches, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic boolean compare(org.apache.directory.api.ldap.model.name.Dn dn,
String attributeName,
String value)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectiondn - the target entry's distinguished nameattributeName - the attribute's namevalue - a String value with which the target entry's attribute value to be compared withtrue if the value matches, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic boolean compare(org.apache.directory.api.ldap.model.name.Dn dn,
String attributeName,
byte[] value)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectiondn - the target entry's distinguished nameattributeName - the attribute's namevalue - a byte[] value with which the target entry's attribute value to be compared withtrue if the value matches, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic boolean compare(org.apache.directory.api.ldap.model.name.Dn dn,
String attributeName,
org.apache.directory.api.ldap.model.entry.Value<?> value)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectiondn - the target entry's distinguished nameattributeName - the attribute's namevalue - a Value> value with which the target entry's attribute value to be compared withtrue if the value matches, false otherwiseorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.message.CompareResponse compare(org.apache.directory.api.ldap.model.message.CompareRequest compareRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectioncompare in interface LdapConnectioncompareRequest - the compare request which contains the target Dn, attribute name and valueorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.message.ExtendedResponse extended(String oid) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionextended in interface LdapConnectionoid - the object identifier of the extended operationorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.extended(org.apache.directory.api.asn1.util.Oid, byte[])public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(String oid, byte[] value) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionextended in interface LdapConnectionoid - the object identifier of the extended operationvalue - value to be used by the extended operation, can be a null valueorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.extended(org.apache.directory.api.asn1.util.Oid, byte[])public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(org.apache.directory.api.asn1.util.Oid oid)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionextended in interface LdapConnectionoid - the object identifier of the extended operationorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredLdapConnection.extended(org.apache.directory.api.asn1.util.Oid, byte[])public org.apache.directory.api.ldap.model.message.ExtendedResponse extended(org.apache.directory.api.asn1.util.Oid oid,
byte[] value)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionextended in interface LdapConnectionoid - the object identifier of the extended operationvalue - value to be used by the extended operation, can be a null valueorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.message.ExtendedResponse extended(org.apache.directory.api.ldap.model.message.ExtendedRequest extendedRequest)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionextended in interface LdapConnectionextendedRequest - the extended operation's requestorg.apache.directory.api.ldap.model.exception.LdapException - if the extended operation failedpublic boolean exists(String dn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionexists in interface LdapConnectiondn - The distinguished name of the entry we want to check the existence, must be a valid Dntrue if the entry exists, false otherwise.
Note that if the entry exists but if the user does not have the permission to
read it, false will also be returnedorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic boolean exists(org.apache.directory.api.ldap.model.name.Dn dn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionexists in interface LdapConnectiondn - The distinguished name of the entry we want to check the existencetrue if the entry exists, false otherwise.
Note that if the entry exists but if the user does not have the permission to
read it, false will also be returnedorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic org.apache.directory.api.ldap.model.entry.Entry getRootDse()
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectiongetRootDse in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - If the rootDSE can't be readpublic org.apache.directory.api.ldap.model.entry.Entry getRootDse(String... attributes) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectiongetRootDse in interface LdapConnectionattributes - The list of attributes to returnorg.apache.directory.api.ldap.model.exception.LdapException - If the rootDSE can't be readpublic org.apache.directory.api.ldap.model.entry.Entry lookup(org.apache.directory.api.ldap.model.name.Dn dn)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionlookup in interface LdapConnectiondn - the Dn of the entry to be fetchedorg.apache.directory.api.ldap.model.exception.LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(org.apache.directory.api.ldap.model.name.Dn, String...)public org.apache.directory.api.ldap.model.entry.Entry lookup(String dn) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionlookup in interface LdapConnectiondn - the Dn of the entry to be fetchedorg.apache.directory.api.ldap.model.exception.LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(String, String...)public org.apache.directory.api.ldap.model.entry.Entry lookup(org.apache.directory.api.ldap.model.name.Dn dn,
String... attributes)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionlookup in interface LdapConnectiondn - the Dn of the entry to be fetchedattributes - the attributes to be returned along with entryorg.apache.directory.api.ldap.model.exception.LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralpublic org.apache.directory.api.ldap.model.entry.Entry lookup(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.message.Control[] controls,
String... attributes)
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionlookup in interface LdapConnectiondn - the Dn of the entry to be fetchedcontrols - the controls to useattributes - the attributes to be returned along with entryorg.apache.directory.api.ldap.model.exception.LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralpublic org.apache.directory.api.ldap.model.entry.Entry lookup(String dn, String... attributes) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionlookup in interface LdapConnectiondn - the Dn of the entry to be fetchedattributes - the attributes to be returned along with entryorg.apache.directory.api.ldap.model.exception.LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(org.apache.directory.api.ldap.model.name.Dn, String...)public org.apache.directory.api.ldap.model.entry.Entry lookup(String dn, org.apache.directory.api.ldap.model.message.Control[] controls, String... attributes) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionlookup in interface LdapConnectiondn - the Dn of the entry to be fetchedcontrols - the controls to useattributes - the attributes to be returned along with entryorg.apache.directory.api.ldap.model.exception.LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(org.apache.directory.api.ldap.model.name.Dn, String...)public boolean isControlSupported(String controlOID) throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionisControlSupported in interface LdapConnectioncontrolOID - the OID of the controlorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic List<String> getSupportedControls() throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectiongetSupportedControls in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - if some error occurredpublic void loadSchema()
throws org.apache.directory.api.ldap.model.exception.LdapException
LdapConnectionloadSchema in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - in case of problems while loading the schemapublic org.apache.directory.api.ldap.model.schema.SchemaManager getSchemaManager()
getSchemaManager in interface LdapConnectionpublic org.apache.directory.api.ldap.codec.api.LdapApiService getCodecService()
LdapConnectiongetCodecService in interface LdapConnectionpublic boolean doesFutureExistFor(int messageId)
LdapConnectiondoesFutureExistFor in interface LdapConnectionmessageId - ID of the requestpublic org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector getBinaryAttributeDetector()
getBinaryAttributeDetector in interface LdapConnectionpublic void setBinaryAttributeDetector(org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector binaryAttributeDetecter)
LdapConnectionsetBinaryAttributeDetector in interface LdapConnectionpublic void setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
LdapConnectionsetSchemaManager in interface LdapConnectionpublic void loadSchemaRelaxed()
throws org.apache.directory.api.ldap.model.exception.LdapException
loadSchemaRelaxed in interface LdapConnectionorg.apache.directory.api.ldap.model.exception.LdapException - in case of problems while loading the schemaCopyright © 2009–2016 The Apache Software Foundation. All rights reserved.