@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ResultUtils extends java.lang.Object
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.
Modifier and Type | Method and Description |
---|---|
static void |
formatResponseControl(java.util.List<java.lang.String> lines,
Control c,
boolean comment,
int indent,
int maxWidth)
Adds a multi-line string representation of the provided result to the
given list.
|
static java.util.List<java.lang.String> |
formatResult(LDAPException ldapException,
boolean comment,
int indent,
int maxWidth)
Retrieves a list of strings that comprise a formatted representation of the
result encapsulated by the provided exception.
|
static java.util.List<java.lang.String> |
formatResult(LDAPResult result,
boolean comment,
int indent,
int maxWidth)
Retrieves a list of strings that comprise a formatted representation of the
provided result.
|
static void |
formatResult(java.util.List<java.lang.String> lines,
LDAPResult result,
boolean comment,
boolean inTxn,
int indent,
int maxWidth)
Adds a multi-line string representation of the provided result to the
given list.
|
static void |
formatSearchResultEntry(java.util.List<java.lang.String> lines,
SearchResultEntry entry,
int maxWidth)
Updates the provided list with an LDIF representation of the provided
search result entry to the given list, preceded by comments about any
controls that may be included with the entry.
|
static void |
formatSearchResultReference(java.util.List<java.lang.String> lines,
SearchResultReference reference,
int maxWidth)
Updates the provided with with a string representation of the provided
search result reference.
|
static void |
formatUnsolicitedNotification(java.util.List<java.lang.String> lines,
ExtendedResult notification,
boolean comment,
int indent,
int maxWidth)
Adds a multi-line string representation of the provided unsolicited
notification to the given list.
|
@NotNull public static java.util.List<java.lang.String> formatResult(@NotNull LDAPResult result, boolean comment, int indent, int maxWidth)
result
- The result to be formatted.comment
- Indicates whether to prefix each line with an octothorpe
to indicate that it is a comment.indent
- The number of spaces to indent each line.maxWidth
- The maximum length of each line in characters, including
the comment prefix and indent.@NotNull public static java.util.List<java.lang.String> formatResult(@NotNull LDAPException ldapException, boolean comment, int indent, int maxWidth)
ldapException
- The exception to use to obtain the result to format.comment
- Indicates whether to prefix each line with an
octothorpe to indicate that it is a comment.indent
- The number of spaces to indent each line.maxWidth
- The maximum length of each line in characters,
including the comment prefix and indent.public static void formatResult(@NotNull java.util.List<java.lang.String> lines, @NotNull LDAPResult result, boolean comment, boolean inTxn, int indent, int maxWidth)
lines
- The list to which the lines should be added.result
- The result to be formatted.comment
- Indicates whether to prefix each line with an octothorpe
to indicate that it is a comment.inTxn
- Indicates whether the operation is part of an active
transaction.indent
- The number of spaces to indent each line.maxWidth
- The maximum length of each line in characters, including
the comment prefix and indent.public static void formatSearchResultEntry(@NotNull java.util.List<java.lang.String> lines, @NotNull SearchResultEntry entry, int maxWidth)
lines
- The list to which the formatted representation will be
added.entry
- The entry to be formatted.maxWidth
- The maximum length of each line in characters, including
any comment prefix and indent.public static void formatSearchResultReference(@NotNull java.util.List<java.lang.String> lines, @NotNull SearchResultReference reference, int maxWidth)
lines
- The list to which the formatted representation will be
added.reference
- The search result reference to be formatted.maxWidth
- The maximum length of each line in characters, including
any comment prefix and indent.public static void formatUnsolicitedNotification(@NotNull java.util.List<java.lang.String> lines, @NotNull ExtendedResult notification, boolean comment, int indent, int maxWidth)
lines
- The list to which the lines should be added.notification
- The unsolicited notification to be formatted.comment
- Indicates whether to prefix each line with an
octothorpe to indicate that it is a comment.indent
- The number of spaces to indent each line.maxWidth
- The maximum length of each line in characters,
including the comment prefix and indent.public static void formatResponseControl(@NotNull java.util.List<java.lang.String> lines, @NotNull Control c, boolean comment, int indent, int maxWidth)
lines
- The list to which the lines should be added.c
- The control to be formatted.comment
- Indicates whether to prefix each line with an octothorpe
to indicate that it is a comment.indent
- The number of spaces to indent each line.maxWidth
- The maximum length of each line in characters, including
the comment prefix and indent.