Record Class ModifyDnRequest
java.lang.Object
java.lang.Record
org.forgerock.opendj.ldap.messages.ModifyDnRequest
- Record Components:
name
- the distinguished name of the entry to be renamed. This entry may or may not have subordinate entries. The server shall not dereference any aliases in locating the entry to be renamed.newRdn
- the new RDN of the entry to be renamed. The value of the old RDN is supplied when moving the entry to a new superior without changing its RDN. Attribute values of the new RDN not matching any attribute value of the entry are added to the entry, and an appropriate error is returned if this fails.newSuperior
- the distinguished name of the new superior entry, ornull
if the entry is to remain under the same parent entry. It is the distinguished name of an existing entry that will become the immediate superior (parent) of the entry to be renamed. The server shall not dereference any aliases in locating the new superior entry. The default value isnull
, indicating that the entry is to remain under the same parent entry.deleteOldRdn
-true
if the old RDN attribute values are to be deleted from the entry, orfalse
if they are to be retained.controls
- theList
containing the controls.
- All Implemented Interfaces:
ProtocolOp
,Request
,ChangeRecord
public record ModifyDnRequest(Dn name, Rdn newRdn, Dn newSuperior, boolean deleteOldRdn, List<Control> controls)
extends Record
implements ChangeRecord
The Modify DN operation allows a client to change the Relative Distinguished
Name (RDN) of an entry in the Directory and/or to move a subtree of entries
to a new location in the Directory.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.forgerock.opendj.ldap.messages.Request
Request.RequestType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R,
P, E extends Exception>
Raccept
(RequestVisitor<R, P, E> v, P p) Applies aRequestVisitor
to thisRequest
.controls()
Returns the value of thecontrols
record component.boolean
Returns the value of thedeleteOldRdn
record component.final boolean
Indicates whether some other object is "equal to" this one.getType()
Returns the type of this request to avoid expensiveinstanceof
checks.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.newRdn()
Returns the value of thenewRdn
record component.Returns the value of thenewSuperior
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.forgerock.opendj.ldap.messages.ProtocolOp
addControl, addControls, containsControl, getControl, getControl, removeControls
-
Constructor Details
-
Method Details
-
accept
Description copied from interface:Request
Applies aRequestVisitor
to thisRequest
.- Specified by:
accept
in interfaceRequest
- Type Parameters:
R
- The return type of the visitor's methods.P
- The type of the additional parameters to the visitor's methods.E
- The type of the exception thrown by the visitor method if it fails, orNeverThrowsException
if the visitor cannot fail.- Parameters:
v
- The request visitor.p
- Optional additional visitor parameter.- Returns:
- A result as specified by the visitor.
- Throws:
E
- If the visitor failed.
-
getType
Description copied from interface:Request
Returns the type of this request to avoid expensiveinstanceof
checks. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Specified by:
name
in interfaceChangeRecord
- Returns:
- the value of the
name
record component
-
newRdn
Returns the value of thenewRdn
record component.- Returns:
- the value of the
newRdn
record component
-
newSuperior
Returns the value of thenewSuperior
record component.- Returns:
- the value of the
newSuperior
record component
-
deleteOldRdn
public boolean deleteOldRdn()Returns the value of thedeleteOldRdn
record component.- Returns:
- the value of the
deleteOldRdn
record component
-
controls
Returns the value of thecontrols
record component.- Specified by:
controls
in interfaceProtocolOp
- Returns:
- the value of the
controls
record component
-