@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class JoinResultControl extends Control implements DecodeableControl
JoinRequestControl
class for additional
information and an example demonstrating its use.
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.
JoinResult ::= SEQUENCE { COMPONENTS OF LDAPResult, entries [4] SEQUENCE OF JoinedEntry }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JOIN_RESULT_OID
The OID (1.3.6.1.4.1.30221.2.5.9) for the join result control.
|
Constructor and Description |
---|
JoinResultControl(java.util.List<JoinedEntry> joinResults)
Creates a new join result control indicating a successful join.
|
JoinResultControl(ResultCode resultCode,
java.lang.String diagnosticMessage,
java.lang.String matchedDN,
java.util.List<java.lang.String> referralURLs,
java.util.List<JoinedEntry> joinResults)
Creates a new join result control with the provided information.
|
JoinResultControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new join result control with the provided information.
|
Modifier and Type | Method and Description |
---|---|
JoinResultControl |
decodeControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new instance of this decodeable control from the provided
information.
|
static JoinResultControl |
decodeJSONControl(JSONObject controlObject,
boolean strict)
Attempts to decode the provided object as a JSON representation of a join
result control.
|
static JoinResultControl |
get(SearchResultEntry entry)
Extracts a join result control from the provided search result entry.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
java.lang.String |
getDiagnosticMessage()
Retrieves the diagnostic message for this join result.
|
java.util.List<JoinedEntry> |
getJoinResults()
Retrieves the set of entries that have been joined with the associated
search result entry.
|
java.lang.String |
getMatchedDN()
Retrieves the matched DN for this join result.
|
java.util.List<java.lang.String> |
getReferralURLs()
Retrieves the set of referral URLs for this join result.
|
ResultCode |
getResultCode()
Retrieves the result code for this join result.
|
JSONObject |
toJSONControl()
Retrieves a representation of this join result control as a JSON object.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
@NotNull public static final java.lang.String JOIN_RESULT_OID
public JoinResultControl(@Nullable java.util.List<JoinedEntry> joinResults)
joinResults
- The set of entries that have been joined with the
associated search result entry. It may be
null
or empty if no entries were joined with
the search result entry.public JoinResultControl(@NotNull ResultCode resultCode, @Nullable java.lang.String diagnosticMessage, @Nullable java.lang.String matchedDN, @Nullable java.util.List<java.lang.String> referralURLs, @Nullable java.util.List<JoinedEntry> joinResults)
resultCode
- The result code for the join processing. It
must not be null
.diagnosticMessage
- A message with additional information about the
result of the join processing. It may be
null
if no message is needed.matchedDN
- The matched DN for the join processing. It may
be null
if no matched DN is needed.referralURLs
- The set of referral URLs for any referrals
encountered while processing the join. It may
be null
or empty if no referral URLs
are needed.joinResults
- The set of entries that have been joined with
associated search result entry. It may be
null
or empty if no entries were joined
with the search result entry.public JoinResultControl(@NotNull java.lang.String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided control cannot be decoded as an
account usable response control.@NotNull public ResultCode getResultCode()
@Nullable public java.lang.String getDiagnosticMessage()
null
if
there is no diagnostic message.@Nullable public java.lang.String getMatchedDN()
null
if there is
no matched DN.@NotNull public java.util.List<java.lang.String> getReferralURLs()
@NotNull public java.util.List<JoinedEntry> getJoinResults()
@NotNull public JoinResultControl decodeControl(@NotNull java.lang.String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException
decodeControl
in interface DecodeableControl
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided information cannot be decoded as a
valid instance of this decodeable control.@Nullable public static JoinResultControl get(@NotNull SearchResultEntry entry) throws LDAPException
entry
- The search result entry from which to retrieve the join
result control.null
if the entry did not contain a join result
control.LDAPException
- If a problem is encountered while attempting to
decode the join result control contained in the
provided search result entry.@NotNull public java.lang.String getControlName()
getControlName
in class Control
@NotNull public JSONObject toJSONControl()
oid
-- A mandatory string field whose value is the object
identifier for this control. For the join result control, the OID is
"1.3.6.1.4.1.30221.2.5.9".
control-name
-- An optional string field whose value is a
human-readable name for this control. This field is only intended for
descriptive purposes, and when decoding a control, the oid
field should be used to identify the type of control.
criticality
-- A mandatory Boolean field used to indicate
whether this control is considered critical.
value-base64
-- An optional string field whose value is a
base64-encoded representation of the raw value for this join result
control. Exactly one of the value-base64
and
value-json
fields must be present.
value-json
-- An optional JSON object field whose value is a
user-friendly representation of the value for this join result control.
Exactly one of the value-base64
and value-json
fields
must be present, and if the value-json
field is used, then it
will use the following fields:
result-code
-- An integer field whose value is the numeric
representation of the LDAP result code for join processing.
matched-dn
-- An optional string field whose value is the
matched DN for the join processing.
diagnostic-message
-- An optional string field whose value
is a diagnostic message with additional information about the join
processing.
referral-urls
-- An optional array field whose values are
strings that represent referral URLs encountered while performing
join processing.
joined-entries
-- An array field whose values are JSON
objects that reference entries that were joined with the source
entry. Each of these JSON objects will include a
"_dn
" string field whose value is the DN of the entry and
an optional "_nested-join-results
" array field whose values
are JSON objects that represent nested join results. Any other
fields in the JSON objects represent attributes in the joined
entry, with the name of the field representing the name of the
attribute, and the value of the field being an array of strings
representing the values of that attribute.
toJSONControl
in class Control
@NotNull public static JoinResultControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException
controlObject
- The JSON object to be decoded. It must not be
null
.strict
- Indicates whether to use strict mode when decoding
the provided JSON object. If this is true
,
then this method will throw an exception if the
provided JSON object contains any unrecognized
fields. If this is false
, then unrecognized
fields will be ignored.LDAPException
- If the provided JSON object cannot be parsed as a
valid join result control.