<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
-<project name="juser-lib" default="default" basedir=".">
- <description>Builds, tests, and runs the project juser-lib.</description>
+<project name="juser-activity-lib" default="default" basedir=".">
+ <description>Builds, tests, and runs the project juser-activity-lib.</description>
<import file="nbproject/build-impl.xml"/>
<!--
An example of overriding the target for project execution could look like this:
- <target name="run" depends="juser-lib-impl.jar">
+ <target name="run" depends="juser-activity-lib-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
- cleanup\r
\r
-->\r
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="juser-lib-impl">\r
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="juser-activity-lib-impl">\r
<fail message="Please build using Ant 1.8.0 or higher.">\r
<condition>\r
<not>\r
</fileset>\r
</union>\r
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>\r
- <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="juser-lib" testname="TestNG tests" workingDir="${work.dir}">\r
+ <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="juser-activity-lib" testname="TestNG tests" workingDir="${work.dir}">\r
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>\r
<propertyset>\r
<propertyref prefix="test-sys-prop."/>\r
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">\r
<isset property="test.method"/>\r
</condition>\r
- <condition else="-suitename juser-lib -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">\r
+ <condition else="-suitename juser-activity-lib -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">\r
<matches pattern=".*\.xml" string="@{testClass}"/>\r
</condition>\r
<delete dir="${build.test.results.dir}" quiet="true"/>\r
<delete file="${built-jar.properties}" quiet="true"/>\r
</target>\r
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">\r
- <echo level="warn" message="Cycle detected: juser-lib was already built"/>\r
+ <echo level="warn" message="Cycle detected: juser-activity-lib was already built"/>\r
</target>\r
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">\r
<mkdir dir="${build.dir}"/>\r
<delete file="${built-clean.properties}" quiet="true"/>\r
</target>\r
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">\r
- <echo level="warn" message="Cycle detected: juser-lib was already built"/>\r
+ <echo level="warn" message="Cycle detected: juser-activity-lib was already built"/>\r
</target>\r
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">\r
<mkdir dir="${build.dir}"/>\r
annotation.processing.processors.list=\r
annotation.processing.run.all.processors=true\r
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output\r
-application.title=juser-lib\r
+application.title=juser-activity-lib\r
application.vendor=Roland Haeder\r
build.classes.dir=${build.dir}/classes\r
build.classes.excludes=**/*.java,**/*.form\r
dist.archive.excludes=\r
# This directory is removed when the project is cleaned:\r
dist.dir=dist\r
-dist.jar=${dist.dir}/juser-lib.jar\r
+dist.jar=${dist.dir}/juser-activity-lib.jar\r
dist.javadoc.dir=${dist.dir}/javadoc\r
endorsed.classpath=\r
excludes=\r
+file.reference.juser-activity-core.jar=lib/juser-activity-core.jar\r
file.reference.juser-core.jar=lib/juser-core.jar\r
includes=**\r
jar.archive.disabled=${jnlp.enabled}\r
jar.index=${jnlp.enabled}\r
javac.classpath=\\r
${file.reference.juser-core.jar}:\\r
+ ${file.reference.juser-activity-core.jar}:\\r
${libs.javaee-api-7.0.classpath}\r
# Space-separated list of extra javac options\r
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation\r
javadoc.splitindex=true\r
javadoc.use=true\r
javadoc.version=true\r
-javadoc.windowtitle=User EJB Library\r
+javadoc.windowtitle=User Activity Remote Library\r
jnlp.codebase.type=no.codebase\r
jnlp.descriptor=application\r
jnlp.enabled=false\r
${javac.test.classpath}:\\r
${build.test.classes.dir}\r
source.encoding=UTF-8\r
+source.reference.juser-activity-core.jar=../juser-activity-core/src/\r
source.reference.juser-core.jar=../juser-core/src/\r
src.dir=src\r
test.src.dir=test\r
<type>org.netbeans.modules.java.j2seproject</type>\r
<configuration>\r
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">\r
- <name>juser-lib</name>\r
+ <name>juser-activity-lib</name>\r
<source-roots>\r
<root id="src.dir"/>\r
</source-roots>\r
+++ /dev/null
-/*
- * 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.email_address;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Remote;
-
-/**
- * A remote interface for changing email addresses
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Remote
-public interface UserEmailChangeSessionBeanRemote extends Serializable {
-
- /**
- * Checks whether given email address is already enqueued
- * <p>
- * @param emailAddress Email address to check
- * <p>
- * @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
- * <p>
- * @return A list of all queued email addresses
- */
- List<String> allQueuedAddresses ();
-
- /**
- * "Enqueues" given email change object
- * <p>
- * @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.
- * <p>
- * @param emailChange Email change instance to mark as used
- */
- void updateEmailAddress (final ChangeableEmailAddress emailChange);
-
-}
+++ /dev/null
-/*
- * 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.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
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Remote
-public interface UserLoginSessionBeanRemote extends Serializable {
-
- /**
- * Validates if the user is a confirmed account and returns the full user
- * instance
- * <p>
- * @param container Login container holding user instance and unencrypted password
- * <p>
- * @return Full confirmed user account
- * <p>
- * @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;
-}
+++ /dev/null
-/*
- * 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.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
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@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".
- * <p>
- * @param user User instance
- * <p>
- * @return Non-existing confirmation key
- */
- String generateConfirmationKey (User user);
-
- /**
- * Registers given user data, if not yet found
- * <p>
- * @param user User instance to register
- * @param baseUrl Base URL
- * <p>
- * @return The fully registered user account
- * <p>
- * @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
- * <p>
- * @param user User instance to check
- * <p>
- * @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
- * <p>
- * @param user User instance to check
- * <p>
- * @return Whether the user's email address has already been registered
- */
- boolean isEmailAddressRegistered (final User user);
-}
+++ /dev/null
-/*
- * 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 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
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Remote
-public interface AdminUserSessionBeanRemote extends Serializable {
-
- /**
- * Locks given user account with given reason
- * <p>
- * @param user User account to be locked, must be status CONFIRMED
- * @param userLockReason Lock reason
- * @param baseUrl Base URL for all URLs
- * <p>
- * @return Updated (and detached) user instance
- * <p>
- * @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
- * <p>
- * @param user User account to be unlocked, must be status LOCKED
- * @param baseUrl Base URL for all URLs
- * <p>
- * @return Updated (and detached) user instance
- * <p>
- * @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
- * <p>
- * @param user User instance to
- * <p>
- * @return Updated user instance
- * <p>
- * @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.
- * <p>
- * @param user User instance to add
- * <p>
- * @return Updated user instance
- * <p>
- * @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;
-
-}
+++ /dev/null
-/*
- * 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.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>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@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.
- * <p>
- * @param user User instance with updated password
- * <p>
- * @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.
- * <p>
- * @param user Unconfirmed user instance
- * @param baseUrl Base URL
- * <p>
- * @return Updated user instance
- * <p>
- * @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.
- * <p>
- * @return Generated user name
- */
- String generateRandomUserName ();
-
- /**
- * 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;
-
- /**
- * 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 isUserNameRegistered (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 isEmailAddressRegistered (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);
-
-}
+++ /dev/null
-/*
- * 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.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
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@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.
- * <p>
- * @param user User instance to get all password histories for
- * <p>
- * @return List of all user's password history
- */
- List<PasswordHistory> getUserPasswordHistory (final User user);
-
-}