Skip to content

Commit 5cec109

Browse files
Update deprecations.
1 parent 881f802 commit 5cec109

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

core-api/src/main/java/com/optimizely/ab/Optimizely.java

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@ public void track(@Nonnull String eventName,
372372
* @return True if the feature is enabled.
373373
* False if the feature is disabled.
374374
* False if the feature is not found.
375+
*
376+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
375377
*/
378+
@Deprecated
376379
@Nonnull
377380
public Boolean isFeatureEnabled(@Nonnull String featureKey,
378381
@Nonnull String userId) {
@@ -389,7 +392,10 @@ public Boolean isFeatureEnabled(@Nonnull String featureKey,
389392
* @return True if the feature is enabled.
390393
* False if the feature is disabled.
391394
* False if the feature is not found.
395+
*
396+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
392397
*/
398+
@Deprecated
393399
@Nonnull
394400
public Boolean isFeatureEnabled(@Nonnull String featureKey,
395401
@Nonnull String userId,
@@ -403,6 +409,11 @@ public Boolean isFeatureEnabled(@Nonnull String featureKey,
403409
return isFeatureEnabled(projectConfig, featureKey, userId, attributes);
404410
}
405411

412+
/**
413+
*
414+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
415+
*/
416+
@Deprecated
406417
@Nonnull
407418
private Boolean isFeatureEnabled(@Nonnull ProjectConfig projectConfig,
408419
@Nonnull String featureKey,
@@ -494,7 +505,12 @@ public Boolean getFeatureVariableBoolean(@Nonnull String featureKey,
494505
* @param attributes The user's attributes.
495506
* @return The Boolean value of the boolean single variable feature.
496507
* Null if the feature or variable could not be found.
508+
*
509+
*
510+
*
511+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
497512
*/
513+
@Deprecated
498514
@Nullable
499515
public Boolean getFeatureVariableBoolean(@Nonnull String featureKey,
500516
@Nonnull String variableKey,
@@ -518,7 +534,10 @@ public Boolean getFeatureVariableBoolean(@Nonnull String featureKey,
518534
* @param userId The ID of the user.
519535
* @return The Double value of the double single variable feature.
520536
* Null if the feature or variable could not be found.
537+
*
538+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
521539
*/
540+
@Deprecated
522541
@Nullable
523542
public Double getFeatureVariableDouble(@Nonnull String featureKey,
524543
@Nonnull String variableKey,
@@ -535,7 +554,10 @@ public Double getFeatureVariableDouble(@Nonnull String featureKey,
535554
* @param attributes The user's attributes.
536555
* @return The Double value of the double single variable feature.
537556
* Null if the feature or variable could not be found.
557+
*
558+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
538559
*/
560+
@Deprecated
539561
@Nullable
540562
public Double getFeatureVariableDouble(@Nonnull String featureKey,
541563
@Nonnull String variableKey,
@@ -567,7 +589,10 @@ public Double getFeatureVariableDouble(@Nonnull String featureKey,
567589
* @param userId The ID of the user.
568590
* @return The Integer value of the integer single variable feature.
569591
* Null if the feature or variable could not be found.
592+
*
593+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
570594
*/
595+
@Deprecated
571596
@Nullable
572597
public Integer getFeatureVariableInteger(@Nonnull String featureKey,
573598
@Nonnull String variableKey,
@@ -584,7 +609,10 @@ public Integer getFeatureVariableInteger(@Nonnull String featureKey,
584609
* @param attributes The user's attributes.
585610
* @return The Integer value of the integer single variable feature.
586611
* Null if the feature or variable could not be found.
612+
*
613+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
587614
*/
615+
@Deprecated
588616
@Nullable
589617
public Integer getFeatureVariableInteger(@Nonnull String featureKey,
590618
@Nonnull String variableKey,
@@ -617,7 +645,10 @@ public Integer getFeatureVariableInteger(@Nonnull String featureKey,
617645
* @param userId The ID of the user.
618646
* @return The String value of the string single variable feature.
619647
* Null if the feature or variable could not be found.
648+
*
649+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
620650
*/
651+
@Deprecated
621652
@Nullable
622653
public String getFeatureVariableString(@Nonnull String featureKey,
623654
@Nonnull String variableKey,
@@ -634,7 +665,10 @@ public String getFeatureVariableString(@Nonnull String featureKey,
634665
* @param attributes The user's attributes.
635666
* @return The String value of the string single variable feature.
636667
* Null if the feature or variable could not be found.
668+
*
669+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
637670
*/
671+
@Deprecated
638672
@Nullable
639673
public String getFeatureVariableString(@Nonnull String featureKey,
640674
@Nonnull String variableKey,
@@ -657,7 +691,10 @@ public String getFeatureVariableString(@Nonnull String featureKey,
657691
* @param userId The ID of the user.
658692
* @return An OptimizelyJSON instance for the JSON variable value.
659693
* Null if the feature or variable could not be found.
694+
*
695+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
660696
*/
697+
@Deprecated
661698
@Nullable
662699
public OptimizelyJSON getFeatureVariableJSON(@Nonnull String featureKey,
663700
@Nonnull String variableKey,
@@ -674,7 +711,10 @@ public OptimizelyJSON getFeatureVariableJSON(@Nonnull String featureKey,
674711
* @param attributes The user's attributes.
675712
* @return An OptimizelyJSON instance for the JSON variable value.
676713
* Null if the feature or variable could not be found.
714+
*
715+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
677716
*/
717+
@Deprecated
678718
@Nullable
679719
public OptimizelyJSON getFeatureVariableJSON(@Nonnull String featureKey,
680720
@Nonnull String variableKey,
@@ -824,7 +864,10 @@ Object convertStringToType(String variableValue, String type) {
824864
* @param userId The ID of the user.
825865
* @return An OptimizelyJSON instance for all variable values.
826866
* Null if the feature could not be found.
867+
*
868+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
827869
*/
870+
@Deprecated
828871
@Nullable
829872
public OptimizelyJSON getAllFeatureVariables(@Nonnull String featureKey,
830873
@Nonnull String userId) {
@@ -839,7 +882,10 @@ public OptimizelyJSON getAllFeatureVariables(@Nonnull String featureKey,
839882
* @param attributes The user's attributes.
840883
* @return An OptimizelyJSON instance for all variable values.
841884
* Null if the feature could not be found.
885+
*
886+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
842887
*/
888+
@Deprecated
843889
@Nullable
844890
public OptimizelyJSON getAllFeatureVariables(@Nonnull String featureKey,
845891
@Nonnull String userId,
@@ -922,7 +968,10 @@ public OptimizelyJSON getAllFeatureVariables(@Nonnull String featureKey,
922968
* @param attributes The user's attributes.
923969
* @return List of the feature keys that are enabled for the user if the userId is empty it will
924970
* return Empty List.
971+
*
972+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
925973
*/
974+
@Deprecated
926975
public List<String> getEnabledFeatures(@Nonnull String userId, @Nonnull Map<String, ?> attributes) {
927976
List<String> enabledFeaturesList = new ArrayList();
928977
if (!validateUserId(userId)) {
@@ -1034,7 +1083,7 @@ public Variation getVariation(@Nonnull String experimentKey,
10341083
* then the forcedVariation for that experiment is removed.
10351084
* @return boolean A boolean value that indicates if the set completed successfully.
10361085
*
1037-
* @deprecated use {@link OptimizelyUserContext#setForcedDecision(String, String, String)} instead
1086+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
10381087
*/
10391088
@Deprecated
10401089
public boolean setForcedVariation(@Nonnull String experimentKey,
@@ -1068,7 +1117,7 @@ public boolean setForcedVariation(@Nonnull String experimentKey,
10681117
* @return The variation the user was bucketed into. This value can be null if the
10691118
* forced variation fails.
10701119
*
1071-
* @deprecated use {@link OptimizelyUserContext#getForcedDecision(String, String)} instead
1120+
* @deprecated use __decide__ API instead. Refer to [the migration guide] (https://docs.developers.optimizely.com/full-stack/v4.0/docs/migrate-from-older-versions-java)
10721121
*/
10731122
@Deprecated
10741123
@Nullable

0 commit comments

Comments
 (0)