@Mutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class InMemoryRequestHandler extends LDAPListenerRequestHandler
Constructor and Description |
---|
InMemoryRequestHandler(InMemoryDirectoryServerConfig config)
Creates a new instance of this request handler with an initially-empty
data set.
|
Modifier and Type | Method and Description |
---|---|
LDAPResult |
add(AddRequest addRequest)
Processes the provided add request.
|
void |
addEntries(java.util.List<? extends Entry> entries)
Attempts to add all of the provided entries to the server.
|
void |
addEntry(Entry entry,
boolean ignoreNoUserModification)
Attempts to add the provided entry to the in-memory data set.
|
int |
applyChangesFromLDIF(LDIFReader ldifReader)
Reads entries from the provided LDIF reader and adds them to the server,
optionally clearing any existing entries before beginning to add the new
entries.
|
void |
assertAttributeExists(java.lang.String dn,
java.util.Collection<java.lang.String> attributeNames)
Ensures that the specified entry exists in the directory with all of the
specified attributes.
|
void |
assertAttributeMissing(java.lang.String dn,
java.util.Collection<java.lang.String> attributeNames)
Ensures that the specified entry exists in the directory but does not
contain any of the specified attributes.
|
void |
assertEntriesExist(java.util.Collection<java.lang.String> dns)
Ensures that all of the entries with the provided DNs exist in the
directory.
|
void |
assertEntryExists(Entry entry)
Ensures that an entry exists in the directory with the same DN and all
attribute values contained in the provided entry.
|
void |
assertEntryExists(java.lang.String dn)
Ensures that an entry with the provided DN exists in the directory.
|
void |
assertEntryExists(java.lang.String dn,
java.lang.String filter)
Ensures that an entry with the provided DN exists in the directory.
|
void |
assertEntryMissing(java.lang.String dn)
Ensures that the specified entry does not exist in the directory.
|
void |
assertValueExists(java.lang.String dn,
java.lang.String attributeName,
java.util.Collection<java.lang.String> attributeValues)
Ensures that the specified entry exists in the directory with all of the
specified values for the given attribute.
|
void |
assertValueMissing(java.lang.String dn,
java.lang.String attributeName,
java.util.Collection<java.lang.String> attributeValues)
Ensures that the specified entry exists in the directory but does not
contain any of the specified attribute values.
|
void |
clear()
Removes all entries currently held in the server.
|
int |
countEntries(boolean includeChangeLog)
Retrieves the number of entries currently held in the server.
|
int |
countEntriesBelow(java.lang.String baseDN)
Retrieves the number of entries currently held in the server whose DN
matches or is subordinate to the provided base DN.
|
InMemoryDirectoryServerSnapshot |
createSnapshot()
Creates a point-in-time snapshot of the information contained in this
in-memory request handler.
|
LDAPResult |
delete(DeleteRequest deleteRequest)
Processes the provided delete request.
|
int |
deleteSubtree(java.lang.String baseDN)
Removes the entry with the specified DN and any subordinate entries it may
have.
|
boolean |
entryExists(Entry entry)
Indicates whether the specified entry exists in the server.
|
boolean |
entryExists(java.lang.String dn)
Indicates whether the specified entry exists in the server.
|
boolean |
entryExists(java.lang.String dn,
java.lang.String filter)
Indicates whether the specified entry exists in the server and matches the
given filter.
|
int |
exportToLDIF(LDIFWriter ldifWriter,
boolean excludeGeneratedAttrs,
boolean excludeChangeLog,
boolean closeWriter)
Writes all entries contained in the server to LDIF using the provided
writer.
|
java.util.Map<DN,byte[]> |
getAdditionalBindCredentials()
Retrieves an unmodifiable map containing the defined set of additional bind
credentials, mapped from bind DN to password bytes.
|
byte[] |
getAdditionalBindCredentials(DN dn)
Retrieves the password for the given DN from the set of additional bind
credentials.
|
java.util.List<InMemoryPasswordEncoder> |
getAllPasswordEncoders()
Retrieves a list of all password encoders configured for the server.
|
DN |
getAuthenticatedDN()
Retrieves the DN of the user currently authenticated on the connection
associated with this request handler instance.
|
java.util.List<DN> |
getBaseDNs()
Retrieves a list of the base DNs configured for use by the server.
|
LDAPListenerClientConnection |
getClientConnection()
Retrieves the client connection associated with this request handler
instance.
|
java.util.Map<java.lang.String,java.lang.Object> |
getConnectionState()
Retrieves a map that may be used to hold state information specific to the
connection associated with this request handler instance.
|
DN |
getDNForAuthzID(java.lang.String authzID)
Attempts to identify the DN of the user referenced by the provided
authorization ID string.
|
ReadOnlyEntry |
getEntry(DN dn)
Retrieves a read-only representation the entry with the specified DN, if
it exists.
|
ReadOnlyEntry |
getEntry(java.lang.String dn)
Retrieves a read-only representation the entry with the specified DN, if
it exists.
|
java.util.List<java.lang.String> |
getMissingAttributeNames(java.lang.String dn,
java.util.Collection<java.lang.String> attributeNames)
Retrieves a list containing all of the named attributes which do not exist
in the target entry.
|
java.util.List<java.lang.String> |
getMissingAttributeValues(java.lang.String dn,
java.lang.String attributeName,
java.util.Collection<java.lang.String> attributeValues)
Retrieves a list of all provided attribute values which are missing from
the specified entry.
|
java.util.List<java.lang.String> |
getMissingEntryDNs(java.util.Collection<java.lang.String> dns)
Retrieves a list containing the DNs of the entries which are missing from
the directory server.
|
java.util.List<java.lang.String> |
getPasswordAttributes()
Retrieves the configured list of password attributes.
|
java.util.List<InMemoryDirectoryServerPassword> |
getPasswordsInEntry(Entry entry,
ASN1OctetString clearPasswordToMatch)
Retrieves a list of the passwords contained in the provided entry.
|
InMemoryPasswordEncoder |
getPrimaryPasswordEncoder()
Retrieves the primary password encoder that has been configured for the
server.
|
long |
getProcessingDelayMillis()
Retrieves the delay in milliseconds that the server should impose before
beginning processing for operations.
|
Schema |
getSchema()
Retrieves the schema that will be used by the server, if any.
|
int |
importFromLDIF(boolean clear,
LDIFReader ldifReader)
Reads entries from the provided LDIF reader and adds them to the server,
optionally clearing any existing entries before beginning to add the new
entries.
|
LDAPResult |
modify(ModifyRequest modifyRequest)
Processes the provided modify request.
|
LDAPResult |
modifyDN(ModifyDNRequest modifyDNRequest)
Processes the provided modify DN request.
|
void |
modifyEntry(java.lang.String dn,
java.util.List<Modification> mods)
Attempts to apply the provided set of modifications to the specified entry.
|
InMemoryRequestHandler |
newInstance(LDAPListenerClientConnection connection)
Creates a new instance of this request handler that will be used to process
requests read by the provided connection.
|
LDAPMessage |
processAddRequest(int messageID,
AddRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to add an entry to the in-memory data set.
|
LDAPMessage |
processBindRequest(int messageID,
BindRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided bind request.
|
LDAPMessage |
processCompareRequest(int messageID,
CompareRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided compare request.
|
LDAPMessage |
processDeleteRequest(int messageID,
DeleteRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided delete request.
|
LDAPMessage |
processExtendedRequest(int messageID,
ExtendedRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided extended request, if an extended operation
handler is defined for the given request OID.
|
LDAPMessage |
processModifyDNRequest(int messageID,
ModifyDNRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided modify DN request.
|
LDAPMessage |
processModifyRequest(int messageID,
ModifyRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided modify request.
|
LDAPMessage |
processSearchRequest(int messageID,
SearchRequestProtocolOp request,
java.util.List<Control> controls)
Attempts to process the provided search request.
|
void |
restoreSnapshot(InMemoryDirectoryServerSnapshot snapshot)
Updates the content of this in-memory request handler to match what it was
at the time the snapshot was created.
|
java.util.List<ReadOnlyEntry> |
search(java.lang.String baseDN,
SearchScope scope,
Filter filter)
Retrieves a list of all entries in the server which match the given
search criteria.
|
void |
setAuthenticatedDN(DN authenticatedDN)
Sets the DN of the user currently authenticated on the connection
associated with this request handler instance.
|
void |
setProcessingDelayMillis(long processingDelayMillis)
Specifies the delay in milliseconds that the server should impose before
beginning processing for operations.
|
closeInstance, processAbandonRequest, processUnbindRequest
public InMemoryRequestHandler(@NotNull InMemoryDirectoryServerConfig config) throws LDAPException
config
- The configuration that should be used for the in-memory
directory server.LDAPException
- If there is a problem with the provided
configuration.@NotNull public InMemoryRequestHandler newInstance(@NotNull LDAPListenerClientConnection connection) throws LDAPException
newInstance
in class LDAPListenerRequestHandler
connection
- The connection with which this request handler instance
will be associated.LDAPException
- If the connection should not be accepted.@NotNull public InMemoryDirectoryServerSnapshot createSnapshot()
restoreSnapshot(com.unboundid.ldap.listener.InMemoryDirectoryServerSnapshot)
method.public void restoreSnapshot(@NotNull InMemoryDirectoryServerSnapshot snapshot)
snapshot
- The snapshot to be restored. It must not be
null
.@Nullable public Schema getSchema()
null
if
none has been configured.@NotNull public java.util.List<DN> getBaseDNs()
@Nullable public LDAPListenerClientConnection getClientConnection()
null
if this instance is not associated with
any client connection.@NotNull public DN getAuthenticatedDN()
DN#NULL_DN
if the connection is unauthenticated or is
authenticated as the anonymous user.public void setAuthenticatedDN(@Nullable DN authenticatedDN)
authenticatedDN
- The DN of the user currently authenticated on the
connection associated with this request handler.
It may be null
or DN.NULL_DN
to
indicate that the connection is unauthenticated.@NotNull public java.util.Map<DN,byte[]> getAdditionalBindCredentials()
@Nullable public byte[] getAdditionalBindCredentials(@NotNull DN dn)
dn
- The DN for which to retrieve the corresponding password.null
if the
additional bind credentials does not include information for the
provided DN.@NotNull public java.util.Map<java.lang.String,java.lang.Object> getConnectionState()
public long getProcessingDelayMillis()
public void setProcessingDelayMillis(long processingDelayMillis)
processingDelayMillis
- The delay in milliseconds that the server
should impose before beginning processing
for operations. A value less than or equal
to zero may be used to indicate that there
should be no delay.@NotNull public LDAPResult add(@NotNull AddRequest addRequest) throws LDAPException
addRequest
- The add request to be processed. It must not be
null
.LDAPException
- If the server rejects the add request, or if a
problem is encountered while sending the request or
reading the response.@NotNull public LDAPMessage processAddRequest(int messageID, @NotNull AddRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processAddRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the add
request.request
- The add request that was included in the LDAP message
that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be an
AddResponseProtocolOp
.@NotNull public LDAPMessage processBindRequest(int messageID, @NotNull BindRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processBindRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the bind
request.request
- The bind request that was included in the LDAP message
that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be a
BindResponseProtocolOp
.@NotNull public LDAPMessage processCompareRequest(int messageID, @NotNull CompareRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processCompareRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the
compare request.request
- The compare request that was included in the LDAP
message that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be a
CompareResponseProtocolOp
.@NotNull public LDAPResult delete(@NotNull DeleteRequest deleteRequest) throws LDAPException
deleteRequest
- The delete request to be processed. It must not be
null
.LDAPException
- If the server rejects the delete request, or if a
problem is encountered while sending the request or
reading the response.@NotNull public LDAPMessage processDeleteRequest(int messageID, @NotNull DeleteRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processDeleteRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the delete
request.request
- The delete request that was included in the LDAP message
that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be a
DeleteResponseProtocolOp
.@NotNull public LDAPMessage processExtendedRequest(int messageID, @NotNull ExtendedRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processExtendedRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the
extended request.request
- The extended request that was included in the LDAP
message that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be an
ExtendedResponseProtocolOp
.@NotNull public LDAPResult modify(@NotNull ModifyRequest modifyRequest) throws LDAPException
modifyRequest
- The modify request to be processed. It must not be
null
.LDAPException
- If the server rejects the modify request, or if a
problem is encountered while sending the request or
reading the response.@NotNull public LDAPMessage processModifyRequest(int messageID, @NotNull ModifyRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processModifyRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the modify
request.request
- The modify request that was included in the LDAP message
that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be an
ModifyResponseProtocolOp
.@NotNull public LDAPResult modifyDN(@NotNull ModifyDNRequest modifyDNRequest) throws LDAPException
modifyDNRequest
- The modify DN request to be processed. It must
not be null
.LDAPException
- If the server rejects the modify DN request, or if
a problem is encountered while sending the request
or reading the response.@NotNull public LDAPMessage processModifyDNRequest(int messageID, @NotNull ModifyDNRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processModifyDNRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the modify
DN request.request
- The modify DN request that was included in the LDAP
message that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be an
ModifyDNResponseProtocolOp
.@NotNull public LDAPMessage processSearchRequest(int messageID, @NotNull SearchRequestProtocolOp request, @NotNull java.util.List<Control> controls)
processSearchRequest
in class LDAPListenerRequestHandler
messageID
- The message ID of the LDAP message containing the search
request.request
- The search request that was included in the LDAP message
that was received.controls
- The set of controls included in the LDAP message. It
may be empty if there were no controls, but will not be
null
.LDAPMessage
containing the response to send to the
client. The protocol op in the LDAPMessage
must be an
SearchResultDoneProtocolOp
.@NotNull public java.util.List<java.lang.String> getPasswordAttributes()
@Nullable public InMemoryPasswordEncoder getPrimaryPasswordEncoder()
@NotNull public java.util.List<InMemoryPasswordEncoder> getAllPasswordEncoders()
@NotNull public java.util.List<InMemoryDirectoryServerPassword> getPasswordsInEntry(@NotNull Entry entry, @Nullable ASN1OctetString clearPasswordToMatch)
entry
- The entry from which to obtain the list of
passwords. It must not be null
.clearPasswordToMatch
- An optional clear-text password that should
match the values that are returned. If this
is null
, then all passwords contained
in the provided entry will be returned. If
this is non-null
, then only passwords
matching the clear-text password will be
returned.public int countEntries(boolean includeChangeLog)
includeChangeLog
- Indicates whether to include entries that are
part of the changelog in the count.public int countEntriesBelow(@NotNull java.lang.String baseDN) throws LDAPException
baseDN
- The base DN to use for the determination.LDAPException
- If the provided string cannot be parsed as a valid
DN.public void clear()
public int importFromLDIF(boolean clear, @NotNull LDIFReader ldifReader) throws LDAPException
clear
is given with a value of true
).clear
- Indicates whether to remove all existing entries prior
to adding entries read from LDIF.ldifReader
- The LDIF reader to use to obtain the entries to be
imported. It will be closed by this method.LDAPException
- If a problem occurs while reading entries or adding
them to the server.public int exportToLDIF(@NotNull LDIFWriter ldifWriter, boolean excludeGeneratedAttrs, boolean excludeChangeLog, boolean closeWriter) throws LDAPException
ldifWriter
- The LDIF writer to use when writing the
entries. It must not be null
.excludeGeneratedAttrs
- Indicates whether to exclude automatically
generated operational attributes like
entryUUID, entryDN, creatorsName, etc.excludeChangeLog
- Indicates whether to exclude entries
contained in the changelog.closeWriter
- Indicates whether the LDIF writer should be
closed after all entries have been written.LDAPException
- If a problem is encountered while attempting to
write an entry to LDIF.public int applyChangesFromLDIF(@NotNull LDIFReader ldifReader) throws LDAPException
clear
is given with a value of true
).
ldifReader
- The LDIF reader to use to obtain the change records to
be applied.LDAPException
- If a problem occurs while reading change records
or applying them to the server.public void addEntry(@NotNull Entry entry, boolean ignoreNoUserModification) throws LDAPException
entry
- The entry to be added. It must not be
null
.ignoreNoUserModification
- Indicates whether to ignore constraints
normally imposed by the
NO-USER-MODIFICATION element in attribute
type definitions.LDAPException
- If a problem occurs while attempting to add the
provided entry.public void addEntries(@NotNull java.util.List<? extends Entry> entries) throws LDAPException
entries
- The collection of entries to be added.LDAPException
- If a problem was encountered while attempting to
add any of the entries to the server.public int deleteSubtree(@NotNull java.lang.String baseDN) throws LDAPException
baseDN
- The DN of the entry to be deleted. It must not be
null
or represent the null DN.LDAPException
- If the provided base DN is not a valid DN, or is
the DN of an entry that cannot be deleted (e.g.,
the null DN).public void modifyEntry(@NotNull java.lang.String dn, @NotNull java.util.List<Modification> mods) throws LDAPException
dn
- The DN of the entry to be modified.mods
- The set of modifications to be applied to the entry.LDAPException
- If a problem is encountered while attempting to
update the specified entry.@Nullable public ReadOnlyEntry getEntry(@NotNull java.lang.String dn) throws LDAPException
dn
- The DN of the entry to retrieve.null
if no entry exists with the
given DN.LDAPException
- If the provided DN is malformed.@Nullable public ReadOnlyEntry getEntry(@NotNull DN dn)
dn
- The DN of the entry to retrieve.null
if no entry exists with the
given DN.@NotNull public java.util.List<ReadOnlyEntry> search(@NotNull java.lang.String baseDN, @NotNull SearchScope scope, @NotNull Filter filter) throws LDAPException
baseDN
- The base DN to use for the search. It must not be
null
.scope
- The scope to use for the search. It must not be
null
.filter
- The filter to use for the search. It must not be
null
.LDAPException
- If a problem is encountered while performing the
search.@NotNull public DN getDNForAuthzID(@NotNull java.lang.String authzID) throws LDAPException
authzID
- The authorization ID to resolve to a user DN.LDAPException
- If a problem prevents resolving the authorization
ID to a user DN.public boolean entryExists(@NotNull java.lang.String dn) throws LDAPException
dn
- The DN of the entry for which to make the determination.true
if the entry exists, or false
if not.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.public boolean entryExists(@NotNull java.lang.String dn, @NotNull java.lang.String filter) throws LDAPException
dn
- The DN of the entry for which to make the determination.filter
- The filter the entry is expected to match.true
if the entry exists and matches the specified filter,
or false
if not.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.public boolean entryExists(@NotNull Entry entry) throws LDAPException
true
only if the target entry exists and contains all values
for all attributes of the provided entry. The entry will be allowed to
have attribute values not included in the provided entry.entry
- The entry to compare against the directory server.true
if the entry exists in the server and is a superset
of the provided entry, or false
if not.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.public void assertEntryExists(@NotNull java.lang.String dn) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry for which to make the determination.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry does not exist.public void assertEntryExists(@NotNull java.lang.String dn, @NotNull java.lang.String filter) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry for which to make the determination.filter
- A filter that the target entry must match.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry does not exist or does not
match the provided filter.public void assertEntryExists(@NotNull Entry entry) throws LDAPException, java.lang.AssertionError
entry
- The entry expected to be present in the directory server.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry does not exist or does not
match the provided filter.@NotNull public java.util.List<java.lang.String> getMissingEntryDNs(@NotNull java.util.Collection<java.lang.String> dns) throws LDAPException
dns
- The DNs of the entries to try to find in the server.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.public void assertEntriesExist(@NotNull java.util.Collection<java.lang.String> dns) throws LDAPException, java.lang.AssertionError
dns
- The DNs of the entries for which to make the determination.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If any of the target entries does not exist.@Nullable public java.util.List<java.lang.String> getMissingAttributeNames(@NotNull java.lang.String dn, @NotNull java.util.Collection<java.lang.String> attributeNames) throws LDAPException
dn
- The DN of the entry to examine.attributeNames
- The names of the attributes expected to be present
in the target entry.null
if the target
entry does not exist.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.public void assertAttributeExists(@NotNull java.lang.String dn, @NotNull java.util.Collection<java.lang.String> attributeNames) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry to examine.attributeNames
- The names of the attributes that are expected to be
present in the provided entry.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry does not exist or does not
contain all of the specified attributes.@Nullable public java.util.List<java.lang.String> getMissingAttributeValues(@NotNull java.lang.String dn, @NotNull java.lang.String attributeName, @NotNull java.util.Collection<java.lang.String> attributeValues) throws LDAPException
dn
- The DN of the entry to examine.attributeName
- The attribute expected to be present in the target
entry with the given values.attributeValues
- The values expected to be present in the target
entry.null
if the target entry does not exist.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.public void assertValueExists(@NotNull java.lang.String dn, @NotNull java.lang.String attributeName, @NotNull java.util.Collection<java.lang.String> attributeValues) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry to examine.attributeName
- The name of the attribute to examine.attributeValues
- The set of values which must exist for the given
attribute.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry does not exist, does not
contain the specified attribute, or that attribute
does not have all of the specified values.public void assertEntryMissing(@NotNull java.lang.String dn) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry expected to be missing.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry is found in the server.public void assertAttributeMissing(@NotNull java.lang.String dn, @NotNull java.util.Collection<java.lang.String> attributeNames) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry expected to be present.attributeNames
- The names of the attributes expected to be missing
from the entry.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry is missing from the server, or
if it contains any of the target attributes.public void assertValueMissing(@NotNull java.lang.String dn, @NotNull java.lang.String attributeName, @NotNull java.util.Collection<java.lang.String> attributeValues) throws LDAPException, java.lang.AssertionError
dn
- The DN of the entry expected to be present.attributeName
- The name of the attribute to examine.attributeValues
- The values expected to be missing from the target
entry.LDAPException
- If a problem is encountered while trying to
communicate with the directory server.java.lang.AssertionError
- If the target entry is missing from the server, or
if it contains any of the target attribute values.