DatabaseClient via chained "with" methods for setting
each possible input allowed for connecting to and authenticating
with MarkLogic. While the DatabaseClientFactory.Bean
class is intended for use in a context such as a Spring container,
it requires that a user have already assembled the appropriate
DatabaseClientFactory.SecurityContext. This builder
instead is intended for a more dynamic environment - in particular,
one where the desired authentication strategy is not known until
runtime. A client can then collect inputs from a user at runtime
and call the appropriate methods on this builder. The builder will
handle constructing the correct
DatabaseClientFactory.SecurityContext and using that
to construct a DatabaseClient.DatabaseClientBuilder (Map<String, Object> props)build()withAuthType (String type)withBasePath (String basePath)withBasicAuth (String username, String password)withCertificateAuth (String file, String password)withCertificateAuth (SSLContext sslContext, X509TrustManager trustManager)withCertificateFile (String file)withCertificatePassword (String password)withCloudApiKey (String cloudApiKey)withCloudAuth (String apiKey, String basePath)withCloudAuth (String apiKey, String basePath, Integer tokenDuration)withCloudTokenDuration (String tokenDuration)withConnectionString (String connectionString)withDatabase (String database)withDigestAuth (String username, String password)withKerberosAuth (String principal)withKerberosPrincipal (String principal)withKeyStoreAlgorithm (String algorithm)withKeyStorePassword (String password)withKeyStorePath (String path)withKeyStoreType (String type)withOAuthToken (String token)withPassword (String password)withPort (int port)withSAMLAuth (String token)withSAMLToken (String token)withSecurityContext (DatabaseClientFactory.SecurityContext securityContext)withSSLContext (SSLContext sslContext)withSSLHostnameVerifier (DatabaseClientFactory.SSLHostnameVerifier sslHostnameVerifier)withSSLProtocol (String sslProtocol)withTrustManager (X509TrustManager trustManager)withTrustStoreAlgorithm (String algorithm)withTrustStorePassword (String password)withTrustStorePath (String path)X509TrustManager based on the given file path, which
should point to a Java key store or trust store.withTrustStoreType (String type)withUsername (String username)props -DatabaseClient based on the inputs that have
been provided via the "with" builder methods and any inputs
provided via this instance's constructorDatabaseClientFactory.Bean based on
the inputs that have been provided via the "with" builder methods
and any inputs provided via this instance's constructorconnectionString - of the form
"username:password@host:port/optionalDatabaseName".type - must be one of "basic", "digest", "cloud",
"kerberos", "certificate", or "saml"apiKey -basePath -tokenDuration - length in minutes until the
generated access token expiressslContext -trustManager -token -token -tokenDuration - length in minutes until the
generated access token expirespath -password - optional password for a key storetype - e.g. "JKS"algorithm - e.g. "SunX509"X509TrustManager based on the given file path, which
should point to a Java key store or trust store.path -password - optional password for a trust
storetype - e.g. "JKS"algorithm - e.g. "SunX509"Copyright (c) 2010-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.