netscape.ldap.util
Class LDIFModDNContent
- LDIFContent, java.io.Serializable
public class LDIFModDNContent
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
.
boolean | getDeleteOldRDN() - Determines if the content of the LDIF record specifies that
the old RDN should be removed as an attribute in the entry.
|
String | getNewParent() - Returns the entry's new parent DN, if specified in the content
of the LDIF record.
|
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(String parent) - Sets the new parent DN that should be assigned to the entry.
|
void | setRDN(String rdn) - Sets the new RDN that should be assigned to the entry.
|
String | toString() - Returns string representation of the content of the LDIF record.
|
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.
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.
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.
getNewParent
public String getNewParent()
Returns the entry's new parent DN, if specified in the content
of the LDIF record.
- the new parent of the entry.
getRDN
public String getRDN()
Returns the new RDN specified in the content of the LDIF record.
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.
- getType in interface LDIFContent
- the content type (which is
LDIFContent.MODDN_CONTENT
).
setDeleteOldRDN
public void setDeleteOldRDN(boolean bool)
Sets whether or not the old RDN should be removed as an
attribute in the entry.
bool
- if true
, remove the attribute representing
the RDN. If false
, leave the attribute in the entry.
setNewParent
public void setNewParent(String parent)
Sets the new parent DN that should be assigned to the entry.
parent
- the new parent DN for the entry
setRDN
public void setRDN(String rdn)
Sets the new RDN that should be assigned to the entry.
toString
public String toString()
Returns string representation of the content of the LDIF record.
- toString in interface LDIFContent
- the string representation of the content of the LDIF record.