import java.io.Serializable;
import java.util.List;
import javax.ejb.Remote;
-import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
-import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
import org.mxchange.jusercore.exceptions.UserStatusLockedException;
import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
+import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
/**
* An interface for user beans
* <p>
* @param user User instance with updated password
* <p>
- * @return Updated user instance
+ * @return Password history entry with updated user instance
*
* @throws UserNotFoundException If the user is not found
* @throws UserStatusUnconfirmedException If the user status is unconfirmed
* @throws UserStatusLockedException If the user status is locked
*/
- User updateUserPassword (final User user) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException;
+ PasswordHistory updateUserPassword (final User user) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException;
/**
* Changes the user' account status to CONFIRMED if the status is
*/
String generateRandomUserName ();
- /**
- * Creates the user instance and links it with the set contact instance
- * <p>
- * @param user User instance to
- * <p>
- * @return Updated user instance
- * <p>
- * @throws
- * org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException When
- * the user name is already used
- * @throws
- * org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException
- * When the email address is already used
- */
- User linkUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
-
/**
* Updates entiity from given user instance and returns updated instance.
* <p>
*/
User findUserById (final Long userId) throws UserNotFoundException;
- /**
- * Adds given user to database, if not found by user name or email address.
- * <p>
- * @param user User instance to add
- * <p>
- * @return Updated user instance
- * <p>
- * @throws
- * org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException When
- * the user name is already used
- * @throws
- * org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException
- * When the email address is already used
- */
- User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
-
/**
* Returns a list of all users. This is mostly suitable for administrative
* interfaces.