public class ModifyDnRequestDecorator extends SingleReplyRequestDecorator<ModifyDnRequest> implements ModifyDnRequest
messageLength| Constructor and Description |
|---|
ModifyDnRequestDecorator(LdapApiService codec,
ModifyDnRequest decoratedMessage)
Makes a ModifyDnRequest encodable.
|
| Modifier and Type | Method and Description |
|---|---|
ModifyDnRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
ModifyDnRequest |
addControl(Control control)
Adds a control to this Message.
|
int |
computeLength()
Compute the ModifyDNRequest length
ModifyDNRequest :
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ModifyDNRequest message to a PDU.
|
boolean |
getDeleteOldRdn()
Gets the flag which determines if the old Rdn attribute is to be removed
from the entry when the new Rdn is used in its stead.
|
Dn |
getName()
Gets the entry's distinguished name representing the entry PDU
field.
|
Rdn |
getNewRdn()
Gets the new relative distinguished name for the entry which represents
the PDU's newrdn field.
|
Dn |
getNewSuperior()
Gets the optional distinguished name of the new superior entry where the
candidate entry is to be moved.
|
boolean |
isMove()
Gets whether or not this request is a Dn change resulting in a move
operation.
|
ModifyDnRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
ModifyDnRequest |
setDeleteOldRdn(boolean deleteOldRdn)
Sets the flag which determines if the old Rdn attribute is to be removed
from the entry when the new Rdn is used in its stead.
|
ModifyDnRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
ModifyDnRequest |
setName(Dn name)
Sets the entry's distinguished name representing the entry PDU
field.
|
ModifyDnRequest |
setNewRdn(Rdn newRdn)
Sets the new relative distinguished name for the entry which represents
the PDU's newrdn field.
|
ModifyDnRequest |
setNewSuperior(Dn newSuperior)
Sets the optional distinguished name of the new superior entry where the
candidate entry is to be moved.
|
abandon, addAbandonListener, getResponseType, isAbandonedgetResultResponse, hasResponseget, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResponseTypegetResultResponsehasResponseget, getControl, getControls, getMessageId, getType, hasControl, putabandon, addAbandonListener, isAbandonedpublic ModifyDnRequestDecorator(LdapApiService codec, ModifyDnRequest decoratedMessage)
decoratedMessage - the decorated ModifyDnRequestpublic Dn getName()
getName in interface ModifyDnRequestpublic ModifyDnRequest setName(Dn name)
setName in interface ModifyDnRequestname - the distinguished name of the entry.public Rdn getNewRdn()
getNewRdn in interface ModifyDnRequestpublic ModifyDnRequest setNewRdn(Rdn newRdn)
setNewRdn in interface ModifyDnRequestnewRdn - the relative dn with one componentpublic boolean getDeleteOldRdn()
getDeleteOldRdn in interface ModifyDnRequestpublic ModifyDnRequest setDeleteOldRdn(boolean deleteOldRdn)
setDeleteOldRdn in interface ModifyDnRequestdeleteOldRdn - true if the old rdn is to be deleted, false if it is notpublic Dn getNewSuperior()
getNewSuperior in interface ModifyDnRequestpublic ModifyDnRequest setNewSuperior(Dn newSuperior)
isMove method.setNewSuperior in interface ModifyDnRequestnewSuperior - the dn of the superior entry the candidate entry for Dn
modification is moved under.public boolean isMove()
isMove in interface ModifyDnRequestpublic ModifyDnRequest setMessageId(int messageId)
setMessageId in interface MessagesetMessageId in interface ModifyDnRequestsetMessageId in class MessageDecorator<ModifyDnRequest>messageId - The message Idpublic ModifyDnRequest addControl(Control control)
addControl in interface MessageaddControl in interface ModifyDnRequestaddControl in class MessageDecorator<ModifyDnRequest>control - the control to add.public ModifyDnRequest addAllControls(Control[] controls)
addAllControls in interface MessageaddAllControls in interface ModifyDnRequestaddAllControls in class MessageDecorator<ModifyDnRequest>controls - the controls to add.public ModifyDnRequest removeControl(Control control)
removeControl in interface MessageremoveControl in interface ModifyDnRequestremoveControl in class MessageDecorator<ModifyDnRequest>control - the control to remove.public int computeLength()
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
computeLength in interface Asn1ObjectcomputeLength in interface Decorator<ModifyDnRequest>public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
0x6C LL 0x04 LL entry 0x04 LL newRDN 0x01 0x01 deleteOldRDN [0x80 LL newSuperior]
encode in interface Asn1Objectencode in interface Decorator<ModifyDnRequest>buffer - The buffer where to put the PDUEncoderException - if the buffer can't be encodedCopyright © 2021. All rights reserved.