From 625dc84e6b10cb43951011b559346182fa0f7001 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 3 May 2016 11:36:50 +0200 Subject: [PATCH] fixed tpzo ... --- .../model/user/UserSessionBeanRemote.java | 376 +++++++++--------- 1 file changed, 188 insertions(+), 188 deletions(-) diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java index 162af97..7e3ba03 100644 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java @@ -1,188 +1,188 @@ -/* - * 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 . - */ -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 - *

- * @author Roland Haeder - */ -@Remote -public interface UserSessionBeanRemote extends Serializable { - - /** - * Creates the user instance and links it with the set contact instance - *

- * @param user User instance to - *

- * @return Updated user instance - *

- * @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. - *

- * @param user User instance to update - *

- * @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. - *

- * @param userId User id - *

- * @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. - *

- * @param user User instance to add - *

- * @return Updated user instance - *

- * @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. - *

- * @return A list of all users - */ - List allUsers (); - - /** - * Returns a list with all public and member-visible users. Members are - * logged-in users. ;-) - *

- * @return A list of public and member-visible users - */ - List allMemberPublicVisibleUsers (); - - /** - * Returns a list of all public user profiles - *

- * @return A list of all public user profiles - */ - List allPublicUsers (); - - /** - * Fills given user instance with all available data - *

- * @param user Initial User instance - *

- * @return Prepared User instance - */ - User fillUserData (final User user); - - /** - * Some "getter" for a full user name list - *

- * @return User name list - */ - List getUserNameList (); - - /** - * Some "getter" for a full email address list - *

- * @return User name list - */ - List getEmailAddressList (); - - /** - * Checks if given user id exists - *

- * @param userId User id to check - *

- * @return Whether the user id exists - */ - boolean ifUserIdExists (final Long userId); - - /** - * Checks if given user name is already used - *

- * @param userName User name to check - *

- * @return Whether given user name is found - */ - boolean ifUserNameExists (final String userName); - - /** - * Checks if given user exists - *

- * @param user User to check - *

- * @return Whether the user exists - */ - boolean ifUserExists (final User user); - - /** - * Checks if the the given user's name is already registered - *

- * @param user User instance - *

- * @return Whether the user is already registered - */ - boolean isUserNameReqistered (final User user); - - /** - * Checks if the the given user's email address is already registered - *

- * @param user User instance - *

- * @return Whether the user is already registered - */ - boolean isEmailAddressReqistered (final User user); - - /** - * Updates given user instance in database - *

- * @param user User instance to update - *

- * @return Updated user instance (detached) - */ - User updateUserPersonalData (final User user); - -} +/* + * 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 . + */ +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 + *

+ * @author Roland Haeder + */ +@Remote +public interface UserSessionBeanRemote extends Serializable { + + /** + * Creates the user instance and links it with the set contact instance + *

+ * @param user User instance to + *

+ * @return Updated user instance + *

+ * @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. + *

+ * @param user User instance to update + *

+ * @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. + *

+ * @param userId User id + *

+ * @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. + *

+ * @param user User instance to add + *

+ * @return Updated user instance + *

+ * @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. + *

+ * @return A list of all users + */ + List allUsers (); + + /** + * Returns a list with all public and member-visible users. Members are + * logged-in users. ;-) + *

+ * @return A list of public and member-visible users + */ + List allMemberPublicVisibleUsers (); + + /** + * Returns a list of all public user profiles + *

+ * @return A list of all public user profiles + */ + List allPublicUsers (); + + /** + * Fills given user instance with all available data + *

+ * @param user Initial User instance + *

+ * @return Prepared User instance + */ + User fillUserData (final User user); + + /** + * Some "getter" for a full user name list + *

+ * @return User name list + */ + List getUserNameList (); + + /** + * Some "getter" for a full email address list + *

+ * @return User name list + */ + List getEmailAddressList (); + + /** + * Checks if given user id exists + *

+ * @param userId User id to check + *

+ * @return Whether the user id exists + */ + boolean ifUserIdExists (final Long userId); + + /** + * Checks if given user name is already used + *

+ * @param userName User name to check + *

+ * @return Whether given user name is found + */ + boolean ifUserNameExists (final String userName); + + /** + * Checks if given user exists + *

+ * @param user User to check + *

+ * @return Whether the user exists + */ + boolean ifUserExists (final User user); + + /** + * Checks if the the given user's name is already registered + *

+ * @param user User instance + *

+ * @return Whether the user is already registered + */ + boolean isUserNameRegistered (final User user); + + /** + * Checks if the the given user's email address is already registered + *

+ * @param user User instance + *

+ * @return Whether the user is already registered + */ + boolean isEmailAddressRegistered (final User user); + + /** + * Updates given user instance in database + *

+ * @param user User instance to update + *

+ * @return Updated user instance (detached) + */ + User updateUserPersonalData (final User user); + +} -- 2.39.5