org.apache.directory.shared.ldap.message
Class ModifyDnRequestImpl

java.lang.Object
  extended byorg.apache.directory.shared.ldap.message.AbstractMessage
      extended byorg.apache.directory.shared.ldap.message.AbstractRequest
          extended byorg.apache.directory.shared.ldap.message.AbstractAbandonableRequest
              extended byorg.apache.directory.shared.ldap.message.ModifyDnRequestImpl
All Implemented Interfaces:
AbandonableRequest, Message, ModifyDnRequest, Request, ResultResponseRequest, SingleReplyRequest

public class ModifyDnRequestImpl
extends AbstractAbandonableRequest
implements ModifyDnRequest

Lockable ModifyDNRequest implementation.

Version:
$Rev: 379008 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.shared.ldap.message.ModifyDnRequest
RESP_TYPE, TYPE
 
Constructor Summary
ModifyDnRequestImpl(int id)
          Creates a Lockable ModifyDnRequest implementing object used to perform a dn change on an entry potentially resulting in an entry move.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks to see of an object equals this ModifyDnRequest stub.
 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.
 java.lang.String getName()
          Gets the entry's distinguished name representing the entry PDU field.
 java.lang.String getNewRdn()
          Gets the new relative distinguished name for the entry which represents the PDU's newrdn field.
 java.lang.String getNewSuperior()
          Gets the optional distinguished name of the new superior entry where the candidate entry is to be moved.
 MessageTypeEnum getResponseType()
          Gets the protocol response message type for this request which produces at least one response.
 ResultResponse getResultResponse()
          The result containing response for this request.
 boolean isMove()
          Gets whether or not this request is a DN change resulting in a move operation.
 void 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 setName(java.lang.String name)
          Sets the entry's distinguished name representing the entry PDU field.
 void setNewRdn(java.lang.String newRdn)
          Sets the new relative distinguished name for the entry which represents the PDU's newrdn field.
 void setNewSuperior(java.lang.String newSuperior)
          Sets the optional distinguished name of the new superior entry where the candidate entry is to be moved.
 java.lang.String toString()
          Get a String representation of a ModifyDNRequest
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractAbandonableRequest
abandon, addAbandonListener, isAbandoned
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractMessage
add, get, getControls, getMessageId, getType, put, remove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.message.Message
add, get, getControls, getMessageId, getType, put, remove
 
Methods inherited from interface org.apache.directory.shared.ldap.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Constructor Detail

ModifyDnRequestImpl

public ModifyDnRequestImpl(int id)
Creates a Lockable ModifyDnRequest implementing object used to perform a dn change on an entry potentially resulting in an entry move.

Parameters:
id - the seq id of this message
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

PDU field.

Specified by:
getDeleteOldRdn in interface ModifyDnRequest
Returns:
true if the old rdn is to be deleted, false if it is not

setDeleteOldRdn

public void 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

PDU field.

Specified by:
setDeleteOldRdn in interface ModifyDnRequest
Parameters:
deleteOldRdn - true if the old rdn is to be deleted, false if it is not

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 interface ModifyDnRequest
Returns:
true if the newSuperior property is NOT null, false otherwise.

getName

public java.lang.String getName()
Gets the entry's distinguished name representing the entry PDU field.

Specified by:
getName in interface ModifyDnRequest
Returns:
the distinguished name of the entry.

setName

public void setName(java.lang.String name)
Sets the entry's distinguished name representing the entry PDU field.

Specified by:
setName in interface ModifyDnRequest
Parameters:
name - the distinguished name of the entry.

getNewRdn

public java.lang.String getNewRdn()
Gets the new relative distinguished name for the entry which represents the PDU's newrdn field.

Specified by:
getNewRdn in interface ModifyDnRequest
Returns:
the relative dn with one component

setNewRdn

public void setNewRdn(java.lang.String newRdn)
Sets the new relative distinguished name for the entry which represents the PDU's newrdn field.

Specified by:
setNewRdn in interface ModifyDnRequest
Parameters:
newRdn - the relative dn with one component

getNewSuperior

public java.lang.String 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:
getNewSuperior in interface ModifyDnRequest
Returns:
the dn of the superior entry the candidate entry is moved under.

setNewSuperior

public void setNewSuperior(java.lang.String 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 the isMove method.

Specified by:
setNewSuperior in interface ModifyDnRequest
Parameters:
newSuperior - the dn of the superior entry the candidate entry for DN modification is moved under.

getResponseType

public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.

Specified by:
getResponseType in interface SingleReplyRequest
Returns:
the message type of the response.

getResultResponse

public ResultResponse getResultResponse()
The result containing response for this request.

Specified by:
getResultResponse in interface ResultResponseRequest
Returns:
the result containing response for this request

equals

public boolean equals(java.lang.Object obj)
Checks to see of an object equals this ModifyDnRequest stub. The equality presumes all ModifyDnRequest specific properties are the same.

Overrides:
equals in class AbstractMessage
Parameters:
obj - the object to compare with this stub
Returns:
true if the obj is equal to this stub, false otherwise

toString

public java.lang.String toString()
Get a String representation of a ModifyDNRequest

Returns:
A ModifyDNRequest String


Copyright © 2003-2006 . All Rights Reserved.