From: Roland Häder Date: Wed, 24 Aug 2016 14:45:50 +0000 (+0200) Subject: JUser-Activity-Lib has derived from juser-lib and is the remote-interface X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f8be1f815ae2ef0096595f8c0146a288f7f9c33d;p=juser-activity-lib.git JUser-Activity-Lib has derived from juser-lib and is the remote-interface project for JUser-Activity-Core and will be GNU GPL v3 Signed-off-by: Roland Häder --- diff --git a/build.xml b/build.xml index ce0b319..9409a80 100644 --- a/build.xml +++ b/build.xml @@ -7,8 +7,8 @@ - - Builds, tests, and runs the project juser-lib. + + Builds, tests, and runs the project juser-activity-lib. - + @@ -474,7 +474,7 @@ is divided into following sections: - + @@ -625,7 +625,7 @@ is divided into following sections: - + @@ -917,7 +917,7 @@ is divided into following sections: - + @@ -1402,7 +1402,7 @@ is divided into following sections: - + diff --git a/nbproject/project.properties b/nbproject/project.properties index 258a2f3..2b35d6d 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -3,7 +3,7 @@ annotation.processing.enabled.in.editor=true annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=juser-lib +application.title=juser-activity-lib application.vendor=Roland Haeder build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form @@ -25,10 +25,11 @@ debug.test.classpath=\ dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist -dist.jar=${dist.dir}/juser-lib.jar +dist.jar=${dist.dir}/juser-activity-lib.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= +file.reference.juser-activity-core.jar=lib/juser-activity-core.jar file.reference.juser-core.jar=lib/juser-core.jar includes=** jar.archive.disabled=${jnlp.enabled} @@ -36,6 +37,7 @@ jar.compress=false jar.index=${jnlp.enabled} javac.classpath=\ ${file.reference.juser-core.jar}:\ + ${file.reference.juser-activity-core.jar}:\ ${libs.javaee-api-7.0.classpath} # Space-separated list of extra javac options javac.compilerargs=-Xlint:unchecked -Xlint:deprecation @@ -60,7 +62,7 @@ javadoc.private=true javadoc.splitindex=true javadoc.use=true javadoc.version=true -javadoc.windowtitle=User EJB Library +javadoc.windowtitle=User Activity Remote Library jnlp.codebase.type=no.codebase jnlp.descriptor=application jnlp.enabled=false @@ -89,6 +91,7 @@ run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 +source.reference.juser-activity-core.jar=../juser-activity-core/src/ source.reference.juser-core.jar=../juser-core/src/ src.dir=src test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml index a7f90c2..b27657f 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -3,7 +3,7 @@ org.netbeans.modules.java.j2seproject - juser-lib + juser-activity-lib diff --git a/src/org/mxchange/jusercore/model/email_address/UserEmailChangeSessionBeanRemote.java b/src/org/mxchange/jusercore/model/email_address/UserEmailChangeSessionBeanRemote.java deleted file mode 100644 index f51e8de..0000000 --- a/src/org/mxchange/jusercore/model/email_address/UserEmailChangeSessionBeanRemote.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.email_address; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; - -/** - * A remote interface for changing email addresses - *

- * @author Roland Haeder - */ -@Remote -public interface UserEmailChangeSessionBeanRemote extends Serializable { - - /** - * Checks whether given email address is already enqueued - *

- * @param emailAddress Email address to check - *

- * @return Whether the email address has already been enqueued - */ - boolean isEmailAddressEnqueued (final String emailAddress); - - /** - * Returns a list of all queued email addresses, not limited to a user - *

- * @return A list of all queued email addresses - */ - List allQueuedAddresses (); - - /** - * "Enqueues" given email change object - *

- * @param emailChange Email change instance to insert - * @param baseUrl Base URL - */ - void enqueueEmailAddressForChange (final ChangeableEmailAddress emailChange, final String baseUrl); - - /** - * Updates given user's email address. - *

- * @param emailChange Email change instance to mark as used - */ - void updateEmailAddress (final ChangeableEmailAddress emailChange); - -} diff --git a/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java b/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java deleted file mode 100644 index 5bd5e54..0000000 --- a/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.login; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jusercore.container.login.LoginContainer; -import org.mxchange.jusercore.exceptions.UserNotFoundException; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; -import org.mxchange.jusercore.exceptions.UserStatusLockedException; -import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; -import org.mxchange.jusercore.model.user.User; - -/** - * A remote interface for user login - *

- * @author Roland Haeder - */ -@Remote -public interface UserLoginSessionBeanRemote extends Serializable { - - /** - * Validates if the user is a confirmed account and returns the full user - * instance - *

- * @param container Login container holding user instance and unencrypted password - *

- * @return Full confirmed user account - *

- * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the - * user account was not found - * @throws org.mxchange.jusercore.exceptions.UserStatusLockedException If - * the user account is locked - * @throws org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException - * If the user account is unconfirmed - * @throws org.mxchange.jusercore.exceptions.UserPasswordMismatchException - * If the password is not matching - */ - User validateUserAccountStatus (final LoginContainer container) throws UserNotFoundException, UserStatusLockedException, UserStatusUnconfirmedException, UserPasswordMismatchException; -} diff --git a/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java b/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java deleted file mode 100644 index ad76114..0000000 --- a/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.register; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; -import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; -import org.mxchange.jusercore.model.user.User; - -/** - * A remote interface for user registtration - *

- * @author Roland Haeder - */ -@Remote -public interface UserRegistrationSessionBeanRemote extends Serializable { - - /** - * Generates a non-existing confirmation key for given user instance. The - * user instance is being used as entropy source to make the key more harder - * to "guess". - *

- * @param user User instance - *

- * @return Non-existing confirmation key - */ - String generateConfirmationKey (User user); - - /** - * Registers given user data, if not yet found - *

- * @param user User instance to register - * @param baseUrl Base URL - *

- * @return The fully registered user account - *

- * @throws UserNameAlreadyRegisteredException If the user name has already - * been registered - * @throws EmailAddressAlreadyRegisteredException If the email address has - * already been registered - */ - User registerUser (final User user, final String baseUrl) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException; - - /** - * Checks if the user's name is already registered - *

- * @param user User instance to check - *

- * @return Whether the user's name has already been registered - */ - boolean isUserNameRegistered (final User user); - - /** - * Checks if the user's email address is already registered - *

- * @param user User instance to check - *

- * @return Whether the user's email address has already been registered - */ - boolean isEmailAddressRegistered (final User user); -} diff --git a/src/org/mxchange/jusercore/model/user/AdminUserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/AdminUserSessionBeanRemote.java deleted file mode 100644 index 2b2ccec..0000000 --- a/src/org/mxchange/jusercore/model/user/AdminUserSessionBeanRemote.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 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; - -/** - * An interface for administrative user beans - *

- * @author Roland Haeder - */ -@Remote -public interface AdminUserSessionBeanRemote extends Serializable { - - /** - * Locks given user account with given reason - *

- * @param user User account to be locked, must be status CONFIRMED - * @param userLockReason Lock reason - * @param baseUrl Base URL for all URLs - *

- * @return Updated (and detached) user instance - *

- * @throws UserStatusLockedException The account is already locked - * @throws UserStatusUnconfirmedException The account is not confirmed - * @throws UserNotFoundException The user account is not found - */ - User lockUserAccount (final User user, final String userLockReason, final String baseUrl) throws UserStatusLockedException, UserStatusUnconfirmedException, UserNotFoundException; - - /** - * Unlocks given user account - *

- * @param user User account to be unlocked, must be status LOCKED - * @param baseUrl Base URL for all URLs - *

- * @return Updated (and detached) user instance - *

- * @throws UserStatusConfirmedException The account is already locked - * @throws UserStatusUnconfirmedException The account is not confirmed - * @throws UserNotFoundException The user account is not found - */ - User unlockUserAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusUnconfirmedException, UserNotFoundException; - - /** - * Creates the user instance and links it with the set contact instance - *

- * @param user User instance to - *

- * @return Updated user instance - *

- * @throws UserNameAlreadyRegisteredException When the user name is already - * used - * @throws EmailAddressAlreadyRegisteredException When the email address is - * already used - */ - User linkUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException; - - /** - * 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 UserNameAlreadyRegisteredException When the user name is already - * used - * @throws EmailAddressAlreadyRegisteredException When the email address is - * already used - */ - User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException; - -} diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java deleted file mode 100644 index 8509e4a..0000000 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * 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.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 - *

- * @author Roland Haeder - */ -@Remote -public interface UserSessionBeanRemote extends Serializable { - - /** - * Updates user's password (must be set encrypted before calling this - * method) and records the password change in user's password history. - *

- * @param user User instance with updated password - *

- * @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 - */ - PasswordHistory updateUserPassword (final User user) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException; - - /** - * Changes the user' account status to CONFIRMED if the status is - * UNCONFIRMED, else propper exceptions are thrown. - *

- * @param user Unconfirmed user instance - * @param baseUrl Base URL - *

- * @return Updated user instance - *

- * @throws UserStatusConfirmedException If the user account is confirmed - * @throws UserStatusLockedException If the user account is locked - */ - User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException; - - /** - * Generates random user name that is available. - *

- * @return Generated user name - */ - String generateRandomUserName (); - - /** - * 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; - - /** - * 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); - -} diff --git a/src/org/mxchange/jusercore/model/user/password_history/UserPasswordHistorySessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/password_history/UserPasswordHistorySessionBeanRemote.java deleted file mode 100644 index a244cd6..0000000 --- a/src/org/mxchange/jusercore/model/user/password_history/UserPasswordHistorySessionBeanRemote.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.password_history; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jusercore.model.user.User; - -/** - * A remote interface for user's password history - *

- * @author Roland Haeder - */ -@Remote -public interface UserPasswordHistorySessionBeanRemote extends Serializable { - - /** - * Returns a list of user's password history entries ("unlimited"). The - * application then should limit the amount by itself for its specific - * purpose. If the user has never changed password, an empty list is being - * returned. - *

- * @param user User instance to get all password histories for - *

- * @return List of all user's password history - */ - List getUserPasswordHistory (final User user); - -}