Class UserTools
java.lang.Object
io.goobi.viewer.model.security.user.UserTools
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Moves all public content from the given user to an anonymous user.static User
static int
deleteBookmarkListsForUser
(User owner) static int
deleteSearchesForUser
(User owner) static boolean
deleteUser
(User user) Deletes given user from the database and removes any database rows that reference this user (only those that are of use to this user - public content such as comments must be deleted separetely).static int
deleteUserGroupOwnedByUser
(User owner) static void
Deletes all public content created by this the given user.static boolean
isEmailInUse
(String email, Long userId) static boolean
isNicknameInUse
(String nickname, Long userId)
-
Method Details
-
deleteUser
Deletes given user from the database and removes any database rows that reference this user (only those that are of use to this user - public content such as comments must be deleted separetely).- Parameters:
user
- User to delete- Returns:
- true if successful; false otherwise
- Throws:
DAOException
-
deleteUserGroupOwnedByUser
- Parameters:
owner
- Owner of groups to delete- Returns:
- Number of deleted user groups
- Throws:
DAOException
-
deleteBookmarkListsForUser
- Parameters:
owner
-- Returns:
- Number of deleted bookmark lists
- Throws:
DAOException
-
deleteSearchesForUser
- Parameters:
owner
-- Returns:
- Number of deleted searches
- Throws:
DAOException
-
deleteUserPublicContributions
Deletes all public content created by this the given user.- Parameters:
user
-- Throws:
DAOException
-
anonymizeUserPublicContributions
Moves all public content from the given user to an anonymous user.- Parameters:
user
-- Returns:
- true if successful; false otherwise
- Throws:
DAOException
-
checkAndCreateAnonymousUser
- Returns:
- Created
User
- Throws:
DAOException
-
isNicknameInUse
- Parameters:
nickname
-userId
-- Returns:
- true if given nickname already in use by different user; false otherwise
- Throws:
DAOException
-
isEmailInUse
- Throws:
DAOException
-