Class ModifyDNRequestDsml
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
-
- org.apache.directory.api.dsmlv2.request.AbstractRequestDsml<E>
-
- org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml<ModifyDnRequest,ModifyDnResponse>
-
- org.apache.directory.api.dsmlv2.request.ModifyDNRequestDsml
-
- All Implemented Interfaces:
DsmlDecorator<ModifyDnRequest>,AbandonableRequest,Message,ModifyDnRequest,Request,ResultResponseRequest,SingleReplyRequest
public class ModifyDNRequestDsml extends AbstractResultResponseRequestDsml<ModifyDnRequest,ModifyDnResponse> implements ModifyDnRequest
DSML Decorator for ModifyDNRequest- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description ModifyDNRequestDsml(LdapApiService codec)Creates a new getDecoratedMessage() of ModifyDNRequestDsml.ModifyDNRequestDsml(LdapApiService codec, ModifyDnRequest ldapMessage)Creates a new getDecoratedMessage() of ModifyDNRequestDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifyDnRequestaddAllControls(Control[] controls)Adds an array of controls to this Message.ModifyDnRequestaddControl(Control control)Adds a control to this Message.booleangetDeleteOldRdn()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.DngetName()Get the modification's DnRdngetNewRdn()Gets the new relative distinguished name for the entry which represents the PDU's newrdn field.DngetNewSuperior()Get the newSuperiorMessageTypeEnumgetResponseType()Gets the protocol response message type for this request which produces at least one response.MessageTypeEnumgetType()Gets the LDAP message type code associated with this Message.booleanisDeleteOldRDN()Tells if the old Rdn is to be deletedbooleanisMove()Gets whether or not this request is a Dn change resulting in a move operation.ModifyDnRequestremoveControl(Control control)Deletes a control removing it from this Message.ModifyDnRequestsetDeleteOldRdn(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.voidsetEntry(Dn name)Set the modification Dn.ModifyDnRequestsetMessageId(int messageId)Sets the Message ID for this requestModifyDnRequestsetName(Dn name)Sets the entry's distinguished name representing the entry PDU field.ModifyDnRequestsetNewRdn(Rdn newRdn)Sets the new relative distinguished name for the entry which represents the PDU's newrdn field.ModifyDnRequestsetNewSuperior(Dn newSuperior)Set the new superiorElementtoDsml(Element root)Creates the Request Element and adds RequestID and Controls.-
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml
abandon, addAbandonListener, computeLength, encode, getResultResponse, isAbandoned
-
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractRequestDsml
getRequestName, hasResponse
-
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, hasControl, put
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
-
-
-
-
Constructor Detail
-
ModifyDNRequestDsml
public ModifyDNRequestDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of ModifyDNRequestDsml.- Parameters:
codec- The LDAP Service to use
-
ModifyDNRequestDsml
public ModifyDNRequestDsml(LdapApiService codec, ModifyDnRequest ldapMessage)
Creates a new getDecoratedMessage() of ModifyDNRequestDsml.- Parameters:
codec- The LDAP Service to useldapMessage- the message to decorate
-
-
Method Detail
-
getType
public MessageTypeEnum getType()
Gets the LDAP message type code associated with this Message. Each request and response type has a unique message type code defined by the protocol in RFC 2251.- Specified by:
getTypein interfaceMessage- Overrides:
getTypein classAbstractDsmlMessageDecorator<ModifyDnRequest>- Returns:
- the message type code.
-
toDsml
public Element toDsml(Element root)
Creates the Request Element and adds RequestID and Controls.- Specified by:
toDsmlin interfaceDsmlDecorator<ModifyDnRequest>- Overrides:
toDsmlin classAbstractResultResponseRequestDsml<ModifyDnRequest,ModifyDnResponse>- Parameters:
root- the root element- Returns:
- the Request Element of the given name containing
-
getName
public Dn getName()
Get the modification's Dn- Specified by:
getNamein interfaceModifyDnRequest- Returns:
- Returns the name.
-
setEntry
public void setEntry(Dn name)
Set the modification Dn.- Parameters:
name- The name to set.
-
isDeleteOldRDN
public boolean isDeleteOldRDN()
Tells if the old Rdn is to be deleted- Returns:
- Returns the deleteOldRDN.
-
getNewSuperior
public Dn getNewSuperior()
Get the newSuperior- Specified by:
getNewSuperiorin interfaceModifyDnRequest- Returns:
- Returns the newSuperior.
-
setNewSuperior
public ModifyDnRequest setNewSuperior(Dn newSuperior)
Set the new superior- Specified by:
setNewSuperiorin interfaceModifyDnRequest- Parameters:
newSuperior- The newSuperior to set.- Returns:
- The ModifyDnRequest instance
-
getResponseType
public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.- Specified by:
getResponseTypein interfaceSingleReplyRequest- Returns:
- the message type of the response.
-
setName
public ModifyDnRequest setName(Dn name)
Sets the entry's distinguished name representing the entry PDU field.- Specified by:
setNamein interfaceModifyDnRequest- Parameters:
name- the distinguished name of the entry.- Returns:
- The ModifyDnRequest instance
-
getNewRdn
public Rdn getNewRdn()
Gets the new relative distinguished name for the entry which represents the PDU's newrdn field.- Specified by:
getNewRdnin interfaceModifyDnRequest- Returns:
- the relative dn with one component
-
setNewRdn
public ModifyDnRequest setNewRdn(Rdn newRdn)
Sets the new relative distinguished name for the entry which represents the PDU's newrdn field.- Specified by:
setNewRdnin interfaceModifyDnRequest- Parameters:
newRdn- the relative dn with one component- Returns:
- The ModifyDnRequest instance
-
getDeleteOldRdn
public 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. This property corresponds to the deleteoldrdn.- Specified by:
getDeleteOldRdnin interfaceModifyDnRequest- Returns:
- true if the old rdn is to be deleted, false if it is not
-
setDeleteOldRdn
public 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. This property corresponds to the deleteoldrdn.- Specified by:
setDeleteOldRdnin interfaceModifyDnRequest- Parameters:
deleteOldRdn- true if the old rdn is to be deleted, false if it is not- Returns:
- The ModifyDnRequest instance
-
isMove
public boolean isMove()
Gets whether or not this request is a Dn change resulting in a move operation. Setting the newSuperior property to a non-null name, toggles this flag.- Specified by:
isMovein interfaceModifyDnRequest- Returns:
- true if the newSuperior property is NOT null, false otherwise.
-
setMessageId
public ModifyDnRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageIdin interfaceMessage- Specified by:
setMessageIdin interfaceModifyDnRequest- Overrides:
setMessageIdin classAbstractDsmlMessageDecorator<ModifyDnRequest>- Parameters:
messageId- The message Id- Returns:
- A Message reference
-
addControl
public ModifyDnRequest addControl(Control control)
Adds a control to this Message.- Specified by:
addControlin interfaceMessage- Specified by:
addControlin interfaceModifyDnRequest- Overrides:
addControlin classAbstractDsmlMessageDecorator<ModifyDnRequest>- Parameters:
control- the control to add.- Returns:
- A Message reference
-
addAllControls
public ModifyDnRequest addAllControls(Control[] controls)
Adds an array of controls to this Message.- Specified by:
addAllControlsin interfaceMessage- Specified by:
addAllControlsin interfaceModifyDnRequest- Overrides:
addAllControlsin classAbstractDsmlMessageDecorator<ModifyDnRequest>- Parameters:
controls- the controls to add.- Returns:
- A Message reference
-
removeControl
public ModifyDnRequest removeControl(Control control)
Deletes a control removing it from this Message.- Specified by:
removeControlin interfaceMessage- Specified by:
removeControlin interfaceModifyDnRequest- Overrides:
removeControlin classAbstractDsmlMessageDecorator<ModifyDnRequest>- Parameters:
control- the control to remove.- Returns:
- A Message reference
-
-