Skip to content

Commit 74b1cc6

Browse files
authored
Bump to 2.0 for General Availability. (#178)
1 parent 15d5f12 commit 74b1cc6

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Optimizely Java X SDK Changelog
22

3+
## 2.0.0
4+
5+
April 12th, 2018
6+
7+
This major release of the Optimizely SDK introduces APIs for Feature Management. It also introduces some breaking changes listed below.
8+
9+
### New Features
10+
* Introduces the `isFeatureEnabled` API to determine whether to show a feature to a user or not.
11+
```
12+
Boolean enabled = optimizelyClient.isFeatureEnabled("my_feature_key", "user_1", userAttributes);
13+
```
14+
15+
* You can also get all the enabled features for the user by calling the following method which returns a list of strings representing the feature keys:
16+
```
17+
ArrayList<String> enabledFeatures = optimizelyClient.getEnabledFeatures("user_1", userAttributes);
18+
```
19+
20+
* Introduces Feature Variables to configure or parameterize your feature. There are four variable types: `Integer`, `String`, `Double`, `Boolean`.
21+
```
22+
String stringVariable = optimizelyClient.getFeatureVariableString("my_feature_key", "string_variable_key", "user_1");
23+
Integer integerVariable = optimizelyClient.getFeatureVariableInteger("my_feature_key", "integer_variable_key", "user_1");
24+
Double doubleVariable = optimizelyClient.getFeatureVariableDouble("my_feature_key", "double_variable_key", "user_1");
25+
Boolean booleanVariable = optimizelyClient.getFeatureVariableBoolean("my_feature_key", "boolean_variable_key", "user_1");
26+
```
27+
28+
### Breaking changes
29+
* The `track` API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry of the event tags map. The key for the revenue tag is `revenue` and will be treated by Optimizely as the key for analyzing revenue data in results.
30+
```
31+
Map<String, Object> eventTags = new HashMap<String, Object>();
32+
33+
// reserved "revenue" tag
34+
eventTags.put("revenue", 6432);
35+
36+
optimizelyClient.track("event_key", "user_id", userAttributes, eventTags);
37+
```
38+
39+
* We have removed deprecated classes with the `NotificationBroadcaster` in favor of the new API with the `NotificationCenter`. We have streamlined the API so that it is easily usable with Java Lambdas in *Java 1.8+*. We have also added some convenience methods to add these listeners. Finally, some of the API names have changed slightly (e.g. `clearAllNotifications()` is now `clearAllNotificationListeners()`)
40+
341
## 2.0.0-beta6
442

543
March 29th, 2018

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ If none of those packages are already provided in your project's classpath, one
4040
dependency that implements the event dispatcher and requires [org.apache.httpcomponents:httpclient:4.5.2](https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2).
4141
The supplied `pom` files on Bintray define module dependencies.
4242

43+
### Feature Management Access
44+
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
45+
4346
### Using the SDK
4447

4548
See the Optimizely Full Stack [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set

0 commit comments

Comments
 (0)