org.opends.server.protocols.ldap
Class ModifyDNRequestProtocolOp

java.lang.Object
  extended by org.opends.server.protocols.ldap.ProtocolOp
      extended by org.opends.server.protocols.ldap.ModifyDNRequestProtocolOp

public class ModifyDNRequestProtocolOp
extends ProtocolOp

This class defines the structures and methods for an LDAP modify DN request protocol op, which is used to move or rename an entry or subtree within the Directory Server.


Constructor Summary
ModifyDNRequestProtocolOp(ASN1OctetString entryDN, ASN1OctetString newRDN, boolean deleteOldRDN)
          Creates a new modify DN request protocol op with the provided information.
ModifyDNRequestProtocolOp(ASN1OctetString entryDN, ASN1OctetString newRDN, boolean deleteOldRDN, ASN1OctetString newSuperior)
          Creates a new modify DN request protocol op with the provided information.
 
Method Summary
static ModifyDNRequestProtocolOp decodeModifyDNRequest(ASN1Element element)
          Decodes the provided ASN.1 element as a modify DN request protocol op.
 boolean deleteOldRDN()
          Indicates whether the current RDN value(s) should be deleted.
 ASN1Element encode()
          Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.
 ASN1OctetString getEntryDN()
          Retrieves the current entry DN for this modify DN request.
 ASN1OctetString getNewRDN()
          Retrieves the new RDN for this modify DN request.
 ASN1OctetString getNewSuperior()
          Retrieves the new superior DN for this modify DN request.
 java.lang.String getProtocolOpName()
          Retrieves the name for this protocol op type.
 byte getType()
          Retrieves the BER type for this protocol op.
 void setDeleteOldRDN(boolean deleteOldRDN)
          Specifies whether the current RDN value(s) should be deleted.
 void setEntryDN(ASN1OctetString entryDN)
          Specifies the current entry DN for this modify DN request.
 void setNewRDN(ASN1OctetString newRDN)
          Specifies the new RDN for this modify DN request.
 void setNewSuperior(ASN1OctetString newSuperior)
          Specifies the new superior DN for this modify DN request.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this LDAP protocol op to the provided buffer.
 void toString(java.lang.StringBuilder buffer, int indent)
          Appends a multi-line string representation of this LDAP protocol op to the provided buffer.
 
Methods inherited from class org.opends.server.protocols.ldap.ProtocolOp
decode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModifyDNRequestProtocolOp

public ModifyDNRequestProtocolOp(ASN1OctetString entryDN,
                                 ASN1OctetString newRDN,
                                 boolean deleteOldRDN)
Creates a new modify DN request protocol op with the provided information.

Parameters:
entryDN - The current entry DN for this modify DN request.
newRDN - The new RDN for this modify DN request.
deleteOldRDN - Indicates whether to delete the current RDN value(s).

ModifyDNRequestProtocolOp

public ModifyDNRequestProtocolOp(ASN1OctetString entryDN,
                                 ASN1OctetString newRDN,
                                 boolean deleteOldRDN,
                                 ASN1OctetString newSuperior)
Creates a new modify DN request protocol op with the provided information.

Parameters:
entryDN - The current entry DN for this modify DN request.
newRDN - The new RDN for this modify DN request.
deleteOldRDN - Indicates whether to delete the current RDN value(s).
newSuperior - The new superior DN for this modify DN request.
Method Detail

getEntryDN

public ASN1OctetString getEntryDN()
Retrieves the current entry DN for this modify DN request.

Returns:
The current entry DN for this modify DN request.

setEntryDN

public void setEntryDN(ASN1OctetString entryDN)
Specifies the current entry DN for this modify DN request.

Parameters:
entryDN - The current entry DN for this modify DN request.

getNewRDN

public ASN1OctetString getNewRDN()
Retrieves the new RDN for this modify DN request.

Returns:
The new RDN for this modify DN request.

setNewRDN

public void setNewRDN(ASN1OctetString newRDN)
Specifies the new RDN for this modify DN request.

Parameters:
newRDN - The new RDN for this modify DN request.

deleteOldRDN

public boolean deleteOldRDN()
Indicates whether the current RDN value(s) should be deleted.

Returns:
true if the current RDN value(s) should be deleted, or false if not.

setDeleteOldRDN

public void setDeleteOldRDN(boolean deleteOldRDN)
Specifies whether the current RDN value(s) should be deleted.

Parameters:
deleteOldRDN - Specifies whether the current RDN value(s) should be deleted.

getNewSuperior

public ASN1OctetString getNewSuperior()
Retrieves the new superior DN for this modify DN request.

Returns:
The new superior DN for this modify DN request, or null if none was provided.

setNewSuperior

public void setNewSuperior(ASN1OctetString newSuperior)
Specifies the new superior DN for this modify DN request.

Parameters:
newSuperior - The new superior DN for this modify DN request.

getType

public byte getType()
Retrieves the BER type for this protocol op.

Specified by:
getType in class ProtocolOp
Returns:
The BER type for this protocol op.

getProtocolOpName

public java.lang.String getProtocolOpName()
Retrieves the name for this protocol op type.

Specified by:
getProtocolOpName in class ProtocolOp
Returns:
The name for this protocol op type.

encode

public ASN1Element encode()
Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.

Specified by:
encode in class ProtocolOp
Returns:
The ASN.1 element containing the encoded protocol op.

decodeModifyDNRequest

public static ModifyDNRequestProtocolOp decodeModifyDNRequest(ASN1Element element)
                                                       throws LDAPException
Decodes the provided ASN.1 element as a modify DN request protocol op.

Parameters:
element - The ASN.1 element to decode.
Returns:
The decoded modify DN request protocol op.
Throws:
LDAPException - If a problem occurs while trying to decode the provided ASN.1 element as an LDAP modify DN request protocol op.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP protocol op to the provided buffer.

Specified by:
toString in class ProtocolOp
Parameters:
buffer - The buffer to which the string should be appended.

toString

public void toString(java.lang.StringBuilder buffer,
                     int indent)
Appends a multi-line string representation of this LDAP protocol op to the provided buffer.

Specified by:
toString in class ProtocolOp
Parameters:
buffer - The buffer to which the information should be appended.
indent - The number of spaces from the margin that the lines should be indented.