Class LDIFAttributeContent

java.lang.Object
netscape.ldap.util.LDIFBaseContent
netscape.ldap.util.LDIFAttributeContent
All Implemented Interfaces:
Serializable, LDIFContent

public class LDIFAttributeContent extends LDIFBaseContent
An object of this class represents the content of an LDIF record that specifies an entry and its attributes. This class implements the LDIFContent interface.

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

Version:
1.0
See Also:
  • Constructor Details

    • LDIFAttributeContent

      public LDIFAttributeContent()
      Constructs an empty LDIFAttributeContent object with no attributes specified. You can use the addElement method to add attributes to this object.
      See Also:
  • Method Details

    • 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.ATTRIBUTE_CONTENT).
      See Also:
    • addElement

      public void addElement(LDAPAttribute attr)
      Adds an attribute to the content of the LDIF record.
      Parameters:
      attr - the attribute to add
    • 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 String toString()
      Returns the string representation of the content of the LDIF record.
      Specified by:
      toString in interface LDIFContent
      Overrides:
      toString in class Object
      Returns:
      the string representation of the content of the LDIF record.