-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jusercore.model.user;
-
-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;
-
-/**
- * An interface for user beans
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Remote
-public interface UserSessionBeanRemote extends Serializable {
-
- /**
- * 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>
- * @param user User instance to update
- * <p>
- * @return Updated user instance
- */
- User updateUserData (final User user);
-
- /**
- * Find user by given user id and returns fetched instance. If the user is
- * not found, an exception is thrown.
- * <p>
- * @param userId User id
- * <p>
- * @return User instance
- *
- * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the
- * user is not found
- */
- 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.
- * <p>
- * @return A list of all users
- */
- List<User> allUsers ();
-
- /**
- * Returns a list with all public and member-visible users. Members are
- * logged-in users. ;-)
- * <p>
- * @return A list of public and member-visible users
- */
- List<User> allMemberPublicVisibleUsers ();
-
- /**
- * Returns a list of all public user profiles
- * <p>
- * @return A list of all public user profiles
- */
- List<User> allPublicUsers ();
-
- /**
- * Fills given user instance with all available data
- * <p>
- * @param user Initial User instance
- * <p>
- * @return Prepared User instance
- */
- User fillUserData (final User user);
-
- /**
- * Some "getter" for a full user name list
- * <p>
- * @return User name list
- */
- List<String> getUserNameList ();
-
- /**
- * Some "getter" for a full email address list
- * <p>
- * @return User name list
- */
- List<String> getEmailAddressList ();
-
- /**
- * Checks if given user id exists
- * <p>
- * @param userId User id to check
- * <p>
- * @return Whether the user id exists
- */
- boolean ifUserIdExists (final Long userId);
-
- /**
- * Checks if given user name is already used
- * <p>
- * @param userName User name to check
- * <p>
- * @return Whether given user name is found
- */
- boolean ifUserNameExists (final String userName);
-
- /**
- * Checks if given user exists
- * <p>
- * @param user User to check
- * <p>
- * @return Whether the user exists
- */
- boolean ifUserExists (final User user);
-
- /**
- * Checks if the the given user's name is already registered
- * <p>
- * @param user User instance
- * <p>
- * @return Whether the user is already registered
- */
- boolean isUserNameReqistered (final User user);
-
- /**
- * Checks if the the given user's email address is already registered
- * <p>
- * @param user User instance
- * <p>
- * @return Whether the user is already registered
- */
- boolean isEmailAddressReqistered (final User user);
-
- /**
- * Updates given user instance in database
- * <p>
- * @param user User instance to update
- * <p>
- * @return Updated user instance (detached)
- */
- User updateUserPersonalData (final User user);
-
-}
+/*\r
+ * Copyright (C) 2016 Roland Haeder\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package org.mxchange.jusercore.model.user;\r
+\r
+import java.io.Serializable;\r
+import java.util.List;\r
+import javax.ejb.Remote;\r
+import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;\r
+import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;\r
+import org.mxchange.jusercore.exceptions.UserNotFoundException;\r
+\r
+/**\r
+ * An interface for user beans\r
+ * <p>\r
+ * @author Roland Haeder<roland@mxchange.org>\r
+ */\r
+@Remote\r
+public interface UserSessionBeanRemote extends Serializable {\r
+\r
+ /**\r
+ * Creates the user instance and links it with the set contact instance\r
+ * <p>\r
+ * @param user User instance to\r
+ * <p>\r
+ * @return Updated user instance\r
+ * <p>\r
+ * @throws\r
+ * org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException When\r
+ * the user name is already used\r
+ * @throws\r
+ * org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException\r
+ * When the email address is already used\r
+ */\r
+ User linkUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;\r
+\r
+ /**\r
+ * Updates entiity from given user instance and returns updated instance.\r
+ * <p>\r
+ * @param user User instance to update\r
+ * <p>\r
+ * @return Updated user instance\r
+ */\r
+ User updateUserData (final User user);\r
+\r
+ /**\r
+ * Find user by given user id and returns fetched instance. If the user is\r
+ * not found, an exception is thrown.\r
+ * <p>\r
+ * @param userId User id\r
+ * <p>\r
+ * @return User instance\r
+ *\r
+ * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the\r
+ * user is not found\r
+ */\r
+ User findUserById (final Long userId) throws UserNotFoundException;\r
+\r
+ /**\r
+ * Adds given user to database, if not found by user name or email address.\r
+ * <p>\r
+ * @param user User instance to add\r
+ * <p>\r
+ * @return Updated user instance\r
+ * <p>\r
+ * @throws\r
+ * org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException When\r
+ * the user name is already used\r
+ * @throws\r
+ * org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException\r
+ * When the email address is already used\r
+ */\r
+ User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;\r
+\r
+ /**\r
+ * Returns a list of all users. This is mostly suitable for administrative\r
+ * interfaces.\r
+ * <p>\r
+ * @return A list of all users\r
+ */\r
+ List<User> allUsers ();\r
+\r
+ /**\r
+ * Returns a list with all public and member-visible users. Members are\r
+ * logged-in users. ;-)\r
+ * <p>\r
+ * @return A list of public and member-visible users\r
+ */\r
+ List<User> allMemberPublicVisibleUsers ();\r
+\r
+ /**\r
+ * Returns a list of all public user profiles\r
+ * <p>\r
+ * @return A list of all public user profiles\r
+ */\r
+ List<User> allPublicUsers ();\r
+\r
+ /**\r
+ * Fills given user instance with all available data\r
+ * <p>\r
+ * @param user Initial User instance\r
+ * <p>\r
+ * @return Prepared User instance\r
+ */\r
+ User fillUserData (final User user);\r
+\r
+ /**\r
+ * Some "getter" for a full user name list\r
+ * <p>\r
+ * @return User name list\r
+ */\r
+ List<String> getUserNameList ();\r
+\r
+ /**\r
+ * Some "getter" for a full email address list\r
+ * <p>\r
+ * @return User name list\r
+ */\r
+ List<String> getEmailAddressList ();\r
+\r
+ /**\r
+ * Checks if given user id exists\r
+ * <p>\r
+ * @param userId User id to check\r
+ * <p>\r
+ * @return Whether the user id exists\r
+ */\r
+ boolean ifUserIdExists (final Long userId);\r
+\r
+ /**\r
+ * Checks if given user name is already used\r
+ * <p>\r
+ * @param userName User name to check\r
+ * <p>\r
+ * @return Whether given user name is found\r
+ */\r
+ boolean ifUserNameExists (final String userName);\r
+\r
+ /**\r
+ * Checks if given user exists\r
+ * <p>\r
+ * @param user User to check\r
+ * <p>\r
+ * @return Whether the user exists\r
+ */\r
+ boolean ifUserExists (final User user);\r
+\r
+ /**\r
+ * Checks if the the given user's name is already registered\r
+ * <p>\r
+ * @param user User instance\r
+ * <p>\r
+ * @return Whether the user is already registered\r
+ */\r
+ boolean isUserNameRegistered (final User user);\r
+\r
+ /**\r
+ * Checks if the the given user's email address is already registered\r
+ * <p>\r
+ * @param user User instance\r
+ * <p>\r
+ * @return Whether the user is already registered\r
+ */\r
+ boolean isEmailAddressRegistered (final User user);\r
+\r
+ /**\r
+ * Updates given user instance in database\r
+ * <p>\r
+ * @param user User instance to update\r
+ * <p>\r
+ * @return Updated user instance (detached)\r
+ */\r
+ User updateUserPersonalData (final User user);\r
+\r
+}\r