public interface DeleteRequest extends Request, ChangeRecord
Only leaf entries (those with no subordinate entries) can be deleted with
this operation. However, addition of the SubtreeDeleteControl permits
whole sub-trees to be deleted using a single Delete request.
Connection connection = ...;
String baseDN = ...;
DeleteRequest request =
Requests.newDeleteRequest(baseDN)
.addControl(SubtreeDeleteRequestControl.newControl(true));
connection.delete(request);
| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(ChangeRecordVisitor<R,P> v,
P p)
Applies a
ChangeRecordVisitor to this ChangeRecord. |
DeleteRequest |
addControl(Control control)
Adds the provided control to this request.
|
<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 to be deleted.
|
DeleteRequest |
setName(DN dn)
Sets the distinguished name of the entry to be deleted.
|
DeleteRequest |
setName(String dn)
Sets the distinguished name of the entry to be deleted.
|
containsControl<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.DeleteRequest addControl(Control control)
RequestaddControl in interface ChangeRecordaddControl in interface Requestcontrol - The control to be added to this request.<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()
getName in interface ChangeRecordDeleteRequest setName(DN dn)
dn - The distinguished name of the entry to be deleted.UnsupportedOperationException - If this delete request does not permit the distinguished name
to be set.NullPointerException - If dn was null.DeleteRequest setName(String dn)
dn - The distinguished name of the entry to be deleted.LocalizedIllegalArgumentException - If dn could not be decoded using the default schema.UnsupportedOperationException - If this delete request does not permit the distinguished name
to be set.NullPointerException - If dn was null.Copyright © 2011-2015 ForgeRock AS. All Rights Reserved.