Class Hdap
java.lang.Object
org.forgerock.opendj.hdap.Hdap
Lightweight REST API providing native LDAP capabilities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Option<DecodeOptions> Specifies the LDAP decoding options which should be used when decoding LDAP DNs, attribute types, and controls.Specifies whether the LDAP schema should be loaded from the LDAP server before being able to serve requests.Specifies whether HDAP should normalize attribute names in the JSON representation of the resource, or use the name provided in the request.Specifies whether hdap should represent missing JSON property values usingnull.static final Option<ScheduledExecutorService> Specifies the scheduler which will be used for periodically detecting changes to LDAP schema.Specifies the interval between successive attempts to detect changes in LDAP schema.Specifies the interval between failed attempts to load the remote schema. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceExceptionAdapts aThrowableto aResourceException.static DndnOf(ResourcePath resourcePath, SchemaResolver schemaResolver) Decodes the provided URL encoded resource path as a DN.static RequestHandlernewHdapRequestHandler(Options options) Creates a new HDAP request handler with the provided options.
-
Field Details
-
LOAD_SCHEMA
-
NORMALIZE_ATTRIBUTE_NAMES
-
SCHEMA_RETRY_INTERVAL
-
SCHEMA_RELOAD_INTERVAL
-
SCHEDULER
Specifies the scheduler which will be used for periodically detecting changes to LDAP schema. A system-wide scheduler will be used by default. -
DECODE_OPTIONS
Specifies the LDAP decoding options which should be used when decoding LDAP DNs, attribute types, and controls. By default hdap will use a set of options of will always use the default schema. -
RETURN_NULL_FOR_MISSING_PROPERTIES
-
-
Method Details
-
newHdapRequestHandler
Creates a new HDAP request handler with the provided options.- Parameters:
options- The options.- Returns:
- The HDAP request handler.
-
dnOf
public static Dn dnOf(ResourcePath resourcePath, SchemaResolver schemaResolver) throws BadRequestException Decodes the provided URL encoded resource path as a DN. The resource path is the big-endian representation of the DN where each RDN is encoded as a separate path element. For example, the DNou=people,dc=example,dc=comwill be encoded asdc=com/dc=example/ou=people.- Parameters:
resourcePath- The URL encoded resource path.schemaResolver- TheSchemaResolverused to compute the DN.- Returns:
- the DN representation of the resource path.
- Throws:
BadRequestException- whenever the resource path does not represent a DN.
-
asResourceException
Adapts aThrowableto aResourceException. If theThrowableis an LDAPLdapExceptionthen an appropriateResourceExceptionis returned, otherwise anInternalServerErrorExceptionis returned.- Parameters:
t- TheThrowableto be converted.- Returns:
- The equivalent resource exception.
-