LDAPJDK 4.1

netscape.ldap.util
Class LDIFAddContent

java.lang.Object
  |
  +--netscape.ldap.util.LDIFBaseContent
        |
        +--netscape.ldap.util.LDIFAddContent

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.

See Also:
LDIFRecord.getContent(), Serialized Form

Constructor Summary
LDIFAddContent(LDAPAttribute[] 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.
 java.lang.String toString()
          Returns the string representation of the content of the LDIF record.
 
Methods inherited from class netscape.ldap.util.LDIFBaseContent
getControls, getControlString, setControls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDIFAddContent

public LDIFAddContent(LDAPAttribute[] attrs)
Constructs a new LDIFAddContent object with the specified attributes.
Parameters:
attrs - an array of LDAPAttribute objects representing the attributes of the entry to be added
Method Detail

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.
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 LDAPAttribute objects 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.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the content of the LDIF record.

LDAPJDK 4.1