Package netscape.ldap.util
Class LDIFAttributeContent
- java.lang.Object
-
- netscape.ldap.util.LDIFBaseContent
-
- netscape.ldap.util.LDIFAttributeContent
-
- All Implemented Interfaces:
java.io.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 theLDIFContent
interface.To get this object from an
LDIFRecord
object, use thegetContent
method and cast the return value asLDIFAttributeContent
.- 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 LDIFAttributeContent()
Constructs an emptyLDIFAttributeContent
object with no attributes specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElement(LDAPAttribute attr)
Adds an attribute to the content of the LDIF record.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
-
-
-
-
Constructor Detail
-
LDIFAttributeContent
public LDIFAttributeContent()
Constructs an emptyLDIFAttributeContent
object with no attributes specified. You can use theaddElement
method to add attributes to this object.- See Also:
addElement(netscape.ldap.LDAPAttribute)
-
-
Method Detail
-
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.ATTRIBUTE_CONTENT
). - See Also:
LDIFRecord.getContent()
-
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 java.lang.String toString()
Returns the string representation of the content of the LDIF record.- Specified by:
toString
in interfaceLDIFContent
- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string representation of the content of the LDIF record.
-
-