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 ModifyDnRequest
addAllControls(Control[] controls)
Adds an array of controls to this Message.ModifyDnRequest
addControl(Control control)
Adds a control to this Message.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()
Get the modification's DnRdn
getNewRdn()
Gets the new relative distinguished name for the entry which represents the PDU's newrdn field.Dn
getNewSuperior()
Get the newSuperiorMessageTypeEnum
getResponseType()
Gets the protocol response message type for this request which produces at least one response.MessageTypeEnum
getType()
Gets the LDAP message type code associated with this Message.boolean
isDeleteOldRDN()
Tells if the old Rdn is to be deletedboolean
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.void
setEntry(Dn name)
Set the modification Dn.ModifyDnRequest
setMessageId(int messageId)
Sets the Message ID for this requestModifyDnRequest
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)
Set the new superiororg.dom4j.Element
toDsml(org.dom4j.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
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
equals, 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:
getType
in interfaceMessage
- Overrides:
getType
in classAbstractDsmlMessageDecorator<ModifyDnRequest>
- Returns:
- the message type code.
-
toDsml
public org.dom4j.Element toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.- Specified by:
toDsml
in interfaceDsmlDecorator<ModifyDnRequest>
- Overrides:
toDsml
in 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:
getName
in 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:
getNewSuperior
in interfaceModifyDnRequest
- Returns:
- Returns the newSuperior.
-
setNewSuperior
public ModifyDnRequest setNewSuperior(Dn newSuperior)
Set the new superior- Specified by:
setNewSuperior
in 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:
getResponseType
in 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:
setName
in 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:
getNewRdn
in 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:
setNewRdn
in 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:
getDeleteOldRdn
in 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:
setDeleteOldRdn
in 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:
isMove
in 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:
setMessageId
in interfaceMessage
- Specified by:
setMessageId
in interfaceModifyDnRequest
- Overrides:
setMessageId
in 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:
addControl
in interfaceMessage
- Specified by:
addControl
in interfaceModifyDnRequest
- Overrides:
addControl
in 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:
addAllControls
in interfaceMessage
- Specified by:
addAllControls
in interfaceModifyDnRequest
- Overrides:
addAllControls
in 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:
removeControl
in interfaceMessage
- Specified by:
removeControl
in interfaceModifyDnRequest
- Overrides:
removeControl
in classAbstractDsmlMessageDecorator<ModifyDnRequest>
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
-