@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class JoinRequestControl extends Control
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.
JoinRequestValue
class.
SearchRequest searchRequest = new SearchRequest( "ou=People,dc=example,dc=com", SearchScope.SUB, Filter.createEqualityFilter("uid", userID)); searchRequest.addControl(new JoinRequestControl(new JoinRequestValue( JoinRule.createEqualityJoin("accountNumber", "accountNumber", false), JoinBaseDN.createUseCustomBaseDN("ou=Accounts,dc=example,dc=com"), SearchScope.SUB, DereferencePolicy.NEVER, null, Filter.createEqualityFilter("objectClass", "accountEntry"), new String[0], false, null))); SearchResult searchResult = connection.search(searchRequest); for (SearchResultEntry userEntry : searchResult.getSearchEntries()) { JoinResultControl c = JoinResultControl.get(userEntry); for (JoinedEntry accountEntry : c.getJoinResults()) { // User userEntry was joined with account accountEntry } }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JOIN_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.9) for the join request control.
|
Constructor and Description |
---|
JoinRequestControl(Control control)
Creates a new join request control which is decoded from the provided
generic control.
|
JoinRequestControl(JoinRequestValue joinRequestValue)
Creates a new join request control with the provided join request value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
JoinRequestValue |
getJoinRequestValue()
Retrieves the join request value for this join request control.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
@NotNull public static final java.lang.String JOIN_REQUEST_OID
public JoinRequestControl(@NotNull JoinRequestValue joinRequestValue)
joinRequestValue
- The join request value to use for this control.public JoinRequestControl(@NotNull Control control) throws LDAPException
control
- The generic control to be decoded as a join request
control.LDAPException
- If the provided control cannot be decoded as a
virtual attributes only request control.@NotNull public JoinRequestValue getJoinRequestValue()
@NotNull public java.lang.String getControlName()
getControlName
in class Control