Package io.featureflow.client
Class FeatureflowUser
java.lang.Object
io.featureflow.client.FeatureflowUser
Created by oliver on 23/05/2016.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static org.joda.time.DateTimegetId()booleansaveUser(boolean save) Whether we should persist this context information to assist in lookup latersetAttributes(Map<String, com.google.gson.JsonElement> attributes) setSessionAttributes(Map<String, com.google.gson.JsonElement> sessionAttributes) protected static StringtoIso(org.joda.time.DateTime date) withAttribute(String key, boolean value) withAttribute(String key, Number value) withAttribute(String key, String value) withAttribute(String key, org.joda.time.DateTime value) withAttributes(Map<String, com.google.gson.JsonElement> values) withBucketKey(String bucketKey) The bucket key is used specifically for percentage rollouts, it is the key by default however you may wish to set it specifically to handle a consistent experience if the key varies (such as a user logging in)withDateAttributes(String key, List<org.joda.time.DateTime> values) withNumberAttributes(String key, List<Number> values) withSessionAttribute(String key, Number value) withSessionAttribute(String key, String value) withSessionAttribute(String key, org.joda.time.DateTime value) withSessionAttributes(Map<String, com.google.gson.JsonElement> values) withSessionDateAttributes(String key, List<org.joda.time.DateTime> values) withSessionNumberAttributes(String key, List<Number> values) withSessionStringAttributes(String key, List<String> values) withStringAttributes(String key, List<String> values)
-
Field Details
-
ANONYMOUS
- See Also:
-
FEATUREFLOW_USER_ID
- See Also:
-
FEATUREFLOW_DATE
- See Also:
-
FEATUREFLOW_HOUROFDAY
- See Also:
-
-
Constructor Details
-
FeatureflowUser
public FeatureflowUser() -
FeatureflowUser
-
-
Method Details
-
withBucketKey
The bucket key is used specifically for percentage rollouts, it is the key by default however you may wish to set it specifically to handle a consistent experience if the key varies (such as a user logging in)- Parameters:
bucketKey-- Returns:
-
saveUser
Whether we should persist this context information to assist in lookup later- Parameters:
save-- Returns:
-
setAttributes
-
setSessionAttributes
public FeatureflowUser setSessionAttributes(Map<String, com.google.gson.JsonElement> sessionAttributes) -
withAttribute
-
withAttribute
-
withAttribute
-
withAttribute
-
withDateAttributes
-
withNumberAttributes
-
withStringAttributes
-
withAttributes
-
withSessionAttribute
-
withSessionAttribute
-
withSessionAttribute
-
withSessionDateAttributes
-
withSessionNumberAttributes
-
withSessionStringAttributes
-
withSessionAttributes
-
getId
-
getBucketKey
-
isSaveUser
public boolean isSaveUser() -
getAttributes
-
getSessionAttributes
-
toIso
-
fromIso
-