Package com.nimbusds.common.ldap
Class LDAPControlRequestParser
- java.lang.Object
-
- com.nimbusds.common.ldap.LDAPControlRequestParser
-
public class LDAPControlRequestParser extends Object
LDAP control request parser. Provides parsing of JSON-based requests for the following controls:- Server-side-sort request control (RFC 2891).
- Simple paged results control (RFC 2696).
- Virtual list view control (draft-ietf-ldapext-ldapv3-vlv)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.unboundid.ldap.sdk.controls.ServerSideSortRequestControl
parseServerSideSortRequestControl(List<Object> sortParams)
Parses a JSON array (java.util.List) representing a server-side sort (RFC 2891) request.static com.unboundid.ldap.sdk.controls.SimplePagedResultsControl
parseSimplePagedResultsControl(Map<String,Object> pageParams)
Parses a JSON object (java.util.Map) representing a simple paged results (RFC 2696) request.static com.unboundid.ldap.sdk.controls.VirtualListViewRequestControl
parseVirtualListViewControl(Map<String,Object> vlvParams)
Parses a JSON object (java.util.Map) representing a virtual list view (draft-ietf-ldapext-ldapv3-vlv-09) request.
-
-
-
Method Detail
-
parseServerSideSortRequestControl
public static com.unboundid.ldap.sdk.controls.ServerSideSortRequestControl parseServerSideSortRequestControl(List<Object> sortParams) throws com.thetransactioncompany.jsonrpc2.JSONRPC2Error
Parses a JSON array (java.util.List) representing a server-side sort (RFC 2891) request.Example:
[ { "key" : "sn", "reverseOrder" : false, "orderingRule" : null }, { "key" : "givenName", "reverseOrder" : false, "orderingRule" : null } ]
- Parameters:
sortParams
- JSON array of JSON objects with properties "key" (mandatory string), "reverseOrder" (optional boolean, defaults to false) and "orderingRule" (optional string, defaults to null). Ifnull
no control is requested.- Returns:
- The resulting server-side sort request control or
null
if none is requested. - Throws:
com.thetransactioncompany.jsonrpc2.JSONRPC2Error
- If the parameters are invalid.
-
parseSimplePagedResultsControl
public static com.unboundid.ldap.sdk.controls.SimplePagedResultsControl parseSimplePagedResultsControl(Map<String,Object> pageParams) throws com.thetransactioncompany.jsonrpc2.JSONRPC2Error
Parses a JSON object (java.util.Map) representing a simple paged results (RFC 2696) request.Example:
{ "size" : 25, "cookie" : "AAAAAAAAABw=" }
- Parameters:
pageParams
- JSON object with properties "size" (mandatory integer, must be positive) and "cookie" (optional BASE64 - encoded string, defaults to empty string). Ifnull
no control is requested.- Returns:
- The resulting simple paged results control or
null
if none is requested. - Throws:
com.thetransactioncompany.jsonrpc2.JSONRPC2Error
- If the parameters are invalid.
-
parseVirtualListViewControl
public static com.unboundid.ldap.sdk.controls.VirtualListViewRequestControl parseVirtualListViewControl(Map<String,Object> vlvParams) throws com.thetransactioncompany.jsonrpc2.JSONRPC2Error
Parses a JSON object (java.util.Map) representing a virtual list view (draft-ietf-ldapext-ldapv3-vlv-09) request.Minimally specified example:
{ "after" : 9 }
Fully specified example:
{ "offset" : 11, "before" : 0, "after" : 9, "totalEntryCount" : 123, "cookie" : "AAAAAAAAABw=" }
- Parameters:
vlvParams
- JSON object with properties "offset" (optional integer, must be positive, defaults to one), "before" (optional integer, must be zero or positive, defaults to zero), "after" (mandatory integer, must be zero or positive), "totalEntryCount" (optional integer, must be zero or positive, defaults to zero) and "cookie" (optional BASE64 - encoded string, defaults to empty string). Ifnull
no control is requested.- Returns:
- The resulting virtual list view control or
null
if none is requested. - Throws:
com.thetransactioncompany.jsonrpc2.JSONRPC2Error
- If the parameters are invalid.
-
-