public class UserProfileManipulater
extends java.lang.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,
java.lang.String userId,
java.util.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,
java.lang.String userId,
java.util.Collection<UserProfileConfiguration.ProfileProperty> profileProperties)
Calls updateField for each property.
|
static java.lang.String |
getLang(io.vertx.core.MultiMap headers) |
boolean |
updateField(java.lang.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,
java.lang.String userId,
java.util.Collection<UserProfileConfiguration.ProfileProperty> profileProperties)
protected int enrichProfile(io.vertx.core.MultiMap headers,
io.vertx.core.json.JsonObject profile,
java.lang.String userId,
java.util.Collection<UserProfileConfiguration.ProfileProperty> profileProperties)
public boolean updateField(java.lang.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 java.lang.String getLang(io.vertx.core.MultiMap headers)