public class ModifyDnRequestDecorator extends SingleReplyRequestDecorator<ModifyDnRequest> implements ModifyDnRequest
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, isAbandoned
getResultResponse, hasResponse
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResponseType
getResultResponse
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
abandon, addAbandonListener, isAbandoned
public ModifyDnRequestDecorator(LdapApiService codec, ModifyDnRequest decoratedMessage)
codec
- The LDAP service instancedecoratedMessage
- the decorated ModifyDnRequestpublic Dn getName()
getName
in interface ModifyDnRequest
public ModifyDnRequest setName(Dn name)
setName
in interface ModifyDnRequest
name
- the distinguished name of the entry.public Rdn getNewRdn()
getNewRdn
in interface ModifyDnRequest
public ModifyDnRequest setNewRdn(Rdn newRdn)
setNewRdn
in interface ModifyDnRequest
newRdn
- the relative dn with one componentpublic boolean getDeleteOldRdn()
getDeleteOldRdn
in interface ModifyDnRequest
public ModifyDnRequest setDeleteOldRdn(boolean deleteOldRdn)
setDeleteOldRdn
in interface ModifyDnRequest
deleteOldRdn
- true if the old rdn is to be deleted, false if it is notpublic Dn getNewSuperior()
getNewSuperior
in interface ModifyDnRequest
public ModifyDnRequest setNewSuperior(Dn newSuperior)
isMove
method.setNewSuperior
in interface ModifyDnRequest
newSuperior
- the dn of the superior entry the candidate entry for Dn
modification is moved under.public boolean isMove()
isMove
in interface ModifyDnRequest
public ModifyDnRequest setMessageId(int messageId)
setMessageId
in interface Message
setMessageId
in interface ModifyDnRequest
setMessageId
in class MessageDecorator<ModifyDnRequest>
messageId
- The message Idpublic ModifyDnRequest addControl(Control control)
addControl
in interface Message
addControl
in interface ModifyDnRequest
addControl
in class MessageDecorator<ModifyDnRequest>
control
- the control to add.public ModifyDnRequest addAllControls(Control[] controls)
addAllControls
in interface Message
addAllControls
in interface ModifyDnRequest
addAllControls
in class MessageDecorator<ModifyDnRequest>
controls
- the controls to add.public ModifyDnRequest removeControl(Control control)
removeControl
in interface Message
removeControl
in interface ModifyDnRequest
removeControl
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 Asn1Object
computeLength
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 Asn1Object
encode
in interface Decorator<ModifyDnRequest>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.