public abstract class UserProfileManagementBase extends Object implements UserProfileManagement
Spring Service base class for
com.communote.server.service.user.UserProfileManagement, provides access to all
services and entities referenced by this service.
UserProfileManagement| Constructor and Description |
|---|
UserProfileManagementBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessagingConnectorConfig(Long notificationConfigId,
MessagerConnectorConfig config) |
void |
anonymizeUserProfile(Long profileId)
Makes a user profile anonymous.
|
UserProfile |
findUserProfileByUserId(Long userId)
Finds the user profile to a user.
|
UserProfileDetailListItem |
findUserProfileDetailListItemByUserId(Long userId) |
UserProfileVO |
findUserProfileVOByUserId(Long userId) |
protected ContactDao |
getContactDao()
Gets the reference to
contact's DAO. |
protected MessagerConnectorConfigDao |
getMessagerConnectorConfigDao()
Gets the reference to
messagerConnectorConfig's DAO. |
List<MessagerConnectorConfigTO> |
getMessagerConnectorConfigs()
Returns the messager connector configurations of the current user.
|
protected NotificationConfigDao |
getNotificationConfigDao()
Gets the reference to
notificationConfig's DAO. |
protected Principal |
getPrincipal()
Gets the current
principal if one has been set, otherwise returns
null. |
protected UserDao |
getUserDao()
Gets the reference to
kenmeiUser's DAO. |
protected UserImageDao |
getUserImageDao()
Gets the reference to
userImage's DAO. |
protected UserProfileDao |
getUserProfileDao()
Gets the reference to
userProfile's DAO. |
protected abstract void |
handleAddMessagingConnectorConfig(Long notificationConfigId,
MessagerConnectorConfig config)
Performs the core logic for
addMessagingConnectorConfig(Long, MessagerConnectorConfig) |
protected abstract void |
handleAnonymizeUserProfile(Long profileId)
Performs the core logic for
anonymizeUserProfile(Long) |
protected abstract UserProfile |
handleFindUserProfileByUserId(Long userId)
Performs the core logic for
findUserProfileByUserId(Long) |
protected abstract UserProfileDetailListItem |
handleFindUserProfileDetailListItemByUserId(Long userId)
Performs the core logic for
findUserProfileDetailListItemByUserId(Long) |
protected abstract UserProfileVO |
handleFindUserProfileVOByUserId(Long userId)
Performs the core logic for
findUserProfileVOByUserId(Long) |
protected abstract List<MessagerConnectorConfigTO> |
handleGetMessagerConnectorConfigs()
Performs the core logic for
getMessagerConnectorConfigs() |
protected abstract boolean |
handleHasCustomUserImage(Long userId) |
protected abstract ImageVO |
handleLoadImage(Long userId)
Performs the core logic for
#loadImage(Long, com.communote.server.persistence.user.ImageSizeType) |
protected abstract boolean |
handleRemoveUserImage(Long userId)
Remove the image of a user.
|
protected abstract void |
handleUpdateImage(Long userId,
byte[] userImage)
Update the image of a user.
|
protected abstract void |
handleUpdateNotificationConfig(Map<MessagerConnectorType,MessagerConnectorConfigTO> connectorConfigs)
Performs the core logic for
updateNotificationConfig(Map) |
protected abstract void |
handleUpdateUserProfile(Long userId,
UserProfileVO userProfile)
Performs the core logic for
updateUserProfile(Long, com.communote.server.persistence.user.UserProfileVO) |
boolean |
hasCustomUserImage(Long userId)
Return whether a user uploaded a custom image.
|
ImageVO |
loadImage(Long userId)
Get the user image
|
boolean |
removeUserImage(Long userId)
Remove the image of a user.
|
void |
setContactDao(ContactDao contactDao)
Sets the reference to
contact's DAO. |
void |
setMessagerConnectorConfigDao(MessagerConnectorConfigDao messagerConnectorConfigDao)
Sets the reference to
messagerConnectorConfig's DAO. |
void |
setNotificationConfigDao(NotificationConfigDao notificationConfigDao)
Sets the reference to
notificationConfig's DAO. |
void |
setUserDao(UserDao userDao)
Sets the reference to
kenmeiUser's DAO. |
void |
setUserImageDao(UserImageDao userImageDao)
Sets the reference to
userImage's DAO. |
void |
setUserProfileDao(UserProfileDao userProfileDao)
Sets the reference to
kenmeiUserProfile's DAO. |
void |
updateImage(Long userId,
byte[] userImage)
Update the image of a user.
|
void |
updateNotificationConfig(Map<MessagerConnectorType,MessagerConnectorConfigTO> connectorConfigs)
Updates the notification configuration of the current user by adding new, removing or
updating existing messager connector configurations.
|
void |
updateUserProfile(Long userId,
UserProfileVO userProfile)
Updates the user profile in the database.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUserProfileDetailsById, getUserProfileDetailsByIdpublic void addMessagingConnectorConfig(Long notificationConfigId, MessagerConnectorConfig config)
addMessagingConnectorConfig in interface UserProfileManagementnotificationConfigId - Id of the notification config.config - The configuration.UserProfileManagement.addMessagingConnectorConfig(Long,
MessagerConnectorConfig)public void anonymizeUserProfile(Long profileId)
UserProfileManagementMakes a user profile anonymous.
anonymizeUserProfile in interface UserProfileManagementprofileId - Id of the profile.UserProfileManagement.anonymizeUserProfile(Long)public UserProfile findUserProfileByUserId(Long userId)
UserProfileManagementFinds the user profile to a user.
findUserProfileByUserId in interface UserProfileManagementuserId - The users id.UserProfileManagement.findUserProfileByUserId(Long)public UserProfileDetailListItem findUserProfileDetailListItemByUserId(Long userId)
findUserProfileDetailListItemByUserId in interface UserProfileManagementuserId - The users id.public UserProfileVO findUserProfileVOByUserId(Long userId)
findUserProfileVOByUserId in interface UserProfileManagementuserId - The users id.UserProfileManagement.findUserProfileVOByUserId(Long)protected ContactDao getContactDao()
contact's DAO.protected MessagerConnectorConfigDao getMessagerConnectorConfigDao()
messagerConnectorConfig's DAO.public List<MessagerConnectorConfigTO> getMessagerConnectorConfigs()
getMessagerConnectorConfigs in interface UserProfileManagementprotected NotificationConfigDao getNotificationConfigDao()
notificationConfig's DAO.protected Principal getPrincipal()
principal if one has been set, otherwise returns
null.protected UserDao getUserDao()
kenmeiUser's DAO.protected UserImageDao getUserImageDao()
userImage's DAO.protected UserProfileDao getUserProfileDao()
userProfile's DAO.protected abstract void handleAddMessagingConnectorConfig(Long notificationConfigId, MessagerConnectorConfig config)
addMessagingConnectorConfig(Long, MessagerConnectorConfig)protected abstract void handleAnonymizeUserProfile(Long profileId)
anonymizeUserProfile(Long)protected abstract UserProfile handleFindUserProfileByUserId(Long userId)
findUserProfileByUserId(Long)protected abstract UserProfileDetailListItem handleFindUserProfileDetailListItemByUserId(Long userId)
findUserProfileDetailListItemByUserId(Long)userId - the ID of the userprotected abstract UserProfileVO handleFindUserProfileVOByUserId(Long userId)
findUserProfileVOByUserId(Long)protected abstract List<MessagerConnectorConfigTO> handleGetMessagerConnectorConfigs()
getMessagerConnectorConfigs()protected abstract boolean handleHasCustomUserImage(Long userId)
protected abstract ImageVO handleLoadImage(Long userId)
#loadImage(Long, com.communote.server.persistence.user.ImageSizeType)userId - The users id.protected abstract boolean handleRemoveUserImage(Long userId) throws AuthorizationException, UserNotFoundException
userId - The ID of the user whose image should be removedAuthorizationException - in case the current user is not the user whose image should be removed or client
manager or internal system userUserNotFoundException - in case the user with ID userId does not existprotected abstract void handleUpdateImage(Long userId, byte[] userImage) throws UserNotFoundException, AuthorizationException
userId - The users id.largeUserImage - 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 existprotected abstract void handleUpdateNotificationConfig(Map<MessagerConnectorType,MessagerConnectorConfigTO> connectorConfigs)
updateNotificationConfig(Map)connectorConfigs - the new configuration dataprotected abstract void handleUpdateUserProfile(Long userId, UserProfileVO userProfile)
updateUserProfile(Long, com.communote.server.persistence.user.UserProfileVO)public boolean hasCustomUserImage(Long userId)
UserProfileManagementhasCustomUserImage in interface UserProfileManagementuserId - the ID of the userpublic ImageVO loadImage(Long userId)
UserProfileManagementloadImage in interface UserProfileManagementuserId - The users id.com.communote.server.core.user.UserProfileManagement#loadImage(Long,
com.communote.server.persistence.user.ImageSizeType)public boolean removeUserImage(Long userId) throws UserNotFoundException, AuthorizationException
UserProfileManagementremoveUserImage in interface UserProfileManagementuserId - The ID of the user whose image should be removedUserNotFoundException - in case the user with ID userId does not existAuthorizationException - 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 userpublic void setContactDao(ContactDao contactDao)
contact's DAO.public void setMessagerConnectorConfigDao(MessagerConnectorConfigDao messagerConnectorConfigDao)
messagerConnectorConfig's DAO.public void setNotificationConfigDao(NotificationConfigDao notificationConfigDao)
notificationConfig's DAO.public void setUserDao(UserDao userDao)
kenmeiUser's DAO.public void setUserImageDao(UserImageDao userImageDao)
userImage's DAO.public void setUserProfileDao(UserProfileDao userProfileDao)
kenmeiUserProfile's DAO.public void updateImage(Long userId, byte[] userImage) throws UserNotFoundException, AuthorizationException
UserProfileManagementupdateImage in interface UserProfileManagementuserId - The users id.userImage - The user image as byte array.UserNotFoundException - in case the user with ID userId does not existAuthorizationException - 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 userpublic void updateNotificationConfig(Map<MessagerConnectorType,MessagerConnectorConfigTO> connectorConfigs)
updateNotificationConfig in interface UserProfileManagementconnectorConfigs - a definition with the new connector configurations. Configurations for connector
types that are not yet part of the notification configuration of the current user
will be added. Configurations with connector types that are part of the current
notification configuration but that are not listed in the mapping will be removed.
All the the other configurations will be updated if necessary.public void updateUserProfile(Long userId, UserProfileVO userProfile)
UserProfileManagementupdateUserProfile in interface UserProfileManagementuserId - The users id.userProfile - The profile.UserProfileManagement.updateUserProfile(Long,
com.communote.server.persistence.user.UserProfileVO)Copyright © 2019 Communote team. All rights reserved.