Package netscape.ldap.util
Class LDIFAddContent
java.lang.Object
netscape.ldap.util.LDIFBaseContent
netscape.ldap.util.LDIFAddContent
- All Implemented Interfaces:
Serializable
,LDIFContent
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:
-
Field Summary
Fields inherited from interface netscape.ldap.util.LDIFContent
ADD_CONTENT, ATTRIBUTE_CONTENT, DELETE_CONTENT, MODDN_CONTENT, MODIFICATION_CONTENT
-
Constructor Summary
ConstructorsConstructorDescriptionLDIFAddContent
(LDAPAttribute[] attrs) Constructs a newLDIFAddContent
object with the specified attributes. -
Method Summary
Methods inherited from class netscape.ldap.util.LDIFBaseContent
getControls, getControlString, setControls
-
Constructor Details
-
LDIFAddContent
Constructs a newLDIFAddContent
object with the specified attributes.- Parameters:
attrs
- an array ofLDAPAttribute
objects representing the attributes of the entry to be added
-
-
Method Details
-
getType
public int getType()Returns the content type. You can use this with thegetContent
method of theLDIFRecord
object to determine the type of content specified in the record.- Returns:
- the content type (which is
LDIFContent.ADD_CONTENT
). - See Also:
-
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.
-
toString
Returns the string representation of the content of the LDIF record.- Specified by:
toString
in interfaceLDIFContent
- Overrides:
toString
in classObject
- Returns:
- the string representation of the content of the LDIF record.
-