Package com.unboundid.ldif
Interface LDIFRecord
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AlarmEntry,AlertEntry,ChangeLogEntry,DraftChuLDAPLogSchema00AbandonEntry,DraftChuLDAPLogSchema00AddEntry,DraftChuLDAPLogSchema00BindEntry,DraftChuLDAPLogSchema00CompareEntry,DraftChuLDAPLogSchema00DeleteEntry,DraftChuLDAPLogSchema00Entry,DraftChuLDAPLogSchema00ExtendedEntry,DraftChuLDAPLogSchema00ModifyDNEntry,DraftChuLDAPLogSchema00ModifyEntry,DraftChuLDAPLogSchema00SearchEntry,DraftChuLDAPLogSchema00UnbindEntry,EffectiveRightsEntry,Entry,JoinedEntry,LDIFAddChangeRecord,LDIFChangeRecord,LDIFDeleteChangeRecord,LDIFModifyChangeRecord,LDIFModifyDNChangeRecord,ReadOnlyEntry,RootDSE,SearchResultEntry,SoftDeletedEntry,UnboundIDChangeLogEntry,UnboundIDRootDSE
@NotExtensible
@ThreadSafety(level=INTERFACE_THREADSAFE)
public interface LDIFRecord
extends Serializable
This interface defines a common API for LDIF records, which are objects that
can be represented using LDIF. This includes both
This interface defines a data type that is intended to be implemented only by classes within the LDAP SDK. Third-party code may reference objects using this data type, but external classes should not create additional implementations of this interface.
Entry and LDIFChangeRecord objects.
It is possible to obtain the DN of an LDIF record, as well as to obtain the
LDIF representation of that object. They can be read using the
LDIFReader.readLDIFRecord() method and written using the
LDIFWriter.writeLDIFRecord(com.unboundid.ldif.LDIFRecord) method.
This interface defines a data type that is intended to be implemented only by classes within the LDAP SDK. Third-party code may reference objects using this data type, but external classes should not create additional implementations of this interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetDN()Retrieves the string representation of the DN for this LDIF record.Retrieves the parsed DN for this LDIF record as aDNobject.String[]toLDIF()Retrieves an LDIF representation of this LDIF record, with each line of the LDIF representation in a separate element of the returned array.String[]toLDIF(int wrapColumn) Retrieves an LDIF representation of this LDIF record, with each line of the LDIF representation in a separate element of the returned array.voidtoLDIF(ByteStringBuffer buffer) Appends an LDIF-formatted string representation of this LDIF record to the provided buffer.voidtoLDIF(ByteStringBuffer buffer, int wrapColumn) Appends an LDIF-formatted string representation of this LDIF record to the provided buffer.Retrieves an LDIF-formatted string representation of this LDIF record.toLDIFString(int wrapColumn) Retrieves an LDIF-formatted string representation of this LDIF record.voidtoLDIFString(StringBuilder buffer) Appends an LDIF-formatted string representation of this LDIF record to the provided buffer.voidtoLDIFString(StringBuilder buffer, int wrapColumn) Appends an LDIF-formatted string representation of this LDIF record to the provided buffer.toString()Retrieves a string representation of this LDIF record.voidtoString(StringBuilder buffer) Appends a string representation of this LDIF record to the provided buffer.
-
Method Details
-
getDN
Retrieves the string representation of the DN for this LDIF record.- Returns:
- The string representation of the DN for this LDIF record.
-
getParsedDN
Retrieves the parsed DN for this LDIF record as aDNobject.- Returns:
- The parsed DN for this LDIF record as a
DNobject. - Throws:
LDAPException- If a problem occurs while trying to parse the DN.
-
toLDIF
Retrieves an LDIF representation of this LDIF record, with each line of the LDIF representation in a separate element of the returned array. Long lines will not be wrapped.- Returns:
- An LDIF representation of this LDIF record.
-
toLDIF
Retrieves an LDIF representation of this LDIF record, with each line of the LDIF representation in a separate element of the returned array.- Parameters:
wrapColumn- The column at which to wrap long lines. A value that is less than or equal to two indicates that no wrapping should be performed.- Returns:
- An LDIF representation of this LDIF record.
-
toLDIF
Appends an LDIF-formatted string representation of this LDIF record to the provided buffer. No wrapping will be performed, and no extra blank lines will be added.- Parameters:
buffer- The buffer to which to append the LDIF representation of this LDIF record.
-
toLDIF
Appends an LDIF-formatted string representation of this LDIF record to the provided buffer. No extra blank lines will be added.- Parameters:
buffer- The buffer to which to append the LDIF representation of this LDIF record.wrapColumn- The column at which to wrap long lines. A value that is less than or equal to two indicates that no wrapping should be performed.
-
toLDIFString
Retrieves an LDIF-formatted string representation of this LDIF record. No wrapping will be performed, and no extra blank lines will be added.- Returns:
- An LDIF-formatted string representation of this entry.
-
toLDIFString
Retrieves an LDIF-formatted string representation of this LDIF record. No extra blank lines will be added.- Parameters:
wrapColumn- The column at which to wrap long lines. A value that is less than or equal to two indicates that no wrapping should be performed.- Returns:
- An LDIF-formatted string representation of this entry.
-
toLDIFString
Appends an LDIF-formatted string representation of this LDIF record to the provided buffer. No wrapping will be performed, and no extra blank lines will be added.- Parameters:
buffer- The buffer to which to append the LDIF representation of this LDIF record.
-
toLDIFString
Appends an LDIF-formatted string representation of this LDIF record to the provided buffer. No extra blank lines will be added.- Parameters:
buffer- The buffer to which to append the LDIF representation of this LDIF record.wrapColumn- The column at which to wrap long lines. A value that is less than or equal to two indicates that no wrapping should be performed.
-
toString
Retrieves a string representation of this LDIF record. Note that it will be a single-line string representation and will therefore not be an LDIF representation. -
toString
Appends a string representation of this LDIF record to the provided buffer. Note that it will be a single-line string representation and will therefore not be an LDIF representation.- Parameters:
buffer- The buffer to which the string representation of this LDIF record should be appended.
-