Class JoinResultControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.unboundidds.controls.JoinResultControl
- All Implemented Interfaces:
DecodeableControl,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class JoinResultControl
extends Control
implements DecodeableControl
This class provides an implementation of a control that may be included in a
search result entry in response to a join request control to provide a set of
entries related to the search result entry. See the class-level
documentation for the
The value of the join result control is encoded as follows:
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.
The value of the join result control is encoded as follows:
JoinResult ::= SEQUENCE {
COMPONENTS OF LDAPResult,
entries [4] SEQUENCE OF JoinedEntry }
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.30221.2.5.9) for the join result control. -
Constructor Summary
ConstructorsConstructorDescriptionJoinResultControl(ResultCode resultCode, String diagnosticMessage, String matchedDN, List<String> referralURLs, List<JoinedEntry> joinResults) Creates a new join result control with the provided information.JoinResultControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new join result control with the provided information.JoinResultControl(List<JoinedEntry> joinResults) Creates a new join result control indicating a successful join. -
Method Summary
Modifier and TypeMethodDescriptiondecodeControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new instance of this decodeable control from the provided information.static JoinResultControldecodeJSONControl(JSONObject controlObject, boolean strict) Attempts to decode the provided object as a JSON representation of a join result control.static JoinResultControlget(SearchResultEntry entry) Extracts a join result control from the provided search result entry.Retrieves the user-friendly name for this control, if available.Retrieves the diagnostic message for this join result.Retrieves the set of entries that have been joined with the associated search result entry.Retrieves the matched DN for this join result.Retrieves the set of referral URLs for this join result.Retrieves the result code for this join result.Retrieves a representation of this join result control as a JSON object.voidtoString(StringBuilder buffer) Appends a string representation of this LDAP control to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.Control
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
-
Field Details
-
JOIN_RESULT_OID
The OID (1.3.6.1.4.1.30221.2.5.9) for the join result control.- See Also:
-
-
Constructor Details
-
JoinResultControl
Creates a new join result control indicating a successful join.- Parameters:
joinResults- The set of entries that have been joined with the associated search result entry. It may benullor empty if no entries were joined with the search result entry.
-
JoinResultControl
public JoinResultControl(@NotNull ResultCode resultCode, @Nullable String diagnosticMessage, @Nullable String matchedDN, @Nullable List<String> referralURLs, @Nullable List<JoinedEntry> joinResults) Creates a new join result control with the provided information.- Parameters:
resultCode- The result code for the join processing. It must not benull.diagnosticMessage- A message with additional information about the result of the join processing. It may benullif no message is needed.matchedDN- The matched DN for the join processing. It may benullif no matched DN is needed.referralURLs- The set of referral URLs for any referrals encountered while processing the join. It may benullor empty if no referral URLs are needed.joinResults- The set of entries that have been joined with associated search result entry. It may benullor empty if no entries were joined with the search result entry.
-
JoinResultControl
public JoinResultControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new join result control with the provided information.- Parameters:
oid- The OID for the control.isCritical- Indicates whether the control should be marked critical.value- The encoded value for the control. This may benullif no value was provided.- Throws:
LDAPException- If the provided control cannot be decoded as an account usable response control.
-
-
Method Details
-
getResultCode
Retrieves the result code for this join result.- Returns:
- The result code for this join result.
-
getDiagnosticMessage
Retrieves the diagnostic message for this join result.- Returns:
- The diagnostic message for this join result, or
nullif there is no diagnostic message.
-
getMatchedDN
Retrieves the matched DN for this join result.- Returns:
- The matched DN for this join result, or
nullif there is no matched DN.
-
getReferralURLs
Retrieves the set of referral URLs for this join result.- Returns:
- The set of referral URLs for this join result, or an empty list if there are no referral URLs.
-
getJoinResults
Retrieves the set of entries that have been joined with the associated search result entry.- Returns:
- The set of entries that have been joined with the associated search result entry.
-
decodeControl
@NotNull public JoinResultControl decodeControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new instance of this decodeable control from the provided information.- Specified by:
decodeControlin interfaceDecodeableControl- Parameters:
oid- The OID for the control.isCritical- Indicates whether the control should be marked critical.value- The encoded value for the control. This may benullif no value was provided.- Returns:
- The decoded representation of this control.
- Throws:
LDAPException- If the provided information cannot be decoded as a valid instance of this decodeable control.
-
get
@Nullable public static JoinResultControl get(@NotNull SearchResultEntry entry) throws LDAPException Extracts a join result control from the provided search result entry.- Parameters:
entry- The search result entry from which to retrieve the join result control.- Returns:
- The join result control contained in the provided search result
entry, or
nullif the entry did not contain a join result control. - Throws:
LDAPException- If a problem is encountered while attempting to decode the join result control contained in the provided search result entry.
-
getControlName
Retrieves the user-friendly name for this control, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getControlNamein classControl- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
toJSONControl
Retrieves a representation of this join result control as a JSON object. The JSON object uses the following fields:-
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, theoidfield 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 thevalue-base64andvalue-jsonfields 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 thevalue-base64andvalue-jsonfields must be present, and if thevalue-jsonfield 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.
-
- Overrides:
toJSONControlin classControl- Returns:
- A JSON object that contains a representation of this control.
-
-
decodeJSONControl
@NotNull public static JoinResultControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException Attempts to decode the provided object as a JSON representation of a join result control.- Parameters:
controlObject- The JSON object to be decoded. It must not benull.strict- Indicates whether to use strict mode when decoding the provided JSON object. If this istrue, then this method will throw an exception if the provided JSON object contains any unrecognized fields. If this isfalse, then unrecognized fields will be ignored.- Returns:
- The join result control that was decoded from the provided JSON object.
- Throws:
LDAPException- If the provided JSON object cannot be parsed as a valid join result control.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-