SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

UpdateSelf #

Updates the current user object in Kuzzle.

Arguments #

CompletableFuture<ConcurrentHashMap<String, Object>> updateSelf(
  final ConcurrentHashMap<String, Object> content)
  throws NotConnectedException, InternalException
ArgumentTypeDescription
content
ConcurrentHashMap<String, Object>
Hashmap representing the user content

Return #

Returns a ConcurrentHashMap with the following properties:

PropertyTypeDescription
_id
String
User's kuid
_source
ConcurrentHashMap<String, Object>
Additional (and optional) user properties

Usage #

ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
ConcurrentHashMap<String, Object> custom = new ConcurrentHashMap<>();
custom.put("age", 42);
ConcurrentHashMap<String, Object> result = 
  kuzzle.getAuthController().updateSelf(custom).get();