public class ModifyDNMsg extends ModifyCommonMsg
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
ModifyDNMsg(Dn dn,
CSN csn,
String entryUUID,
String newSuperiorEntryUUID,
boolean deleteOldRdn,
String newSuperior,
String newRDN)
Construct a new Modify DN message (no mods).
|
ModifyDNMsg(Dn dn,
CSN csn,
String entryUUID,
String newSuperiorEntryUUID,
boolean deleteOldRdn,
String newSuperior,
String newRDN,
List<Modification> mods)
Construct a new Modify DN message (with mods).
|
ModifyDNMsg(PostOperationModifyDNOperation operation)
Construct a new Modify DN message.
|
Modifier and Type | Method and Description |
---|---|
ModifyDnRequest |
createRequest(Dn newDN)
Create a request from this message using the provided DN.
|
boolean |
deleteOldRdn()
Get the delete old rdn option.
|
byte[] |
getBytesV1()
Get the byte array representation of this message.
|
byte[] |
getBytesV23()
Get the byte array representation of this message.
|
byte[] |
getBytesV4ToLatest(short protocolVersion)
Get the byte array representation of this message.
|
boolean |
getDeleteOldRdn()
Get the delete old rdn option.
|
String |
getNewRDN()
Get the new RDN of this operation.
|
String |
getNewSuperior()
Get the new superior.
|
String |
getNewSuperiorEntryUUID()
Get the new superior id.
|
boolean |
newDNIsEqual(Dn targetDN)
Check if the new dn of this ModifyDNMsg is the same as the targetDN given in parameter.
|
boolean |
newDNIsParent(Dn targetDn)
Check if this MSG will change the DN of the target entry to be the same as the dn given as a parameter.
|
boolean |
newParentIsEqual(Dn targetDN)
Check if the new parent of the modifyDNMsg is the same as the targetDN given in parameter.
|
void |
setDeleteOldRdn(boolean delete)
Set the delete old rdn option.
|
void |
setNewRDN(String newRDN)
Set the new RDN of this operation.
|
void |
setNewSuperior(String string)
Set the new superior.
|
int |
size()
Return the number of bytes used by this message.
|
String |
toString() |
getMods, setMods
createRequest, generateMsg, getBytes, getDN, getEclIncludes, getEntryUUID, setDN, setEclIncludes
compareTo, equals, getBytes, getCSN, getVersion, hashCode
decodeMsg, isRetryable
public ModifyDNMsg(PostOperationModifyDNOperation operation)
operation
- The operation to use for building the messagepublic ModifyDNMsg(Dn dn, CSN csn, String entryUUID, String newSuperiorEntryUUID, boolean deleteOldRdn, String newSuperior, String newRDN)
dn
- The dn to use for building the message.csn
- The CSN to use for building the message.entryUUID
- The unique id to use for building the message.newSuperiorEntryUUID
- The new parent unique id to use for building the message.deleteOldRdn
- boolean indicating if old rdn must be deleted to use for building the message.newSuperior
- The new Superior entry to use for building the message.newRDN
- The new Rdn to use for building the message.public ModifyDNMsg(Dn dn, CSN csn, String entryUUID, String newSuperiorEntryUUID, boolean deleteOldRdn, String newSuperior, String newRDN, List<Modification> mods)
dn
- The dn to use for building the message.csn
- The CSNto use for building the message.entryUUID
- The unique id to use for building the message.newSuperiorEntryUUID
- The new parent unique id to use for building the message.deleteOldRdn
- boolean indicating if old rdn must be deleted to use for building the message.newSuperior
- The new Superior entry to use for building the message.newRDN
- The new Rdn to use for building the message.mods
- The mod of the operation.public ModifyDnRequest createRequest(Dn newDN) throws IOException
LDAPUpdateMsg
createRequest
in class LDAPUpdateMsg
newDN
- the DN to use when creating the request.LdapException
- In case of LDAP decoding exceptionIOException
- In case of ASN1 decoding exceptionpublic byte[] getBytesV1()
LDAPUpdateMsg
This uses the version 1 of the replication protocol (used for compatibility).
getBytesV1
in class LDAPUpdateMsg
public byte[] getBytesV23()
LDAPUpdateMsg
This uses the version 2 of the replication protocol (used for compatibility).
getBytesV23
in class LDAPUpdateMsg
public byte[] getBytesV4ToLatest(short protocolVersion)
LDAPUpdateMsg
This uses the provided version number which must be at least version 4.
getBytesV4ToLatest
in class LDAPUpdateMsg
protocolVersion
- the actual protocol version to encode intopublic void setNewSuperior(String string)
string
- the new superior.public String getNewSuperior()
public String getNewSuperiorEntryUUID()
public boolean deleteOldRdn()
public void setDeleteOldRdn(boolean delete)
delete
- The delete old rdn option.public boolean getDeleteOldRdn()
public String getNewRDN()
public void setNewRDN(String newRDN)
newRDN
- the new RDN of this operation.public boolean newDNIsParent(Dn targetDn)
targetDn
- the DN to use when checking if this MSG will change the DN of the entry to a given DN.public boolean newDNIsEqual(Dn targetDN)
targetDN
- The targetDN to use to check for equality.public boolean newParentIsEqual(Dn targetDN)
targetDN
- the targetDN to use when checking equality.public int size()
UpdateMsg
size
in class LDAPUpdateMsg
Copyright 2010-2022 ForgeRock AS.