public class UserProfileManipulater extends Object
| Constructor and Description |
|---|
UserProfileManipulater(org.slf4j.Logger log) |
| Modifier and Type | Method and Description |
|---|---|
io.vertx.core.json.JsonObject |
createInitialProfile(io.vertx.core.MultiMap headers,
String userId,
Collection<UserProfileConfiguration.ProfileProperty> profileProperties) |
protected io.vertx.core.json.JsonObject |
createProfileWithLanguage(io.vertx.core.MultiMap headers) |
protected int |
enrichProfile(io.vertx.core.MultiMap headers,
io.vertx.core.json.JsonObject profile,
String userId,
Collection<UserProfileConfiguration.ProfileProperty> profileProperties)
Calls updateField for each property.
|
static String |
getLang(io.vertx.core.MultiMap headers) |
boolean |
updateField(String userId,
io.vertx.core.MultiMap headers,
io.vertx.core.json.JsonObject profile,
UserProfileConfiguration.ProfileProperty profileProperty)
Updates a single field of the profile.
|
public io.vertx.core.json.JsonObject createInitialProfile(io.vertx.core.MultiMap headers,
String userId,
Collection<UserProfileConfiguration.ProfileProperty> profileProperties)
protected int enrichProfile(io.vertx.core.MultiMap headers,
io.vertx.core.json.JsonObject profile,
String userId,
Collection<UserProfileConfiguration.ProfileProperty> profileProperties)
public boolean updateField(String userId, io.vertx.core.MultiMap headers, io.vertx.core.json.JsonObject profile, UserProfileConfiguration.ProfileProperty profileProperty)
UserProfileConfiguration.ProfileProperty.getUpdateStrategy() and the header value is valid.true: Field updated. false: Not updated.protected io.vertx.core.json.JsonObject createProfileWithLanguage(io.vertx.core.MultiMap headers)
public static String getLang(io.vertx.core.MultiMap headers)
Copyright © 2016–2020. All rights reserved.