public class ModifyDNRequestCodec extends LdapMessageCodec
ldapMessageLengthparent| Constructor and Description |
|---|
ModifyDNRequestCodec()
Creates a new ModifyDNRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
computeLengthProtocolOp()
Compute the ModifyDNRequest length
ModifyDNRequest :
|
protected void |
encodeProtocolOp(ByteBuffer buffer)
Encode the ModifyDNRequest message to a PDU.
|
DN |
getEntry()
Get the modification's DN
|
MessageTypeEnum |
getMessageType()
Get the message type
|
String |
getMessageTypeName()
Get the message type Name
|
RDN |
getNewRDN()
Get the new RDN
|
DN |
getNewSuperior()
Get the newSuperior
|
boolean |
isDeleteOldRDN()
Tells if the old RDN is to be deleted
|
void |
setDeleteOldRDN(boolean deleteOldRDN)
Set the flag to delete the old RDN
|
void |
setEntry(DN entry)
Set the modification DN.
|
void |
setNewRDN(RDN newRDN)
Set the new RDN
|
void |
setNewSuperior(DN newSuperior)
Set the new superior
|
String |
toString()
Get a String representation of a ModifyDNRequest
|
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toStringaddLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParentpublic ModifyDNRequestCodec()
public MessageTypeEnum getMessageType()
getMessageType in class LdapMessageCodecpublic String getMessageTypeName()
getMessageTypeName in class LdapMessageCodecpublic DN getEntry()
public void setEntry(DN entry)
entry - The entry to set.public boolean isDeleteOldRDN()
public void setDeleteOldRDN(boolean deleteOldRDN)
deleteOldRDN - The deleteOldRDN to set.public RDN getNewRDN()
public void setNewRDN(RDN newRDN)
newRDN - The newRDN to set.public DN getNewSuperior()
public void setNewSuperior(DN newSuperior)
newSuperior - The newSuperior to set.protected int computeLengthProtocolOp()
0x6C L1 | +--> 0x04 L2 entry +--> 0x04 L3 newRDN +--> 0x01 0x01 (true/false) deleteOldRDN (3 bytes) [+--> 0x80 L4 newSuperior ] L2 = Length(0x04) + Length(Length(entry)) + Length(entry) L3 = Length(0x04) + Length(Length(newRDN)) + Length(newRDN) L4 = Length(0x80) + Length(Length(newSuperior)) + Length(newSuperior) L1 = L2 + L3 + 3 [+ L4] Length(ModifyDNRequest) = Length(0x6C) + Length(L1) + L1
computeLengthProtocolOp in class LdapMessageCodecprotected void encodeProtocolOp(ByteBuffer buffer) throws EncoderException
0x6C LL 0x04 LL entry 0x04 LL newRDN 0x01 0x01 deleteOldRDN [0x80 LL newSuperior]
encodeProtocolOp in class LdapMessageCodecbuffer - The buffer where to put the PDUEncoderExceptionCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.