|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.codec.api.MessageDecorator<M>
org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M,R>
org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<ModifyDnRequest,ModifyDnResponse>
org.apache.directory.api.ldap.codec.decorators.ModifyDnRequestDecorator
public class ModifyDnRequestDecorator
A decorator for the ModifyDnRequest message
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.api.ldap.model.message.ModifyDnRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
ModifyDnRequestDecorator(LdapApiService codec,
ModifyDnRequest decoratedMessage)
Makes a ModifyDnRequest encodable. |
|
| Method Summary | |
|---|---|
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. |
int |
getModifyDnResponseLength()
Stores the encoded length for the ModifyDnRequest |
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 |
void |
setModifyDnRequestLength(int modifyDnRequestLength)
|
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. |
| Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator |
|---|
abandon, addAbandonListener, getResponseType, isAbandoned |
| Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator |
|---|
getResultResponse, hasResponse |
| Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator |
|---|
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest |
|---|
getResponseType |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest |
|---|
getResultResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Request |
|---|
hasResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Message |
|---|
get, getControl, getControls, getMessageId, getType, hasControl, put |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest |
|---|
abandon, addAbandonListener, isAbandoned |
| Constructor Detail |
|---|
public ModifyDnRequestDecorator(LdapApiService codec,
ModifyDnRequest decoratedMessage)
decoratedMessage - the decorated ModifyDnRequest| Method Detail |
|---|
public void setModifyDnRequestLength(int modifyDnRequestLength)
modifyDnRequestLength - The encoded ModifyDnRequest's lengthpublic int getModifyDnResponseLength()
public 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 component
public 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 not
public 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 Id
public ModifyDnRequest addControl(Control control)
throws MessageException
addControl in interface MessageaddControl in interface ModifyDnRequestaddControl in class MessageDecorator<ModifyDnRequest>control - the control to add.
MessageException - if controls cannot be added to this Message or the control is
not known etc.
public ModifyDnRequest addAllControls(Control[] controls)
throws MessageException
addAllControls in interface MessageaddAllControls in interface ModifyDnRequestaddAllControls in class MessageDecorator<ModifyDnRequest>controls - the controls to add.
MessageException - if controls cannot be added to this Message or they are not known etc.
public ModifyDnRequest removeControl(Control control)
throws MessageException
removeControl in interface MessageremoveControl in interface ModifyDnRequestremoveControl in class MessageDecorator<ModifyDnRequest>control - the control to remove.
MessageException - if controls cannot be added to this Message or the control is
not known etc.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 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 Decorator<ModifyDnRequest>buffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||