public class UserRepository extends Object
| Constructor and Description |
|---|
UserRepository() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canUserCreateWorkspace(long userId) |
static void |
confirmUserRegistration(String email,
String registrationSecret)
Confirm a user registration in case a correct combination of email and
registration secret has been provided.
|
static String |
createUser(String email,
String organisation,
String userFirstName,
String userLastName,
String newPassword)
Creates a user and returns the alphanumeric secret that has been created
for the user to validate his account.
|
static void |
disableUser(int userid) |
static Optional<de.narimo.commons.dto.geometa.User> |
getUser(String username)
This expects username to be unique in the system!
|
static Integer |
getUserId(String username)
This expects username to be unique in the system!
|
static List<de.narimo.commons.dto.geometa.User> |
getUsersById(List<Integer> userIds)
Return all users by the specified ids.
|
static void |
resetPassword(String newPassword,
String passwordResetSecret,
String email)
Reset a password for a row that has been marked with a password reset
secret before.
|
static String |
setPasswordResetSecret(int userid) |
public static Integer getUserId(String username)
username - jdbc - Exceptionpublic static Optional<de.narimo.commons.dto.geometa.User> getUser(String username)
username - jdbc - Exceptionpublic static String createUser(String email, String organisation, String userFirstName, String userLastName, String newPassword) throws IOException
email - organisation - userFirstName - userLastName - newPassword - IOExceptionpublic static List<de.narimo.commons.dto.geometa.User> getUsersById(List<Integer> userIds)
adminIds - public static void confirmUserRegistration(String email, String registrationSecret) throws IOException
email - registrationSecret - IOExceptionpublic static String setPasswordResetSecret(int userid) throws IOException
IOExceptionpublic static void resetPassword(String newPassword, String passwordResetSecret, String email) throws IOException
newPassword - passwordResetSecret - IOExceptionpublic static boolean canUserCreateWorkspace(long userId)
public static void disableUser(int userid)
throws IOException
IOExceptionCopyright © 2020. All rights reserved.