public final class Rest2LdapJsonConfigurator extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.forgerock.opendj.ldap.ConnectionFactory |
configureConnectionFactory(org.forgerock.json.JsonValue configuration,
String name,
TrustManager trustManager,
X509KeyManager keyManager)
Creates a new connection factory using the named configuration in the provided JSON list of factory
configurations.
|
static org.forgerock.opendj.ldap.ConnectionFactory |
configureConnectionFactory(org.forgerock.json.JsonValue configuration,
String name,
TrustManager trustManager,
X509KeyManager keyManager,
ClassLoader providerClassLoader)
Creates a new connection factory using the named configuration in the provided JSON list of factory
configurations.
|
static org.forgerock.json.resource.RequestHandler |
configureEndpoint(File endpointDirectory,
org.forgerock.util.Options options)
Creates a new CREST
RequestHandler representing a single endpoint whose configuration is defined in the
provided endpointDirectory parameter. |
static org.forgerock.json.resource.Router |
configureEndpoints(File endpointsDirectory,
org.forgerock.util.Options options)
Creates a new CREST
Router using the provided endpoints configuration directory and Rest2Ldap options. |
static X509KeyManager |
configureKeyManager(org.forgerock.json.JsonValue configuration)
Configures a
X509KeyManager using the provided JSON configuration. |
static org.forgerock.util.Options |
configureOptions(org.forgerock.json.JsonValue config)
Parses Rest2Ldap configuration options.
|
static List<Resource> |
configureResources(org.forgerock.json.JsonValue config)
Parses a list of Rest2Ldap resource definitions.
|
static TrustManager |
configureTrustManager(org.forgerock.json.JsonValue configuration)
Configures a
TrustManager using the provided JSON configuration. |
public static org.forgerock.util.Options configureOptions(org.forgerock.json.JsonValue config)
{
"readOnUpdatePolicy": "controls",
"useSubtreeDelete": true,
"usePermissiveModify": true,
"useMvcc": true
"mvccAttribute": "etag"
}
See the sample configuration file for a detailed description of its content.
config - The JSON configuration.IllegalArgumentException - If the configuration is invalid.public static List<Resource> configureResources(org.forgerock.json.JsonValue config)
"top": {
"isAbstract": true,
"properties": {
"_rev": {
"type": "simple"
"ldapAttribute": "etag",
"writability": "readOnly"
},
...
},
...
},
...
See the sample configuration file for a detailed description of its content.
config - The JSON configuration.IllegalArgumentException - If the configuration is invalid.public static org.forgerock.json.resource.Router configureEndpoints(File endpointsDirectory, org.forgerock.util.Options options) throws IOException
Router using the provided endpoints configuration directory and Rest2Ldap options.
The Rest2Ldap configuration typically has the following structure on disk:
endpointsDirectory - The directory representing the Rest2Ldap "endpoints" directory.options - The Rest2Ldap configuration options.Router configured using the provided options and endpoints.IOException - If the endpoints configuration cannot be read.IllegalArgumentException - If the configuration is invalid.public static org.forgerock.json.resource.RequestHandler configureEndpoint(File endpointDirectory, org.forgerock.util.Options options) throws IOException
RequestHandler representing a single endpoint whose configuration is defined in the
provided endpointDirectory parameter. The directory should contain a separate file for each supported
version of the REST endpoint. The name of the file, excluding the suffix, identifies the resource definition
which acts as the entry point into the endpoint.endpointDirectory - The directory containing the endpoint's resource definitions, e.g.
rest2ldap/routes/api would contain definitions for the "api" endpoint.options - The Rest2Ldap configuration options.RequestHandler configured using the provided options and endpoint mappings.IOException - If the endpoint configuration cannot be read.IllegalArgumentException - If the configuration is invalid.public static X509KeyManager configureKeyManager(org.forgerock.json.JsonValue configuration)
X509KeyManager using the provided JSON configuration.configuration - The JSON object containing the key manager configuration.public static TrustManager configureTrustManager(org.forgerock.json.JsonValue configuration)
TrustManager using the provided JSON configuration.configuration - The JSON object containing the trust manager configuration.public static org.forgerock.opendj.ldap.ConnectionFactory configureConnectionFactory(org.forgerock.json.JsonValue configuration,
String name,
TrustManager trustManager,
X509KeyManager keyManager,
ClassLoader providerClassLoader)
configuration - The JSON configuration.name - The name of the connection factory configuration to be parsed.trustManager - The trust manager to use for secure connection. Can be null
to use the default JVM trust manager.keyManager - The key manager to use for secure connection. Can be null
to use the default JVM key manager.providerClassLoader - The ClassLoader used to fetch the TransportProvider. This
can be useful in OSGI environments.IllegalArgumentException - If the configuration is invalid.public static org.forgerock.opendj.ldap.ConnectionFactory configureConnectionFactory(org.forgerock.json.JsonValue configuration,
String name,
TrustManager trustManager,
X509KeyManager keyManager)
configuration - The JSON configuration.name - The name of the connection factory configuration to be parsed.trustManager - The trust manager to use for secure connection. Can be null
to use the default JVM trust manager.keyManager - The key manager to use for secure connection. Can be null
to use the default JVM key manager.IllegalArgumentException - If the configuration is invalid.Copyright © 2017-2020 Wren Security. All Rights Reserved.