Class JoinResultControl

  • All Implemented Interfaces:
    DecodeableControl, java.io.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 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:
    Serialized Form
    • Constructor Detail

      • JoinResultControl

        public JoinResultControl​(@Nullable
                                 java.util.List<JoinedEntry> joinResults)
        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 be null or empty if no entries were joined with the search result entry.
      • JoinResultControl

        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)
        Creates a new join result control with the provided information.
        Parameters:
        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.
      • JoinResultControl

        public JoinResultControl​(@NotNull
                                 java.lang.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 be null if no value was provided.
        Throws:
        LDAPException - If the provided control cannot be decoded as an account usable response control.
    • Method Detail

      • getResultCode

        @NotNull
        public ResultCode getResultCode()
        Retrieves the result code for this join result.
        Returns:
        The result code for this join result.
      • getDiagnosticMessage

        @Nullable
        public java.lang.String getDiagnosticMessage()
        Retrieves the diagnostic message for this join result.
        Returns:
        The diagnostic message for this join result, or null if there is no diagnostic message.
      • getMatchedDN

        @Nullable
        public java.lang.String getMatchedDN()
        Retrieves the matched DN for this join result.
        Returns:
        The matched DN for this join result, or null if there is no matched DN.
      • getReferralURLs

        @NotNull
        public java.util.List<java.lang.String> 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

        @NotNull
        public java.util.List<JoinedEntrygetJoinResults()
        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
                                               java.lang.String oid,
                                               boolean isCritical,
                                               @Nullable
                                               ASN1OctetString value)
                                        throws LDAPException
        Creates a new instance of this decodeable control from the provided information.
        Specified by:
        decodeControl in interface DecodeableControl
        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 be null if 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 null if 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

        @NotNull
        public java.lang.String 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:
        getControlName in class Control
        Returns:
        The user-friendly name for this control, or the OID if no user-friendly name is available.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this LDAP control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which to append the string representation of this buffer.