@Service public class UserProfileService extends Object
Constructor and Description |
---|
UserProfileService() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasCustomUserImage(Long userId)
Return whether the user uploaded a custom image.
|
void |
removeUserImage(Long userId)
Remove the image of a user.
|
void |
storeOrUpdateUserImage(Long userId,
byte[] userImageBytes)
Update the image of a user.
|
public boolean hasCustomUserImage(Long userId)
userId
- the ID of the userpublic void removeUserImage(Long userId) throws UserNotFoundException, AuthorizationException
userId
- The ID of the user whose image should be removedAuthorizationException
- in case the current user is not the user whose image should be updated or the
current user is not client manager or internal system userUserNotFoundException
- in case the user with ID userId does not existpublic void storeOrUpdateUserImage(Long userId, byte[] userImageBytes) throws UserNotFoundException, AuthorizationException, VirusFoundException, VirusScannerException
userId
- The users id.userImageBytes
- The user image as byte array.AuthorizationException
- in case the current user is not the user whose image should be updated or the
current user is not client manager or internal system userUserNotFoundException
- in case the user with ID userId does not existVirusScannerException
- in case the virus scanner is not correctly setup or the image cannot be processedVirusFoundException
- in case a virus was found in the imageCopyright © 2019 Communote team. All rights reserved.