Class UserAPI


  • public class UserAPI
    extends BaseAPI
    This area holds all the users which just includes basic operations.
    • Method Detail

      • updateUser

        public void updateUser​(UserUpdate update)
        Updates the active user. The old and new password can be left out, in which case the password will not be changed. If the mail is changed, the old password has to be supplied as well.
      • getStatus

        public UserStatus getStatus()
        Returns the current status for the user. This includes the user data, profile data and notification data.
        Returns:
        The status of the user
      • getProfile

        public Profile getProfile()
        Returns the profile of the active user
        Returns:
        The profile for the user
      • getProfileField

        public <T,​R> List<T> getProfileField​(ProfileField<T,​R> field)
        Returns the field of the profile for the given key from the active user.
        Parameters:
        field - The field to return the values for
        Returns:
        The values for the given field
      • updateProfile

        public void updateProfile​(ProfileUpdate profile)
        Updates the fields of an existing profile. All fields must be filled out, as any fields not included will not be part of the new revision.
        Parameters:
        profile - The updated profile
      • updateProfileField

        public <F> void updateProfileField​(ProfileField<F,​?> field,
                                           F value)
        Updates a single field on the profile of the user
        Parameters:
        field - The field that should be updated
        value - The new value of the field
      • updateProfileField

        public <F> void updateProfileField​(ProfileField<F,​?> field,
                                           F... values)
        Updates a single field on the profile of the user
        Parameters:
        field - The field that should be updated
        values - The new values of the field
      • updateProfileField

        public <F> void updateProfileField​(ProfileField<F,​?> field,
                                           List<F> values)
        Updates a single field on the profile of the user
        Parameters:
        field - The field that should be updated
        values - The new values of the field
      • updateProfile

        public void updateProfile​(ProfileFieldValues values)
        Updates the fields of an existing profile. Will only update the fields in the values.
        Parameters:
        values - The updated values for the profile
      • getUser

        public User getUser()
        Gets the active user
        Returns:
        The active user
      • getProperty

        public boolean getProperty​(String key)
        Returns the value of the property for the active user with the given name. The property is specific to the auth client used.
        Parameters:
        key - The key of the property
      • setProperty

        public void setProperty​(String key,
                                boolean value)
        Sets the value of the property for the active user with the given name. The property is specific to the auth client used.
        Parameters:
        key - The key of the property
        value - The value of the property
      • deleteProperty

        public void deleteProperty​(String key)
        Deletes the property for the active user with the given name. The property is specific to the auth client used.
        Parameters:
        key - The key of the property that should be deleted