UserProfileManagementService

interface UserProfileManagementService

Service responsible for managing user profiles.

A user profile, created with createUserProfile, will be persistently stored, and loaded after the service restarts. The user profile may be updated with updateUserProfile or deleted with deleteUserProfile.

One of created user profiles must be set as active with activateUserProfile. The active user profile cannot be deleted.

Types

Link copied to clipboard
sealed class ActivateUserProfileResult : Parcelable

The result of activateUserProfile call.

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class CreateUserProfileResult : Parcelable

The result of createUserProfile call.

Link copied to clipboard
sealed class DeleteUserProfileResult : Parcelable

The result of deleteUserProfile call.

Link copied to clipboard
sealed class UpdateUserProfileResult : Parcelable

The result of updateUserProfile call.

Properties

Link copied to clipboard
abstract val activeUserProfileId: Uid<UserProfile>

The ID of the active user profile. The user profiles details can be looked up in allUserProfiles.

Link copied to clipboard
abstract val allUserProfiles: MirrorableMap<Uid<UserProfile>, UserProfile>

Map of all created user profiles. It is updated when a new user profile is created, or the existing user profile is updated or deleted.

Functions

Link copied to clipboard
abstract suspend fun activateUserProfile(id: Uid<UserProfile>): UserProfileManagementService.ActivateUserProfileResult

Activates the user profile with id. If the user profile with id is already active then this call does nothing.

Link copied to clipboard
abstract suspend fun createUserProfile(displayName: String): UserProfileManagementService.CreateUserProfileResult

Creates a new user profile with displayName.

Link copied to clipboard
abstract suspend fun deleteUserProfile(id: Uid<UserProfile>): UserProfileManagementService.DeleteUserProfileResult

Deletes the user profile with id. The active user profile cannot be deleted.

Link copied to clipboard
abstract suspend fun updateUserProfile(userProfile: UserProfile): UserProfileManagementService.UpdateUserProfileResult

Updates the user profile with the ID of userProfile with values from userProfile. Note that ID cannot be changed with update.