org.apache.directory.shared.ldap.message
Interface ModifyDnRequest

All Superinterfaces:
AbandonableRequest, Message, Request, ResultResponseRequest, SingleReplyRequest
All Known Implementing Classes:
ModifyDnRequestImpl

public interface ModifyDnRequest
extends SingleReplyRequest, AbandonableRequest

Modify DN request protocol message used to rename or move an existing entry in the directory. Here's what RFC 2251 has to say about it:

  4.9. Modify DN Operation
 
   The Modify DN Operation allows a client to change the leftmost (least
   significant) component of the name of an entry in the directory, or
   to move a subtree of entries to a new location in the directory.  The
   Modify DN Request is defined as follows:
 
        ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
                entry           LDAPDN,
                newrdn          RelativeLDAPDN,
                deleteoldrdn    BOOLEAN,
                newSuperior     [0] LDAPDN OPTIONAL }
 
   Parameters of the Modify DN Request are:
 
   - entry: the Distinguished Name of the entry to be changed.  This
     entry may or may not have subordinate entries.
 
   - newrdn: the RDN that will form the leftmost component of the new
     name of the entry.
 
   - deleteoldrdn: a boolean parameter that controls whether the old RDN
     attribute values are to be retained as attributes of the entry, or
     deleted from the entry.
 
   - newSuperior: if present, this is the Distinguished Name of the entry
     which becomes the immediate superior of the existing entry.
 
Note that this operation can move an entry and change its Rdn at the same time in fact it might have no choice to comply with name forms.

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

Field Summary
static MessageTypeEnum RESP_TYPE
          Modify DN response message type enumeration value
static MessageTypeEnum TYPE
          Modify DN request message type enumeration value
 
Method Summary
 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.
 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.
 
Methods inherited from interface org.apache.directory.shared.ldap.message.SingleReplyRequest
getResponseType
 
Methods inherited from interface org.apache.directory.shared.ldap.message.ResultResponseRequest
getResultResponse
 
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
 

Field Detail

TYPE

public static final MessageTypeEnum TYPE
Modify DN request message type enumeration value


RESP_TYPE

public static final MessageTypeEnum RESP_TYPE
Modify DN response message type enumeration value

Method Detail

getName

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

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.

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.

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.

Parameters:
newRdn - the relative dn with one component

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.

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.

Parameters:
deleteOldRdn - true if the old rdn is to be deleted, false if it is not

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.

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.

Parameters:
newSuperior - the dn of the superior entry the candidate entry for DN modification is moved under.

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.

Returns:
true if the newSuperior property is NOT null, false otherwise.


Copyright © 2003-2006 . All Rights Reserved.