}
@Override
- public User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException {
+ public User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException, UserNotFoundException {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
// Update user status and remove confirmation key
managedUser.setUserAccountStatus(UserAccountStatus.CONFIRMED);
managedUser.setUserConfirmKey(null);
- managedUser.setUserUpdated(new Date());
+ managedUser.setUserEntryUpdated(new Date());
// Send out email
this.sendEmail("User account confirmed", "user_account_confirmed", managedUser, baseUrl, null); //NOI18N
}
@Override
- public User updateUserData (final User user) {
+ public User updateUserData (final User detachedUser) throws UserNotFoundException {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
} else if (!this.ifUserExists(user)) {
// User does not exist
- throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
+ throw new UserNotFoundException(detachedUser.getUserId());
}
// Find the instance
assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
// Set as updated
- managedUser.setUserUpdated(new Date());
+ managedUser.setUserEntryUpdated(new Date());
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
final User managedUser = this.updateUserData(user);
// Update user account
- managedUser.setUserUpdated(new Date());
+ managedUser.setUserEntryUpdated(new Date());
// Create history entry
PasswordHistory entry = new UserPasswordHistory(user.getUserEncryptedPassword(), managedUser);
Users.copyUserData(user, managedUser);
// Set as updated
- managedUser.setUserUpdated(new Date());
+ managedUser.setUserEntryUpdated(new Date());
// Update user data
final Contact managedContact = this.mergeContactData(managedUser.getUserContact());