Package netscape.ldap.util
Class LDIFModDNContent
java.lang.Object
netscape.ldap.util.LDIFBaseContent
netscape.ldap.util.LDIFModDNContent
- All Implemented Interfaces:
Serializable,LDIFContent
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.
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate StringInternal variablesprivate String(package private) static final longFields inherited from interface netscape.ldap.util.LDIFContent
ADD_CONTENT, ATTRIBUTE_CONTENT, DELETE_CONTENT, MODDN_CONTENT, MODIFICATION_CONTENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if the content of the LDIF record specifies that the old RDN should be removed as an attribute in the entry.Returns the entry's new parent DN, if specified in the content of the LDIF record.getRDN()Returns the new RDN specified in the content of the LDIF record.intgetType()Returns the content type.voidsetDeleteOldRDN(boolean bool) Sets whether or not the old RDN should be removed as an attribute in the entry.voidsetNewParent(String parent) Sets the new parent DN that should be assigned to the entry.voidSets the new RDN that should be assigned to the entry.toString()Returns string representation of the content of the LDIF record.Methods inherited from class netscape.ldap.util.LDIFBaseContent
getControls, getControlString, setControls
-
Field Details
-
m_newParent
Internal variables -
m_rdn
-
m_deleteOldRDN
private boolean m_deleteOldRDN -
serialVersionUID
static final long serialVersionUID- See Also:
-
-
Constructor Details
-
LDIFModDNContent
public LDIFModDNContent()Constructs an emptyLDIFModDNContentobject. To specify the modifications to be made to the entry, use thesetRDN,setNewParent, andsetDeleteOldRDNmethods.- See Also:
-
-
Method Details
-
getType
public int getType()Returns the content type. You can use this with thegetContentmethod of theLDIFRecordobject to determine the type of content specified in the record.- Returns:
- the content type (which is
LDIFContent.MODDN_CONTENT). - See Also:
-
setRDN
Sets the new RDN that should be assigned to the entry.- Parameters:
rdn- the new RDN- See Also:
-
getRDN
Returns the new RDN specified in the content of the LDIF record.- Returns:
- the new RDN.
- See Also:
-
setNewParent
Sets the new parent DN that should be assigned to the entry.- Parameters:
parent- the new parent DN for the entry- See Also:
-
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:
-
setDeleteOldRDN
public void setDeleteOldRDN(boolean bool) Sets whether or not the old RDN should be removed as an attribute in the entry.- Parameters:
bool- iftrue, remove the attribute representing the RDN. Iffalse, leave the attribute in the entry.- See Also:
-
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:
trueif the change specifies that the the attribute representing the RDN should be removed,falseif the change specifies that the attribute should be left in the entry.- See Also:
-
toString
Returns string representation of the content of the LDIF record.- Specified by:
toStringin interfaceLDIFContent- Overrides:
toStringin classObject- Returns:
- the string representation of the content of the LDIF record.
-