public interface LDAPAddRequest extends LDAPRequest
Note that LDAPAddRequest objects should not be considered thread-safe, thus should not be used concurrently by multiple threads. Each thread wishing to process a request should have its own instance of that request.
LDAPProvider
Modifier and Type | Method and Description |
---|---|
LDAPAddRequest |
addAttribute(LDAPAttribute attribute)
Adds the specified attribute to this add request.
|
LDAPAddRequest |
addAttribute(String attrName,
byte[]... values)
Adds the attribute with given name and set of values to this add request.
|
LDAPAddRequest |
addAttribute(String attrName,
String... values)
Adds the attribute with given name and set of values to this add request.
|
Iterator<LDAPAttribute> |
attributesIterator()
Returns an iterator over the set of attributes from this add request.
|
LDAPAddRequest |
clone()
Creates and returns a copy of this add request that may be modified without
impacting this request.
|
LDAPAttribute |
getAttribute(String attrName)
Returns the specified attribute from this add request.
|
String |
getDN()
Returns the distinguished name for this add request.
|
boolean |
hasAttribute(LDAPAttribute attribute)
Reports whether this add request contains the specified attribute.
|
boolean |
hasAttribute(String attrName)
Reports whether this add request contains the specified attribute.
|
boolean |
hasAttributeValue(String attrName,
byte[] value)
Reports whether this add request contains an attribute with the given name and value.
|
boolean |
hasAttributeValue(String attrName,
String value)
Reports whether this add request contains an attribute with the given name and value.
|
boolean |
removeAttribute(String attrName)
Removes the attribute with the specified name from this add request.
|
boolean |
removeAttributeValue(String attrName,
byte[] value)
Removes the specified attribute value from this add request.
|
boolean |
removeAttributeValue(String attrName,
String value)
Removes the specified attribute value from this add request.
|
LDAPAddRequest |
replaceAttribute(LDAPAttribute attribute)
Replaces the specified attribute in this add request.
|
LDAPAddRequest |
replaceAttribute(String attrName,
byte[]... values)
Replaces the specified attribute in this add request.
|
LDAPAddRequest |
replaceAttribute(String attrName,
String... values)
Replaces the specified attribute in this add request.
|
LDAPAddRequest |
setAttributes(LDAPAttribute... attributes)
Replaces the existing set of attributes for this add request with the provided attributes.
|
LDAPAddRequest |
setDN(String dn)
Sets the distinguished name for this add request.
|
LDAPAddRequest |
setQueryTimeout(long timeout)
Sets the maximum time, in milliseconds, to wait for a response from the server when
processing this add request.
|
getQueryTimeout
LDAPAddRequest clone()
clone
in interface LDAPRequest
String getDN()
LDAPAddRequest setDN(String dn)
dn
- the distinguished name for this add request. It must not be null.LDAPAddRequest addAttribute(LDAPAttribute attribute)
attribute
- the attribute to add. It must not be null.LDAPAddRequest addAttribute(String attrName, String... values)
attrName
- the name of the attribute to add. It must not be null.values
- the set of values for the attribute to add. It must not be null.LDAPAddRequest addAttribute(String attrName, byte[]... values)
attrName
- the name of the attribute to add. It must not be null.values
- the set of values for the attribute to add. It must not be null.Iterator<LDAPAttribute> attributesIterator()
LDAPAttribute getAttribute(String attrName)
attrName
- the name of the attribute to return. It must not be null.boolean hasAttribute(LDAPAttribute attribute)
attribute
- the attribute for which to make the check. It must not be null.boolean hasAttribute(String attrName)
attrName
- the name of the attribute for which to make the check. It must not be null.boolean hasAttributeValue(String attrName, byte[] value)
attrName
- the name of the attribute for which to make the check. It must not be null.value
- the value for which to make the check. It must not be null.boolean hasAttributeValue(String attrName, String value)
attrName
- the name of the attribute for which to make the check. It must not be null.value
- the value for which to make the check. It must not be null.boolean removeAttribute(String attrName)
attrName
- the name of the attribute to remove. It must not be null.boolean removeAttributeValue(String attrName, byte[] value)
attrName
- the name of the attribute to remove. It must not be null.value
- the value of the attribute to remove. It must not be null.boolean removeAttributeValue(String attrName, String value)
attrName
- the name of the attribute to remove. It must not be null.value
- the value of the attribute to remove. It must not be null.LDAPAddRequest replaceAttribute(LDAPAttribute attribute)
attribute
- the attribute to be replaced in this add request. It must not be null.LDAPAddRequest replaceAttribute(String attrName, byte[]... values)
attrName
- the name of the attribute to be replaced. It must not be null.values
- the new set of values for the attribute. It must not be null.LDAPAddRequest replaceAttribute(String attrName, String... values)
attrName
- the name of the attribute to be replaced. It must not be null.values
- the new set of values for the attribute. It must not be null.LDAPAddRequest setAttributes(LDAPAttribute... attributes)
attributes
- the set of attributes for this add request. It must not be null.LDAPAddRequest setQueryTimeout(long timeout)
A value of zero indicates that no timeout should be enforced.
A value that is less than zero indicates that the default query timeout for the underlying connection should be used.
setQueryTimeout
in interface LDAPRequest
timeout
- the maximum time, in milliseconds, to wait for a response from the
server when processing this add request.