netscape.ldap.util

Class LDIFAddContent

Implemented Interfaces:
LDIFContent, java.io.Serializable

public class LDIFAddContent
extends LDIFBaseContent

An object of this class represents the content of an LDIF record that specifies a new entry to be added. This class implements the LDIFContent interface.

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

Version:
1.0
See Also:
LDIFRecord.getContent(), Serialized Form

Fields inherited from interface netscape.ldap.util.LDIFContent

ADD_CONTENT, ATTRIBUTE_CONTENT, DELETE_CONTENT, MODDN_CONTENT, MODIFICATION_CONTENT

Constructor Summary

LDIFAddContent(attrs[] )
Constructs a new LDIFAddContent object with the specified attributes.

Method Summary

LDAPAttribute[]
getAttributes()
Retrieves the list of the attributes specified in the content of the LDIF record.
int
getType()
Returns the content type.
String
toString()
Returns the string representation of the content of the LDIF record.

Methods inherited from class netscape.ldap.util.LDIFBaseContent

getControlString, getControls, setControls

Constructor Details

LDIFAddContent

public LDIFAddContent(attrs[] )
Constructs a new LDIFAddContent object with the specified attributes.
Parameters:

Method Details

getAttributes

public LDAPAttribute[] getAttributes()
Retrieves the list of the attributes specified in the content of the LDIF record.
Returns:
an array of LDAPAttribute objects that represent the attributes 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.
Specified by:
getType in interface LDIFContent
Returns:
the content type (which is LDIFContent.ADD_CONTENT).

toString

public String toString()
Returns the string representation of the content of the LDIF record.
Specified by:
toString in interface LDIFContent
Returns:
the string representation of the content of the LDIF record.