public class ModifyDNRequestCodec extends LdapMessageCodec
ldapMessageLength
parent
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, toString
addLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
public ModifyDNRequestCodec()
public MessageTypeEnum getMessageType()
getMessageType
in class LdapMessageCodec
public String getMessageTypeName()
getMessageTypeName
in class LdapMessageCodec
public 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 LdapMessageCodec
protected void encodeProtocolOp(ByteBuffer buffer) throws EncoderException
0x6C LL 0x04 LL entry 0x04 LL newRDN 0x01 0x01 deleteOldRDN [0x80 LL newSuperior]
encodeProtocolOp
in class LdapMessageCodec
buffer
- The buffer where to put the PDUEncoderException
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.