@ThreadSafety(level=NOT_THREADSAFE) public final class ColumnBasedLDAPResultWriter extends LDAPResultWriter
LDAPResultWriter instance that uses a
ColumnFormatter to output search result entries in a format like CSV
or tab-delimited text. Only a single value from each attribute will be used,
and an empty string will be used for attributes without any values.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
| Constructor and Description |
|---|
ColumnBasedLDAPResultWriter(java.io.OutputStream outputStream,
OutputFormat outputFormat,
java.util.List<java.lang.String> requestedAttributes,
int maxCommentWidth,
boolean includeAllValues)
Creates a new instance of this LDAP result writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
writeComment(java.lang.String comment)
Writes the provided comment to the output.
|
void |
writeHeader()
Formats and writes a header that describes the way in which the data will
be formatted.
|
void |
writeResult(LDAPResult result)
Formats and writes the provided LDAP result.
|
void |
writeSearchResultEntry(SearchResultEntry entry)
Formats and writes the provided search result entry.
|
void |
writeSearchResultReference(SearchResultReference ref)
Formats and writes the provided search result reference.
|
void |
writeUnsolicitedNotification(LDAPConnection connection,
ExtendedResult notification)
Formats and writes the provided unsolicited notification.
|
flush, getPrintStream, print, println, println, updateOutputStreampublic ColumnBasedLDAPResultWriter(@NotNull java.io.OutputStream outputStream, @NotNull OutputFormat outputFormat, @NotNull java.util.List<java.lang.String> requestedAttributes, int maxCommentWidth, boolean includeAllValues)
outputStream - The output stream to which theoutputFormat - The output format to use for search entry
attributes.requestedAttributes - The names of the requested attributes.maxCommentWidth - The maximum width to use for comments in the
output. This will be ignored for information
about search result entries.includeAllValues - Indicates whether to include all values of a
multivalued attribute. If this is
true, then a vertical bar (|) will be
used to separate the values within each field.public void writeComment(@NotNull java.lang.String comment)
writeComment in class LDAPResultWritercomment - The comment to be written. It must not be null.public void writeHeader()
writeHeader in class LDAPResultWriterpublic void writeSearchResultEntry(@NotNull SearchResultEntry entry)
writeSearchResultEntry in class LDAPResultWriterentry - The search result entry to be processed.public void writeSearchResultReference(@NotNull SearchResultReference ref)
writeSearchResultReference in class LDAPResultWriterref - The search result reference to be processed.public void writeResult(@NotNull LDAPResult result)
writeResult in class LDAPResultWriterresult - The LDAP result to be processed. It may or may not be a
search result.public void writeUnsolicitedNotification(@NotNull LDAPConnection connection, @NotNull ExtendedResult notification)
writeUnsolicitedNotification in class LDAPResultWriterconnection - The connection on which the unsolicited notification
was received.notification - The unsolicited notification that was received.