@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 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, toString, writeTo
public static final java.lang.String JOIN_REQUEST_OID
public JoinRequestControl(JoinRequestValue joinRequestValue)
joinRequestValue
- The join request value to use for this control.public JoinRequestControl(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.public JoinRequestValue getJoinRequestValue()
public java.lang.String getControlName()
getControlName
in class Control