Class ModifyDnRequestImpl
- java.lang.Object
-
- org.apache.directory.api.ldap.model.message.AbstractMessage
-
- org.apache.directory.api.ldap.model.message.AbstractRequest
-
- org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest
-
- org.apache.directory.api.ldap.model.message.ModifyDnRequestImpl
-
- All Implemented Interfaces:
AbandonableRequest,Message,ModifyDnRequest,Request,ResultResponseRequest,SingleReplyRequest
public class ModifyDnRequestImpl extends AbstractAbandonableRequest implements ModifyDnRequest
ModifyDNRequest implementation.- Author:
- Apache Directory Project
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest
AbstractAbandonableRequest.RequestObservable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static longserialVersionUID-
Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
controls
-
-
Constructor Summary
Constructors Constructor Description ModifyDnRequestImpl()Creates a ModifyDnRequest implementing object used to perform a dn change on an entry potentially resulting in an entry move.
-
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.booleanequals(Object obj)Checks to see of an object equals this ModifyDnRequest stub.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()Gets the entry's distinguished name representing the entry PDU field.RdngetNewRdn()Gets the new relative distinguished name for the entry which represents the PDU's newrdn field.DngetNewSuperior()Gets the optional distinguished name of the new superior entry where the candidate entry is to be moved.MessageTypeEnumgetResponseType()Gets the protocol response message type for this request which produces at least one response.ModifyDnResponsegetResultResponse()The result containing response for this request.inthashCode()booleanisMove()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.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)Sets the optional distinguished name of the new superior entry where the candidate entry is to be moved.StringtoString()Get a String representation of a ModifyDNRequest-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest
abandon, addAbandonListener, isAbandoned
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest
hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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, getType, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
getName
public Dn getName()
Gets the entry's distinguished name representing the entry PDU field.- Specified by:
getNamein interfaceModifyDnRequest- Returns:
- the distinguished name of the entry.
-
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
-
getNewSuperior
public Dn getNewSuperior()
Gets the optional distinguished name of the new superior entry where the candidate entry is to be moved. This property corresponds to the PDU's newSuperior field. May be null representing a simple Rdn change rather than a move operation.- Specified by:
getNewSuperiorin interfaceModifyDnRequest- Returns:
- the dn of the superior entry the candidate entry is moved under.
-
setNewSuperior
public ModifyDnRequest setNewSuperior(Dn newSuperior)
Sets the optional distinguished name of the new superior entry where the candidate entry is to be moved. This property corresponds to the PDU's newSuperior field. May be null representing a simple Rdn change rather than a move operation. Setting this property to a non-null value toggles the move flag obtained via theisMovemethod.- Specified by:
setNewSuperiorin interfaceModifyDnRequest- Parameters:
newSuperior- the dn of the superior entry the candidate entry for Dn modification is moved under.- Returns:
- The ModifyDnRequest instance
-
setMessageId
public ModifyDnRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageIdin interfaceMessage- Specified by:
setMessageIdin interfaceModifyDnRequest- Overrides:
setMessageIdin classAbstractMessage- 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 classAbstractMessage- 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 classAbstractMessage- 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 classAbstractMessage- Parameters:
control- the control to remove.- Returns:
- A Message reference
-
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.
-
getResultResponse
public ModifyDnResponse getResultResponse()
The result containing response for this request.- Specified by:
getResultResponsein interfaceResultResponseRequest- Returns:
- the result containing response for this request
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractRequest- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
Checks to see of an object equals this ModifyDnRequest stub. The equality presumes all ModifyDnRequest specific properties are the same.- Overrides:
equalsin classAbstractRequest- Parameters:
obj- the object to compare with this stub- Returns:
- true if the obj is equal to this stub, false otherwise
-
-