public interface UserProfileService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
experimentBucketMapKey
The key for the decisions Map.
|
static java.lang.String |
userIdKey
The key for the user ID.
|
static java.lang.String |
variationIdKey
The key for the variation Id within a decision Map.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
lookup(java.lang.String userId)
Fetch the user profile map for the user ID.
|
void |
save(java.util.Map<java.lang.String,java.lang.Object> userProfile)
Save the user profile Map sent to this method.
|
static final java.lang.String userIdKey
static final java.lang.String experimentBucketMapKey
Map<String, Map<String, String>>.static final java.lang.String variationIdKey
java.util.Map<java.lang.String,java.lang.Object> lookup(java.lang.String userId)
throws java.lang.Exception
userId - The ID of the user whose profile will be retrieved.Map<String, Object> of the user profile will have the following structure.
{
userIdKey : String userId,
decisionsKey : Map<String, Map<String, String>> decisions {
String experimentId : Map<String, String> decision {
variationIdKey : String variationId
}
}
}java.lang.Exception - Passes on whatever exceptions the implementation may throw.void save(java.util.Map<java.lang.String,java.lang.Object> userProfile) throws java.lang.Exception
userProfile - The Map representing the user's profile.java.lang.Exception - Can throw an exception if the user profile was not saved properly.