public interface AddRequest extends Request, ChangeRecord, Entry
The RDN attribute(s) may or may not be included in the Add request.
NO-USER-MODIFICATION attributes such as the createTimestamp or
creatorsName attributes must not be included, since the server
maintains these automatically.
| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(ChangeRecordVisitor<R,P> v,
P p)
Applies a
ChangeRecordVisitor to this ChangeRecord. |
boolean |
addAttribute(Attribute attribute)
Ensures that this entry contains the provided attribute and values
(optional operation).
|
boolean |
addAttribute(Attribute attribute,
Collection<? super ByteString> duplicateValues)
Ensures that this entry contains the provided attribute and values
(optional operation).
|
AddRequest |
addAttribute(String attributeDescription,
Object... values)
Ensures that this entry contains the provided attribute and values
(optional operation).
|
AddRequest |
addControl(Control control)
Adds the provided control to this request.
|
AddRequest |
clearAttributes()
Removes all the attributes from this entry (optional operation).
|
boolean |
containsAttribute(Attribute attribute,
Collection<? super ByteString> missingValues)
Returns
true if this entry contains all of the attribute values
contained in attribute. |
boolean |
containsAttribute(String attributeDescription,
Object... values)
Returns
true if this entry contains all of the attribute values
contained in values. |
Iterable<Attribute> |
getAllAttributes()
Returns an
Iterable containing all of the attributes in this
entry. |
Iterable<Attribute> |
getAllAttributes(AttributeDescription attributeDescription)
Returns an
Iterable containing all the attributes in this entry
having an attribute description which is a sub-type of the provided
attribute description. |
Iterable<Attribute> |
getAllAttributes(String attributeDescription)
Returns an
Iterable containing all the attributes in this entry
having an attribute description which is a sub-type of the provided
attribute description. |
Attribute |
getAttribute(AttributeDescription attributeDescription)
Returns the named attribute contained in this entry, or
null if
it is not included with this entry. |
Attribute |
getAttribute(String attributeDescription)
Returns the named attribute contained in this entry, or
null if
it is not included with this entry. |
int |
getAttributeCount()
Returns the number of attributes in this entry.
|
<C extends Control> |
getControl(ControlDecoder<C> decoder,
DecodeOptions options)
Decodes and returns the first control in this request having an OID
corresponding to the provided control decoder.
|
List<Control> |
getControls()
Returns a
List containing the controls included with this
request. |
DN |
getName()
Returns the distinguished name of the entry being modified by this
ChangeRecord. |
boolean |
removeAttribute(Attribute attribute,
Collection<? super ByteString> missingValues)
Removes all of the attribute values contained in
attribute from
this entry if it is present (optional operation). |
boolean |
removeAttribute(AttributeDescription attributeDescription)
Removes the named attribute from this entry if it is present (optional
operation).
|
AddRequest |
removeAttribute(String attributeDescription,
Object... values)
Removes all of the attribute values contained in
values from the
named attribute in this entry if it is present (optional operation). |
boolean |
replaceAttribute(Attribute attribute)
Adds all of the attribute values contained in
attribute to this
entry, replacing any existing attribute values (optional operation). |
AddRequest |
replaceAttribute(String attributeDescription,
Object... values)
Adds all of the attribute values contained in
values to this
entry, replacing any existing attribute values (optional operation). |
AddRequest |
setName(DN dn)
Sets the distinguished name of this entry (optional operation).
|
AddRequest |
setName(String dn)
Sets the distinguished name of this entry (optional operation).
|
containsControlequals, hashCode, parseAttribute, parseAttribute, toString<R,P> R accept(ChangeRecordVisitor<R,P> v, P p)
ChangeRecordChangeRecordVisitor to this ChangeRecord.accept in interface ChangeRecordR - The return type of the visitor's methods.P - The type of the additional parameters to the visitor's
methods.v - The change record visitor.p - Optional additional visitor parameter.boolean addAttribute(Attribute attribute)
Entrymatching attribute description, then
this entry will be modified such that it contains attribute, even
if it is empty.
matching attribute description, then
the attribute values contained in attribute will be merged with
the existing attribute values.
NOTE: When attribute is non-empty, this method implements
LDAP Modify add semantics.
addAttribute in interface Entryattribute - The attribute values to be added to this entry, merging with
any existing attribute values.true if this entry changed as a result of this call.boolean addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues)
Entrymatching attribute description, then
this entry will be modified such that it contains attribute, even
if it is empty.
matching attribute description, then
the attribute values contained in attribute will be merged with
the existing attribute values.
NOTE: When attribute is non-empty, this method implements
LDAP Modify add semantics.
addAttribute in interface Entryattribute - The attribute values to be added to this entry, merging with
any existing attribute values.duplicateValues - A collection into which duplicate values will be added, or
null if duplicate values should not be saved.true if this entry changed as a result of this call.AddRequest addAttribute(String attributeDescription, Object... values)
Entrymatching attribute description, then
this entry will be modified such that it contains attribute, even
if it is empty.
matching attribute description, then
the attribute values contained in attribute will be merged with
the existing attribute values.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of ByteString will
be converted using the ByteString.valueOf(Object) method.
NOTE: When attribute is non-empty, this method implements
LDAP Modify add semantics.
addAttribute in interface EntryattributeDescription - The name of the attribute whose values are to be added.values - The attribute values to be added to this entry, merging any
existing attribute values.AddRequest addControl(Control control)
RequestaddControl in interface ChangeRecordaddControl in interface Requestcontrol - The control to be added to this request.AddRequest clearAttributes()
EntryclearAttributes in interface Entryboolean containsAttribute(Attribute attribute, Collection<? super ByteString> missingValues)
Entrytrue if this entry contains all of the attribute values
contained in attribute. If attribute is empty then this
method will return true if the attribute is present in this
entry, regardless of how many values it contains.containsAttribute in interface Entryattribute - The attribute values whose presence in this entry is to be
tested.missingValues - A collection into which missing values will be added, or
null if missing values should not be saved.true if this entry contains all of the attribute values
contained in attribute.boolean containsAttribute(String attributeDescription, Object... values)
Entrytrue if this entry contains all of the attribute values
contained in values. If values is null or empty
then this method will return true if the attribute is present in
this entry, regardless of how many values it contains.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of ByteString will
be converted using the ByteString.valueOf(Object) method.
containsAttribute in interface EntryattributeDescription - The name of the attribute whose presence in this entry is to
be tested.values - The attribute values whose presence in this entry is to be
tested, which may be null.true if this entry contains all of the attribute values
contained in values.Iterable<Attribute> getAllAttributes()
EntryIterable containing all of the attributes in this
entry. The returned Iterable may be used to remove attributes if
permitted by this entry.getAllAttributes in interface EntryIterable containing all of the attributes.Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription)
EntryIterable containing all the attributes in this entry
having an attribute description which is a sub-type of the provided
attribute description. The returned Iterable may be used to
remove attributes if permitted by this entry.getAllAttributes in interface EntryattributeDescription - The name of the attributes to be returned.Iterable containing the matching attributes.Iterable<Attribute> getAllAttributes(String attributeDescription)
EntryIterable containing all the attributes in this entry
having an attribute description which is a sub-type of the provided
attribute description. The returned Iterable may be used to
remove attributes if permitted by this entry.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
getAllAttributes in interface EntryattributeDescription - The name of the attributes to be returned.Iterable containing the matching attributes.Attribute getAttribute(AttributeDescription attributeDescription)
Entrynull if
it is not included with this entry.getAttribute in interface EntryattributeDescription - The name of the attribute to be returned.null if it is not included with
this entry.Attribute getAttribute(String attributeDescription)
Entrynull if
it is not included with this entry.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
getAttribute in interface EntryattributeDescription - The name of the attribute to be returned.null if it is not included with
this entry.int getAttributeCount()
EntrygetAttributeCount in interface Entry<C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
RequestgetControl in interface ChangeRecordgetControl in interface RequestC - The type of control to be decoded and returned.decoder - The control decoder.options - The set of decode options which should be used when decoding
the control.null if the control is not
included with this request.DecodeException - If the control could not be decoded because it was malformed
in some way (e.g. the control value was missing, or its
content could not be decoded).List<Control> getControls()
RequestList containing the controls included with this
request. The returned List may be modified if permitted by this
request.getControls in interface ChangeRecordgetControls in interface RequestList containing the controls.DN getName()
ChangeRecordChangeRecord.getName in interface ChangeRecordgetName in interface Entryboolean removeAttribute(Attribute attribute, Collection<? super ByteString> missingValues)
Entryattribute from
this entry if it is present (optional operation). If attribute is
empty then the entire attribute will be removed if it is present.
NOTE: This method implements LDAP Modify delete semantics.
removeAttribute in interface Entryattribute - The attribute values to be removed from this entry, which may
be empty if the entire attribute is to be removed.missingValues - A collection into which missing values will be added, or
null if missing values should not be saved.true if this entry changed as a result of this call.boolean removeAttribute(AttributeDescription attributeDescription)
Entryfalse.removeAttribute in interface EntryattributeDescription - The name of the attribute to be removed.true if this entry changed as a result of this call.AddRequest removeAttribute(String attributeDescription, Object... values)
Entryvalues from the
named attribute in this entry if it is present (optional operation). If
values is null or empty then the entire attribute will be
removed if it is present.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of ByteString will
be converted using the ByteString.valueOf(Object) method.
NOTE: This method implements LDAP Modify delete semantics.
removeAttribute in interface EntryattributeDescription - The name of the attribute whose values are to be removed.values - The attribute values to be removed from this entry, which may
be null or empty if the entire attribute is to be
removed.boolean replaceAttribute(Attribute attribute)
Entryattribute to this
entry, replacing any existing attribute values (optional operation). If
attribute is empty then the entire attribute will be removed if
it is present.
NOTE: This method implements LDAP Modify replace semantics as described in RFC 4511 - Section 4.6. Modify Operation.
replaceAttribute in interface Entryattribute - The attribute values to be added to this entry, replacing any
existing attribute values, and which may be empty if the
entire attribute is to be removed.true if this entry changed as a result of this call.AddRequest replaceAttribute(String attributeDescription, Object... values)
Entryvalues to this
entry, replacing any existing attribute values (optional operation). If
values is null or empty then the entire attribute will be
removed if it is present.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of ByteString will
be converted using the ByteString.valueOf(Object) method.
NOTE: This method implements LDAP Modify replace semantics as described in RFC 4511 - Section 4.6. Modify Operation.
replaceAttribute in interface EntryattributeDescription - The name of the attribute whose values are to be replaced.values - The attribute values to be added to this entry, replacing any
existing attribute values, and which may be null or
empty if the entire attribute is to be removed.AddRequest setName(DN dn)
EntryAddRequest setName(String dn)
EntryThe distinguished name will be decoded using the schema associated with this entry (usually the default schema).
Copyright © 2011-2015 ForgeRock AS. All Rights Reserved.