LDAPJDK 4.1

netscape.ldap.util
Class LDIFModDNContent

java.lang.Object
  |
  +--netscape.ldap.util.LDIFBaseContent
        |
        +--netscape.ldap.util.LDIFModDNContent

public class LDIFModDNContent
extends LDIFBaseContent

An object of this class represents the content of an LDIF record that specifies changes to an RDN or the DN of an entry. This class implements the LDIFContent interface.

To get this object from an LDIFRecord object, use the getContent method and cast the return value as LDIFModDNContent.

See Also:
LDIFRecord.getContent(), Serialized Form

Constructor Summary
LDIFModDNContent()
          Constructs an empty LDIFModDNContent object.
 
Method Summary
 boolean getDeleteOldRDN()
          Determines if the content of the LDIF record specifies that the old RDN should be removed as an attribute in the entry.
 java.lang.String getNewParent()
          Returns the entry's new parent DN, if specified in the content of the LDIF record.
 java.lang.String getRDN()
          Returns the new RDN specified in the content of the LDIF record.
 int getType()
          Returns the content type.
 void setDeleteOldRDN(boolean bool)
          Sets whether or not the old RDN should be removed as an attribute in the entry.
 void setNewParent(java.lang.String parent)
          Sets the new parent DN that should be assigned to the entry.
 void setRDN(java.lang.String rdn)
          Sets the new RDN that should be assigned to the entry.
 java.lang.String toString()
          Returns string representation of the content of the LDIF record.
 
Methods inherited from class netscape.ldap.util.LDIFBaseContent
getControls, getControlString, setControls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDIFModDNContent

public LDIFModDNContent()
Constructs an empty LDIFModDNContent object. To specify the modifications to be made to the entry, use the setRDN, setNewParent, and setDeleteOldRDN methods.
See Also:
setRDN(java.lang.String), setNewParent(java.lang.String), setDeleteOldRDN(boolean)
Method Detail

getType

public int getType()
Returns the content type. You can use this with the getContent method of the LDIFRecord object to determine the type of content specified in the record.
Returns:
the content type (which is LDIFContent.MODDN_CONTENT).
See Also:
LDIFRecord.getContent()

setRDN

public void setRDN(java.lang.String rdn)
Sets the new RDN that should be assigned to the entry.
Parameters:
rdn - the new RDN
See Also:
getRDN()

getRDN

public java.lang.String getRDN()
Returns the new RDN specified in the content of the LDIF record.
Returns:
the new RDN.
See Also:
setRDN(java.lang.String)

setNewParent

public void setNewParent(java.lang.String parent)
Sets the new parent DN that should be assigned to the entry.
Parameters:
parent - the new parent DN for the entry
See Also:
getNewParent()

getNewParent

public java.lang.String getNewParent()
Returns the entry's new parent DN, if specified in the content of the LDIF record.
Returns:
the new parent of the entry.
See Also:
setNewParent(java.lang.String)

setDeleteOldRDN

public void setDeleteOldRDN(boolean bool)
Sets whether or not the old RDN should be removed as an attribute in the entry.
Parameters:
bool - if true, remove the attribute representing the RDN. If false, leave the attribute in the entry.
See Also:
getDeleteOldRDN()

getDeleteOldRDN

public boolean getDeleteOldRDN()
Determines if the content of the LDIF record specifies that the old RDN should be removed as an attribute in the entry.
Returns:
true if the change specifies that the the attribute representing the RDN should be removed, false if the change specifies that the attribute should be left in the entry.
See Also:
setDeleteOldRDN(boolean)

toString

public java.lang.String toString()
Returns string representation of the content of the LDIF record.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the content of the LDIF record.

LDAPJDK 4.1