@@ -350,52 +350,113 @@ public SecurityContext withSSLContext(SSLContext context, X509TrustManager trust
350350
351351 /**
352352 * @since 6.1.0
353+ * @deprecated as of 7.2.0; use {@code ProgressDataCloudAuthContext} instead. Will be removed in 8.0.0.
353354 */
354- public static class MarkLogicCloudAuthContext extends AuthContext {
355+ @ Deprecated
356+ public static class MarkLogicCloudAuthContext extends ProgressDataCloudAuthContext {
357+
358+ /**
359+ * @param apiKey user's API key for accessing Progress Data Cloud
360+ */
361+ public MarkLogicCloudAuthContext (String apiKey ) {
362+ super (apiKey );
363+ }
364+
365+ /**
366+ * @param apiKey user's API key for accessing Progress Data Cloud
367+ * @param tokenDuration length in minutes until the generated access token expires
368+ * @since 6.3.0
369+ */
370+ public MarkLogicCloudAuthContext (String apiKey , Integer tokenDuration ) {
371+ super (apiKey , tokenDuration );
372+ }
373+
374+ /**
375+ * Only intended to be used in the scenario that the token endpoint of "/token" and the grant type of "apikey"
376+ * are not the intended values.
377+ *
378+ * @param apiKey user's API key for accessing Progress Data Cloud
379+ * @param tokenEndpoint for overriding the default token endpoint if necessary
380+ * @param grantType for overriding the default grant type if necessary
381+ */
382+ public MarkLogicCloudAuthContext (String apiKey , String tokenEndpoint , String grantType ) {
383+ super (apiKey , tokenEndpoint , grantType );
384+ }
385+
386+ /**
387+ * Only intended to be used in the scenario that the token endpoint of "/token" and the grant type of "apikey"
388+ * are not the intended values.
389+ *
390+ * @param apiKey user's API key for accessing Progress Data Cloud
391+ * @param tokenEndpoint for overriding the default token endpoint if necessary
392+ * @param grantType for overriding the default grant type if necessary
393+ * @param tokenDuration length in minutes until the generated access token expires
394+ * @since 6.3.0
395+ */
396+ public MarkLogicCloudAuthContext (String apiKey , String tokenEndpoint , String grantType , Integer tokenDuration ) {
397+ super (apiKey , tokenEndpoint , grantType , tokenDuration );
398+ }
399+
400+ @ Override
401+ public MarkLogicCloudAuthContext withSSLContext (SSLContext context , X509TrustManager trustManager ) {
402+ this .sslContext = context ;
403+ this .trustManager = trustManager ;
404+ return this ;
405+ }
406+
407+ @ Override
408+ public MarkLogicCloudAuthContext withSSLHostnameVerifier (SSLHostnameVerifier verifier ) {
409+ this .sslVerifier = verifier ;
410+ return this ;
411+ }
412+ }
413+
414+ /**
415+ * @since 7.2.0 Use this instead of the now-deprecated {@code MarkLogicCloudAuthContext}
416+ */
417+ public static class ProgressDataCloudAuthContext extends AuthContext {
355418 private String tokenEndpoint ;
356419 private String grantType ;
357420 private String apiKey ;
358421 private Integer tokenDuration ;
359422
360423 /**
361- * @param apiKey user's API key for accessing MarkLogic Cloud
424+ * @param apiKey user's API key for accessing Progress Data Cloud
362425 */
363- public MarkLogicCloudAuthContext (String apiKey ) {
426+ public ProgressDataCloudAuthContext (String apiKey ) {
364427 this (apiKey , null );
365428 }
366429
367430 /**
368- * @param apiKey user's API key for accessing MarkLogic Cloud
431+ * @param apiKey user's API key for accessing Progress Data Cloud
369432 * @param tokenDuration length in minutes until the generated access token expires
370- * @since 6.3.0
371433 */
372- public MarkLogicCloudAuthContext (String apiKey , Integer tokenDuration ) {
434+ public ProgressDataCloudAuthContext (String apiKey , Integer tokenDuration ) {
373435 this (apiKey , "/token" , "apikey" , tokenDuration );
374436 }
375437
376438 /**
377439 * Only intended to be used in the scenario that the token endpoint of "/token" and the grant type of "apikey"
378440 * are not the intended values.
379441 *
380- * @param apiKey user's API key for accessing MarkLogic Cloud
442+ * @param apiKey user's API key for accessing Progress Data Cloud
381443 * @param tokenEndpoint for overriding the default token endpoint if necessary
382444 * @param grantType for overriding the default grant type if necessary
383445 */
384- public MarkLogicCloudAuthContext (String apiKey , String tokenEndpoint , String grantType ) {
446+ public ProgressDataCloudAuthContext (String apiKey , String tokenEndpoint , String grantType ) {
385447 this (apiKey , tokenEndpoint , grantType , null );
386448 }
387449
388450 /**
389451 * Only intended to be used in the scenario that the token endpoint of "/token" and the grant type of "apikey"
390452 * are not the intended values.
391453 *
392- * @param apiKey user's API key for accessing MarkLogic Cloud
454+ * @param apiKey user's API key for accessing Progress Data Cloud
393455 * @param tokenEndpoint for overriding the default token endpoint if necessary
394456 * @param grantType for overriding the default grant type if necessary
395457 * @param tokenDuration length in minutes until the generated access token expires
396- * @since 6.3.0
397458 */
398- public MarkLogicCloudAuthContext (String apiKey , String tokenEndpoint , String grantType , Integer tokenDuration ) {
459+ public ProgressDataCloudAuthContext (String apiKey , String tokenEndpoint , String grantType , Integer tokenDuration ) {
399460 this .apiKey = apiKey ;
400461 this .tokenEndpoint = tokenEndpoint ;
401462 this .grantType = grantType ;
@@ -414,23 +475,19 @@ public String getApiKey() {
414475 return apiKey ;
415476 }
416477
417- /**
418- * @return
419- * @since 6.3.0
420- */
421478 public Integer getTokenDuration () {
422479 return tokenDuration ;
423480 }
424481
425482 @ Override
426- public MarkLogicCloudAuthContext withSSLContext (SSLContext context , X509TrustManager trustManager ) {
483+ public ProgressDataCloudAuthContext withSSLContext (SSLContext context , X509TrustManager trustManager ) {
427484 this .sslContext = context ;
428485 this .trustManager = trustManager ;
429486 return this ;
430487 }
431488
432489 @ Override
433- public MarkLogicCloudAuthContext withSSLHostnameVerifier (SSLHostnameVerifier verifier ) {
490+ public ProgressDataCloudAuthContext withSSLHostnameVerifier (SSLHostnameVerifier verifier ) {
434491 this .sslVerifier = verifier ;
435492 return this ;
436493 }
@@ -1277,10 +1334,10 @@ static public DatabaseClient newClient(String host, int port, String basePath, S
12771334 DatabaseClient .ConnectionType connectionType ) {
12781335 RESTServices services = new OkHttpServices ();
12791336 // As of 6.1.0, the following optimization is made as it's guaranteed that if the user is connecting to a
1280- // MarkLogic Cloud instance, then port 443 will be used. Every path for constructing a DatabaseClient goes through
1337+ // Progress Data Cloud instance, then port 443 will be used. Every path for constructing a DatabaseClient goes through
12811338 // this method, ensuring that this optimization will always be applied, and thus freeing the user from having to
1282- // worry about what port to configure when using MarkLogic Cloud.
1283- if (securityContext instanceof MarkLogicCloudAuthContext ) {
1339+ // worry about what port to configure when using Progress Data Cloud.
1340+ if (securityContext instanceof MarkLogicCloudAuthContext || securityContext instanceof ProgressDataCloudAuthContext ) {
12841341 port = 443 ;
12851342 }
12861343 services .connect (host , port , basePath , database , securityContext );
0 commit comments