public class LdapSortControl
extends netscape.ldap.controls.LDAPSortControl
implements javax.naming.ldap.Control
When constructing an LDAPSortControl object, you can
specify the order in which you want the results sorted.
You can also specify whether or not this control is critical
to the search operation.
To specify the sort order, you construct an LdapSortKey
object and pass it to the LdapSortControl constructor.
The LdapSortKey object represents a list of the attribute
types used for sorting (a "sort key list").
The LDAP server sends back a sort response control to indicate
the result of the sorting operation. (The OID for this control
is 1.2.840.113556.1.4.474.)
LdapSortKey,
LdapSortResponseControl,
Serialized Form| Constructor and Description |
|---|
LdapSortControl(LdapSortKey[] keys,
boolean critical)
Constructs an
LDAPSortControl object with an array of
sorting keys. |
LdapSortControl(LdapSortKey key,
boolean critical)
Constructs an
LDAPSortControl object with a single
sorting key. |
LdapSortControl(java.lang.String[] keys,
boolean critical)
Constructs an
LDAPSortControl object with an array of
sorting keys. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getEncodedValue()
Retrieves the ASN.1 BER encoded value of the LDAP control.
|
getFailedAttribute, getResultCode, parseResponse, toStringclone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, registerpublic LdapSortControl(LdapSortKey key, boolean critical)
LDAPSortControl object with a single
sorting key.key - A single attribute to sort by.critical - true if the LDAP operation should be
discarded when the server does not support this control (in other
words, this control is critical to the LDAP operation).LdapSortKeypublic LdapSortControl(LdapSortKey[] keys, boolean critical)
LDAPSortControl object with an array of
sorting keys.keys - The attributes to sort by.critical - true if the LDAP operation should be
discarded when the server does not support this control (in other
words, this control is critical to the LDAP operation).LdapSortKeypublic LdapSortControl(java.lang.String[] keys,
boolean critical)
LDAPSortControl object with an array of
sorting keys.keys - The attributes to sort by.critical - true if the LDAP operation should be
discarded when the server does not support this control (in other
words, this control is critical to the LDAP operation).LdapSortKeypublic byte[] getEncodedValue()
getEncodedValue in interface javax.naming.ldap.Control