Package netscape.ldap.util
Class LDIFAddContent
- java.lang.Object
-
- netscape.ldap.util.LDIFBaseContent
-
- netscape.ldap.util.LDIFAddContent
-
- All Implemented Interfaces:
java.io.Serializable,LDIFContent
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 theLDIFContentinterface.To get this object from an
LDIFRecordobject, use thegetContentmethod and cast the return value asLDIFAddContent.- Version:
- 1.0
- See Also:
LDIFRecord.getContent(), Serialized Form
-
-
Field Summary
-
Fields inherited from interface netscape.ldap.util.LDIFContent
ADD_CONTENT, ATTRIBUTE_CONTENT, DELETE_CONTENT, MODDN_CONTENT, MODIFICATION_CONTENT
-
-
Constructor Summary
Constructors Constructor Description LDIFAddContent(LDAPAttribute[] attrs)Constructs a newLDIFAddContentobject with the specified attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPAttribute[]getAttributes()Retrieves the list of the attributes specified in the content of the LDIF record.intgetType()Returns the content type.java.lang.StringtoString()Returns the string representation of the content of the LDIF record.-
Methods inherited from class netscape.ldap.util.LDIFBaseContent
getControls, getControlString, setControls
-
-
-
-
Constructor Detail
-
LDIFAddContent
public LDIFAddContent(LDAPAttribute[] attrs)
Constructs a newLDIFAddContentobject with the specified attributes.- Parameters:
attrs- an array ofLDAPAttributeobjects representing the attributes of the entry to be added
-
-
Method Detail
-
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.ADD_CONTENT). - See Also:
LDIFRecord.getContent()
-
getAttributes
public LDAPAttribute[] getAttributes()
Retrieves the list of the attributes specified in the content of the LDIF record.- Returns:
- an array of
LDAPAttributeobjects that represent the attributes specified in the content of the LDIF record.
-
toString
public java.lang.String toString()
Returns the string representation of the content of the LDIF record.- Specified by:
toStringin interfaceLDIFContent- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation of the content of the LDIF record.
-
-