public class UserAPI extends BaseAPI
| Constructor and Description |
|---|
UserAPI(ResourceFactory resourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteProperty(String key)
Deletes the property for the active user with the given name.
|
Profile |
getProfile()
Returns the profile of the active user
|
<T,R> List<T> |
getProfileField(ProfileField<T,R> field)
Returns the field of the profile for the given key from the active user.
|
boolean |
getProperty(String key)
Returns the value of the property for the active user with the given
name.
|
UserStatus |
getStatus()
Returns the current status for the user.
|
User |
getUser()
Gets the active user
|
void |
setProperty(String key,
boolean value)
Sets the value of the property for the active user with the given name.
|
void |
updateProfile(ProfileFieldValues values)
Updates the fields of an existing profile.
|
void |
updateProfile(ProfileUpdate profile)
Updates the fields of an existing profile.
|
<F> void |
updateProfileField(ProfileField<F,?> field,
F... values)
Updates a single field on the profile of the user
|
<F> void |
updateProfileField(ProfileField<F,?> field,
F value)
Updates a single field on the profile of the user
|
<F> void |
updateProfileField(ProfileField<F,?> field,
List<F> values)
Updates a single field on the profile of the user
|
void |
updateUser(UserUpdate update)
Updates the active user.
|
getResourceFactorypublic UserAPI(ResourceFactory resourceFactory)
public void updateUser(UserUpdate update)
public UserStatus getStatus()
public Profile getProfile()
public <T,R> List<T> getProfileField(ProfileField<T,R> field)
field - The field to return the values forpublic void updateProfile(ProfileUpdate profile)
profile - The updated profilepublic <F> void updateProfileField(ProfileField<F,?> field, F value)
field - The field that should be updatedvalue - The new value of the fieldpublic <F> void updateProfileField(ProfileField<F,?> field, F... values)
field - The field that should be updatedvalues - The new values of the fieldpublic <F> void updateProfileField(ProfileField<F,?> field, List<F> values)
field - The field that should be updatedvalues - The new values of the fieldpublic void updateProfile(ProfileFieldValues values)
values - The updated values for the profilepublic User getUser()
public boolean getProperty(String key)
key - The key of the propertypublic void setProperty(String key, boolean value)
key - The key of the propertyvalue - The value of the propertypublic void deleteProperty(String key)
key - The key of the property that should be deletedCopyright © 2014. All Rights Reserved.