Class LDIFAttributeContent
java.lang.Object
netscape.ldap.util.LDIFBaseContent
netscape.ldap.util.LDIFAttributeContent
- All Implemented Interfaces:
Serializable, LDIFContent
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:
-
Field Summary
Fields inherited from interface LDIFContent
ADD_CONTENT, ATTRIBUTE_CONTENT, DELETE_CONTENT, MODDN_CONTENT, MODIFICATION_CONTENTModifier and TypeFieldDescriptionstatic final intThe LDIF record specifies a new entry to be added.static final intThe LDIF record specifies an entry and its attributes.static final intThe LDIF record specifies an entry to be deleted.static final intThe LDIF record specifies changes to the DN or RDN of an entry.static final intThe LDIF record specifies modifications to an entry. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an emptyLDIFAttributeContentobject with no attributes specified. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(LDAPAttribute attr) Adds an attribute to the content of the LDIF record.Retrieves the list of the attributes specified in the content of the LDIF record.intgetType()Returns the content type.toString()Returns the string representation of the content of the LDIF record.Methods inherited from class LDIFBaseContent
getControls, getControlString, setControlsModifier and TypeMethodDescriptionRetrieves the list of controls specified in the content of the LDIF record, if anyprotected StringGet the OIDs of all controls, if any, as a stringvoidsetControls(LDAPControl[] controls) Sets the list of controls
-
Constructor Details
-
LDIFAttributeContent
public LDIFAttributeContent()Constructs an emptyLDIFAttributeContentobject with no attributes specified. You can use theaddElementmethod to add attributes to this object.- See Also:
-
-
Method Details
-
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.ATTRIBUTE_CONTENT). - See Also:
-
addElement
Adds an attribute to the content of the LDIF record.- Parameters:
attr- the attribute to add
-
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
Returns the string representation of the content of the LDIF record.- Specified by:
toStringin interfaceLDIFContent- Overrides:
toStringin classObject- Returns:
- the string representation of the content of the LDIF record.
-