Class AttributesForRetrieval

java.lang.Object
com.nimbusds.common.ldap.AttributesForRetrieval

public class AttributesForRetrieval extends Object
Specifies a set of directory attributes for retrieval. They are grouped into two subsets:
  • Attributes treated as text and encoded as UTF-8.
  • Attributes treated as binary and encoded in Base64.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a default specification of attributes for retrieval which is retrieve all user attributes as UTF-8 text.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the names of the attributes to retrieve as binary (Base64 encoded).
    Retrieves the specification of the attributes (UTF-8 text and binary) for retrieval for an LDAP get entry/search request.
    void
    parse(com.thetransactioncompany.jsonrpc2.util.NamedParamsRetriever params)
    Parses an "attributes" and a "binaryAttributes" specification from the given named JSON-RPC parameters.
    static String[]
    parseValues(String paramName, com.thetransactioncompany.jsonrpc2.util.NamedParamsRetriever params)
    Parses a JSON-RPC 2.0 parameter representing a set of string values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AttributesForRetrieval

      Creates a default specification of attributes for retrieval which is retrieve all user attributes as UTF-8 text.
  • Method Details

    • getBinaryAttributes

      Gets the names of the attributes to retrieve as binary (Base64 encoded).
      Returns:
      The names (normalised to lower case) of the attributes to retrieve as binary, empty set if none.
    • getSpec

      public String[] getSpec()
      Retrieves the specification of the attributes (UTF-8 text and binary) for retrieval for an LDAP get entry/search request.
      Returns:
      The attributes for retrieval, null for all.
    • parseValues

      public static String[] parseValues(String paramName, com.thetransactioncompany.jsonrpc2.util.NamedParamsRetriever params) throws com.thetransactioncompany.jsonrpc2.JSONRPC2Error
      Parses a JSON-RPC 2.0 parameter representing a set of string values. This can be a space/comma delimited JSON string, a JSON array of strings or undefined to signify no specific parameters.
      Parameters:
      paramName - The parameter name. Must not be null.
      params - The named parameters to parse. Must not be null.
      Returns:
      The values, empty array if none/undefined.
      Throws:
      com.thetransactioncompany.jsonrpc2.JSONRPC2Error - If parsing failed (INVALID_PARAMS).
    • parse

      public void parse(com.thetransactioncompany.jsonrpc2.util.NamedParamsRetriever params) throws com.thetransactioncompany.jsonrpc2.JSONRPC2Error
      Parses an "attributes" and a "binaryAttributes" specification from the given named JSON-RPC parameters.
      Parameters:
      params - The named parameters to parse. Must not be null.
      Throws:
      com.thetransactioncompany.jsonrpc2.JSONRPC2Error - If parsing failed (INVALID_PARAMS).