Class UserTools
java.lang.Object
io.goobi.viewer.model.security.user.UserTools
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanMoves all public content from the given user to an anonymous user.static Userstatic intdeleteBookmarkListsForUser(User owner) static intdeleteSearchesForUser(User owner) static booleandeleteUser(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 intdeleteUserGroupOwnedByUser(User owner) static voidDeletes all public content created by this the given user.static booleanisEmailInUse(String email, Long userId) static booleanisNicknameInUse(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
-