From e638bc6589517ff5c0285aa6b171f7670ee8bf78 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 13 Apr 2017 14:58:21 +0200 Subject: [PATCH] renamed namespace to jfinancials (Java naming-convention) + renamed *Addressbook* to *Financials* to not have confusions in IDEs like Netbeans MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- lib/addressbook-mailer.jar | Bin 9319 -> 0 bytes ...ressbook-core.jar => jfinancials-core.jar} | Bin 17751 -> 17746 bytes lib/jfinancials-mailer.jar | Bin 0 -> 9309 bytes nbproject/build-impl.xml | 16 +- nbproject/genfiles.properties | 4 +- .../addressbook/AddressbookSessionBean.java | 405 ------------------ .../shared/SharedAddressbooksSessionBean.java | 207 --------- ...=> FinancialsAdminContactSessionBean.java} | 6 +- ...java => FinancialsContactSessionBean.java} | 6 +- ...nancialsAdminContactPhoneSessionBean.java} | 4 +- ...va => FinancialsCountrySingletonBean.java} | 2 +- .../FinancialsResendLinkSessionBean.java} | 6 +- .../FinancialsEmailDeliveryMessageBean.java} | 12 +- ...ncialsAdminMobileProviderSessionBean.java} | 2 +- ...inancialsMobileProviderSingletonBean.java} | 2 +- ...a => FinancialsAdminPhoneSessionBean.java} | 4 +- ...n.java => FinancialsPhoneSessionBean.java} | 4 +- ...FinancialsUserEmailChangeSessionBean.java} | 6 +- ...va => FinancialsUserLoginSessionBean.java} | 2 +- ...inancialsUserRegistrationSessionBean.java} | 4 +- ...va => FinancialsAdminUserSessionBean.java} | 6 +- ...an.java => FinancialsUserSessionBean.java} | 6 +- ...ncialsUserPasswordHistorySessionBean.java} | 6 +- 23 files changed, 49 insertions(+), 661 deletions(-) delete mode 100644 lib/addressbook-mailer.jar rename lib/{addressbook-core.jar => jfinancials-core.jar} (56%) create mode 100644 lib/jfinancials-mailer.jar delete mode 100644 src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java delete mode 100644 src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java rename src/java/org/mxchange/jcontacts/contact/{AddressbookAdminContactSessionBean.java => FinancialsAdminContactSessionBean.java} (93%) rename src/java/org/mxchange/jcontacts/contact/{AddressbookContactSessionBean.java => FinancialsContactSessionBean.java} (98%) rename src/java/org/mxchange/jcontacts/phone/{AddressbookAdminContactPhoneSessionBean.java => FinancialsAdminContactPhoneSessionBean.java} (99%) rename src/java/org/mxchange/jcountry/data/{AddressbookCountrySingletonBean.java => FinancialsCountrySingletonBean.java} (97%) rename src/java/org/mxchange/{addressbook/beans/resendlink/AddressbookResendLinkSessionBean.java => jfinancials/beans/resendlink/FinancialsResendLinkSessionBean.java} (93%) rename src/java/org/mxchange/{addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java => jfinancials/mailer/model/delivery/FinancialsEmailDeliveryMessageBean.java} (94%) rename src/java/org/mxchange/jphone/phonenumbers/mobileprovider/{AddressbookAdminMobileProviderSessionBean.java => FinancialsAdminMobileProviderSessionBean.java} (96%) rename src/java/org/mxchange/jphone/phonenumbers/mobileprovider/{AddressbookMobileProviderSingletonBean.java => FinancialsMobileProviderSingletonBean.java} (94%) rename src/java/org/mxchange/jphone/phonenumbers/phone/{AddressbookAdminPhoneSessionBean.java => FinancialsAdminPhoneSessionBean.java} (98%) rename src/java/org/mxchange/jphone/phonenumbers/phone/{AddressbookPhoneSessionBean.java => FinancialsPhoneSessionBean.java} (98%) rename src/java/org/mxchange/jusercore/model/email_address/{AddressbookUserEmailChangeSessionBean.java => FinancialsUserEmailChangeSessionBean.java} (97%) rename src/java/org/mxchange/jusercore/model/login/{AddressbookUserLoginSessionBean.java => FinancialsUserLoginSessionBean.java} (98%) rename src/java/org/mxchange/jusercore/model/register/{AddressbookUserRegistrationSessionBean.java => FinancialsUserRegistrationSessionBean.java} (97%) rename src/java/org/mxchange/jusercore/model/user/{AddressbookAdminUserSessionBean.java => FinancialsAdminUserSessionBean.java} (98%) rename src/java/org/mxchange/jusercore/model/user/{AddressbookUserSessionBean.java => FinancialsUserSessionBean.java} (99%) rename src/java/org/mxchange/jusercore/model/user/password_history/{AddressbookUserPasswordHistorySessionBean.java => FinancialsUserPasswordHistorySessionBean.java} (90%) diff --git a/lib/addressbook-mailer.jar b/lib/addressbook-mailer.jar deleted file mode 100644 index 4c2cc0eddcc66f80a75a1568d6fc58a6f14254f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9319 zcmeHNYjhOV9sf_V$t;_VKzJEJogmNz$S&Xu!pluaAR!4U2|=(GC%ZSBA+s}aW)=uO zs@7MnwzXPYZKLmQ6L>i4fghQ504}UdInTO8)vrDKFTaxGmQ>qZDLJhEMl14ZY*^dAK9AGb+N;{H5p zONSFdA5ANptW449QRI%KCsZTLs*pC9lB$`E#cX@bG$*UDDb?6=s-`om3ipb0;Le#D zrdN@XJZBk@qa9+_bQNKU8**4~N{74bDsB7%dURqA5kGp)zkjK~^aH|# ziL|cT_USXPy#--c(w}2EWn#3BSd_+P%EoAdv<5mzlQQX1%Ed?~qk&ACiqg&eYDLM8 z(Mob;%17x?jApy<4@c=pl%_e!(J0-*ueV0&wiw+`Uy0HkT*aMHx+_LsrMo%*J^ZA_ z=w7-{ru$>m!n<)hIsEjs26}+L-arr1L;Um&nZDIPt@N-=-{#jxqV#B#zQcJQn+3Vw z<-)%grN?D@LZ4I@gCEE3J{Kd2s3k0g0x(reu)QS%fgAL|$W6T;+p-ZBs zelv{$sTdZXy~c<$p+R|PKhNGmZieKGAs}xH7}B zKvdW5UgN!n!K^MGu?(YJ;PU1jIAuVcS|+H#9%oz`*Nh%W)b$y3SfZ$(loDMg1Y%sk z;^ZNwn`zCNPL6oVjSk3Z({R`kN229rNk=^%1Ro~@$HHP~PEYv`-B@mnn?gq0HFl7t z9gj?y(QDZPv5muynx2GhM0m(_45=m450O7e9g!VRN)+opl4etUR-vzX!BkeEr%1`L0!6bG17y5g&&l*;oPJ8rLr9n=VX?F}r6HsO z>KEumiHf?Ku=B#8Jlz7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ceer4Awztk06%MX7FCR6V}8c53aTzX%k#3tP4Y=pDa;x-F-^=cYlkN2&!_;B<}8|9 z{TLrvgwF!{Aj7YvlX~}1KVYqNtj`(v=lJcd_${%94*3Um1rjP9x(jxp{4coW`w=s7 z@Uvp~!@K)$+?H)j&BV$N<=qcwU4}xujJ5oTzIvY(UyA7S;7nq~Qk@^!SC_V`Od3Dp zuG%S2nty~}T_!)ocRzfff19<;TyUgcT{u6~4}>oV2nS1f>TW%SVB zS9<*RB3Nf6avT3m - + @@ -880,13 +880,13 @@ exists or setup the property manually. For example like this: - - - - - - - + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 765a886..70d335f 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=7d41e0fd build.xml.stylesheet.CRC32=5910fda3@1.51.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=a1065659 -nbproject/build-impl.xml.script.CRC32=a95e8592 +nbproject/build-impl.xml.data.CRC32=0e5e9614 +nbproject/build-impl.xml.script.CRC32=5b56e085 nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1 diff --git a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java deleted file mode 100644 index f1c6b98..0000000 --- a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright (C) 2016 Roland Häder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero 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 Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.mxchange.addressbook.model.addressbook; - -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.GregorianCalendar; -import java.util.LinkedList; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.NoResultException; -import javax.persistence.Query; -import org.mxchange.jaddressbookcore.exceptions.AddressbookNameAlreadyUsedException; -import org.mxchange.jaddressbookcore.exceptions.AddressbookNotFoundException; -import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; -import org.mxchange.jaddressbookcore.model.addressbook.UserAddressbook; -import org.mxchange.jaddressbookcore.model.addressbook.entry.AddressbookEntry; -import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook; -import org.mxchange.jcoreee.database.BaseDatabaseBean; -import org.mxchange.jusercore.model.user.User; - -/** - * A stateless bean handling addressbooks - *

- * @author Roland Häder - */ -@Stateless (name = "addressbook", description = "A stateless bean for handling Addressbook addressbooks") -public class AddressbookSessionBean extends BaseDatabaseBean implements AddressbookSessionBeanRemote { - - /** - * Serial number - */ - private static final long serialVersionUID = 129_857_871_287_691L; - - @Override - @SuppressWarnings ("unchecked") - public List allEntries (final Addressbook addressbook) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("allEntries: addressbook={0} - CALLED!", addressbook)); //NOI18N - - // Validate parameter - if (null == addressbook) { - // Throw NPE - throw new NullPointerException("addressbook is null"); - } else if (addressbook.getAddressbookId() == null) { - // Throw NPE again - throw new NullPointerException("addressbook.addressbookId is null"); - } else if (addressbook.getAddressbookId() < 1) { - // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookId={0} is invalid.", addressbook.getAddressbookId())); - } else if (addressbook.getAddressbookUser() == null) { - // Throw again NPE - throw new NullPointerException("addressbook.addressbookUser is null"); - } else if (addressbook.getAddressbookUser().getUserId() == null) { - // Throw again NPE - throw new NullPointerException("addressbook.addressbookUser.userId is null"); - } else if (addressbook.getAddressbookUser().getUserId() < 1) { - // Invalid id number again - throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookUser.userId={0} is invalid", addressbook.getAddressbookUser().getUserId())); - } - - // Generate query - Query query = this.getEntityManager().createNamedQuery("SearchUsersAddressbookEntries", List.class); //NOI18N - - // Set parameters - query.setParameter("addressbook", addressbook); //NOI18N - query.setParameter("owner", addressbook.getAddressbookUser()); //NOI18N - - // Return it - return query.getResultList(); - } - - @Override - @SuppressWarnings ("unchecked") - public List allUsersNotSharing (final User user, final Addressbook addressbook) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("allUsersNotSharing: user={0},addressbook={1} - CALLED!", user, addressbook)); //NOI18N - - // Test parameter - if (null == user) { - // Throw NPE - throw new NullPointerException("user is null"); //NOI18N - } else if (user.getUserId() == null) { - // Throw NPE again - throw new NullPointerException("user.userId is null"); //NOI18N - } else if (user.getUserId() < 1) { - // Invalid id - throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is invalid", user.getUserId())); //NOI18N - } else if (null == addressbook) { - // Again NPE - throw new NullPointerException("addressbook is null"); //NOI18N - } else if (addressbook.getAddressbookId() == null) { - // Again NPE - throw new NullPointerException("addressbook.addressbookId is null"); //NOI18N - } else if (addressbook.getAddressbookId() < 1) { - // Invalid id - throw new IllegalArgumentException(MessageFormat.format("addressbook.getAddressbookId={0} is invalid", addressbook.getAddressbookId())); //NOI18N - } - - // Get named query for a user list without given user - Query allUsersExceptQuery = this.getEntityManager().createNamedQuery("SearchAllUsersExcept", List.class); //NOI18N - - // Set parameter - allUsersExceptQuery.setParameter("user", user); //NOI18N - - // Get full list - List allUsersExcept = allUsersExceptQuery.getResultList(); - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allUsersExcept.size()={0}", allUsersExcept.size())); //NOI18N - - // Now get all shares this user has created - Query allSharesQuery = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks", List.class); //NOI18N - - // Set parameter - allSharesQuery.setParameter("user", user); //NOI18N - - // Get full list again - List allShares = allSharesQuery.getResultList(); - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allShares.size()={0}", allShares.size())); //NOI18N - - // List for users aharing with given - List sharingUsers = new ArrayList<>(allShares.size()); - - // Check all entries - for (final ShareableAddressbook share : allShares) { - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: share.shareUserSharee={0}", share.getShareUserSharee())); //NOI18N - - // Add it - sharingUsers.add(share.getShareUserSharee()); - } - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: sharingUsers.size()={0}", sharingUsers.size())); //NOI18N - - // Init final user list - List userList = new LinkedList<>(); - - // Walk through all users - for (final User foundUser : allUsersExcept) { - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: foundUser={0}", foundUser)); //NOI18N - - // Does the list contain it ? - if (!sharingUsers.contains(foundUser)) { - // Found one to add - this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: foundUser={0} - ADDING!", foundUser)); //NOI18N - - // Add it - userList.add(foundUser); - } - } - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("allUsersNotSharing: userList.size()={0} - EXIT!", userList.size())); //NOI18N - - // Return it - return userList; - } - - @Override - @SuppressWarnings ("unchecked") - public Integer countAllUserSharedAddressbooks (final User user) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("countAllUserSharedAddressbooks: user={0} - CALLED!", user)); //NOI18N - - // user should be valid - if (null == user) { - // Throw NPE - throw new NullPointerException("user is null"); //NOI18N - } else if (user.getUserId() == null) { - // Throw NPE again - throw new NullPointerException("user.userId is null"); //NOI18N - } else if (user.getUserId() < 1) { - // Invalid id - throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is invalid", user.getUserId())); //NOI18N - } - - // Get named query - Query query = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks", List.class); //NOI18N - - // Set parameter - query.setParameter("user", user); //NOI18N - - // Default is zero - Integer count = 0; - - // Try it - try { - // Get whole list - List dummy = query.getResultList(); - - // Set size - count = dummy.size(); - } catch (final NoResultException ex) { - // Need to catch this, so log it - this.getLoggerBeanLocal().logDebug(MessageFormat.format("countAllUserSharedAddressbooks: getResultList() failed: {0}", ex)); //NOI18N - } - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("countAllUserSharedAddressbooks: count={0} - EXIT!", count)); //NOI18N - - // Return count - return count; - } - - @Override - public Addressbook createAddressbook (final Addressbook addressbook) throws AddressbookNameAlreadyUsedException { - // Is it not null? - if (null == addressbook) { - // Abort here - throw new NullPointerException("addressbook is null"); //NOI18N - } else if (addressbook.getAddressbookUser() == null) { - // User instance is null - throw new NullPointerException("addressbook.user should not be null."); //NOI18N - } else if (addressbook.getAddressbookName() == null) { - // Address book name not set - throw new NullPointerException("addressbook.addressbookName should not be null"); //NOI18N - } else if (addressbook.getAddressbookName().isEmpty()) { - // Address book name not set - throw new IllegalArgumentException("addressbook.addressbookName should not be empty"); //NOI18N - } else if (this.isAddressbookNameUsed(addressbook)) { - // The assigned user already used that name - throw new AddressbookNameAlreadyUsedException(addressbook); - } - - // Add timestamp of creation - addressbook.setAddressbookCreated(new GregorianCalendar()); - - // Persist it now - this.getEntityManager().persist(addressbook); - - // Flush it to get all data - this.getEntityManager().flush(); - - // Return it updated - return addressbook; - } - - @Override - public Addressbook getAddressbookById (final Long addressbookId) throws AddressbookNotFoundException { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("getAddressbookById: addressbookId={0} - CALLED!", addressbookId)); //NOI18N - - // addressbookId should not be null or below 1 - if (null == addressbookId) { - // Throw NPE - throw new NullPointerException("addressbookId is null"); //NOI18N - } else if (addressbookId < 1) { - // Not valid - throw new IllegalArgumentException(MessageFormat.format("addressbookId is not valid: {0}", addressbookId)); //NOI18N - } else if (!this.isAddressbookIdUsed(addressbookId)) { - // No address book found - throw new AddressbookNotFoundException(addressbookId); - } - - // Get named query instance - Query query = this.getEntityManager().createNamedQuery("SearchAddressbookById", UserAddressbook.class); //NOI18N - - // Set parameter - query.setParameter("id", addressbookId); //NOI18N - - // Return it - return (Addressbook) query.getSingleResult(); - } - - @Override - @SuppressWarnings ("unchecked") - public List getUsersAddressbookList (final User loggedInUser) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("getUsersList: loggedInUser={0} - CALLED!", loggedInUser)); //NOI18N - - // Is the user instance null? - if (null == loggedInUser) { - // Abort here - throw new NullPointerException("loggedInUser is null"); //NOI18N - } - - // Get query instance - Query query = this.getEntityManager().createNamedQuery("AllUsersAddressbooks", List.class); //NOI18N - - // Set parameter - query.setParameter("param", loggedInUser); //NOI18N - - // Get full list from JPA - List addressbooks = query.getResultList(); - - // Return it - return addressbooks; - } - - @Override - public boolean isAddressbookIdUsed (final Long addressbookId) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("isAddressbookIdUsed: addressbookId={0} - CALLED!", addressbookId)); //NOI18N - - // Is it null or zero? - if (null == addressbookId) { - // Throw NPE - throw new NullPointerException("addressbookId is null"); //NOI18N - } else if (addressbookId < 1) { - // Not valid id number - throw new IllegalArgumentException(MessageFormat.format("addressbookId is not valid: {0}", addressbookId)); //NOI18N - } - - // Get query instance - Query query = this.getEntityManager().createNamedQuery("SearchAddressbookById", UserAddressbook.class); //NOI18N - - // Set parameter - query.setParameter("id", addressbookId); //NOI18N - - // Default is not valid - boolean isValid = false; - - // Try it again, yes no other way - try { - // Get single result - Addressbook addressbook = (Addressbook) query.getSingleResult(); - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookIdUsed: addressbook={0} - FOUND!", addressbook)); //NOI18N - - // Found one! - isValid = true; - } catch (final NoResultException ex) { - // Debug log only, maybe out-dated link followed - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookIdUsed: addressbookId={0} is not valid: {1}", addressbookId, ex)); //NOI18N - } - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("isAddressbookIdUsed: isValid={0} - EXIT!", isValid)); //NOI18N - - // Return result - return isValid; - } - - @Override - public boolean isAddressbookNameUsed (final Addressbook addressbook) { - // Is it not null? - if (null == addressbook) { - // Abort here - throw new NullPointerException("addressbook is null"); //NOI18N - } else if (addressbook.getAddressbookUser() == null) { - // User instance is null - throw new NullPointerException("addressbook.addressbookUser is null."); //NOI18N - } else if (addressbook.getAddressbookUser().getUserId() == null) { - // User instance is null - throw new NullPointerException("addressbook.addressbookUser.userId is null."); //NOI18N - } else if (addressbook.getAddressbookUser().getUserId() < 1) { - // User instance is null - throw new NullPointerException(MessageFormat.format("addressbook.addressbookUser.userId={0} is invalid.", addressbook.getAddressbookUser().getUserId())); //NOI18N - } else if (addressbook.getAddressbookName() == null) { - // Address book name not set - throw new NullPointerException("addressbook.addressbookName should not be null"); //NOI18N - } else if (addressbook.getAddressbookName().isEmpty()) { - // Address book name not set - throw new IllegalArgumentException("addressbook.addressbookName should not be empty"); //NOI18N - } - - // Get query instance - Query query = this.getEntityManager().createNamedQuery("SearchUserAddressbookName", Addressbook.class); //NOI18N - - // Set parameter - query.setParameter("user", addressbook.getAddressbookUser()); //NOI18N - query.setParameter("name", addressbook.getAddressbookName()); //NOI18N - - // Default is not found - boolean isUsed = false; - - // Try it - try { - // Get a single result - Addressbook dummy = (Addressbook) query.getSingleResult(); - - // Log it - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookNameUsed: Found an address book: {0}", dummy)); //NOI18N - - // Found one - isUsed = true; - } catch (final NoResultException ex) { - // No result found, so log it away - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookNameUsed: getSingleResult() did not return a result: {0}", ex)); //NOI18N - } - - // Return result - return isUsed; - } -} diff --git a/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java b/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java deleted file mode 100644 index 8ff75bc..0000000 --- a/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (C) 2016 Roland Häder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero 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 Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.mxchange.addressbook.model.shared; - -import java.text.MessageFormat; -import java.util.List; -import java.util.Objects; -import javax.ejb.Stateless; -import javax.persistence.NoResultException; -import javax.persistence.Query; -import org.mxchange.jaddressbookcore.exceptions.UserAlreadySharingAddressbookException; -import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; -import org.mxchange.jaddressbookcore.model.addressbook.shared.AddressbookShare; -import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook; -import org.mxchange.jcoreee.database.BaseDatabaseBean; -import org.mxchange.jusercore.model.user.User; - -/** - * A stateless bean for handling address book sharing - *

- * @author Roland Häder - */ -@Stateless (name = "share", description = "A stateless bean for handling shared addressbooks") -public class SharedAddressbooksSessionBean extends BaseDatabaseBean implements SharedAddressbooksSessionBeanRemote { - - /** - * Serial number - */ - private static final long serialVersionUID = 136_984_697_285_694_710L; - - @Override - @SuppressWarnings ("unchecked") - public List allSharedAddressbooks (final User user) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("allSharedAddressbooks: user={0} - CALLED!", user)); //NOI18N - - // Is user null? - if (null == user) { - // Throw NPE - throw new NullPointerException("user is null"); //NOI18N - } else if (user.getUserId() == null) { - // Null userId is not allowed - throw new NullPointerException("user.userId is null"); //NOI18N - } else if (user.getUserId() < 1) { - // Not allowed value - throw new IllegalArgumentException(MessageFormat.format("user.UserId={0} is an invalid value", user.getUserId())); //NOI18N - } - - // Get named query - Query query = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks", List.class); //NOI18N - - // Set parameter - query.setParameter("user", user); //NOI18N - - // Return full list - List list = query.getResultList(); - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("allSharedAddressbooks: list.size()={0} - EXIT!", list.size())); - - // Return list - return list; - } - - @Override - public Boolean isUserSharingAddressbooks (final User user) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserSharingAddressbooks: user={0} - CALLED!", user)); //NOI18N - - // Is user null? - if (null == user) { - // Throw NPE - throw new NullPointerException("user is null"); //NOI18N - } else if (user.getUserId() == null) { - // Null userId is not allowed - throw new NullPointerException("user.userId is null"); //NOI18N - } else if (user.getUserId() < 1) { - // Not allowed value - throw new IllegalArgumentException(MessageFormat.format("user.UserId={0} is an invalid value", user.getUserId())); //NOI18N - } - - // Get results - List list = this.allSharedAddressbooks(user); - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserSharingAddressbooks: list.size()={0}", list.size())); //NOI18N - - // Is it not empty? - Boolean isSharing = (!list.isEmpty()); - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserSharingAddressbooks: iSharing={0} - EXIT!", isSharing)); //NOI18N - - // Return it - return isSharing; - } - - @Override - public ShareableAddressbook startSharing (final User sharee, final Addressbook addressbook) throws UserAlreadySharingAddressbookException { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("startSharing: sharee={0},addressbook={1} - CALLED!", sharee, addressbook)); //NOI18N - - // Check all conditions - if (null == sharee) { - // Throw NPE - throw new NullPointerException("sharee is null"); //NOI18N - } else if (sharee.getUserId() == null) { - // Throw NPE again - throw new NullPointerException("sharee.userId is null"); //NOI18N - } else if (sharee.getUserId() < 1) { - // Invalid id number - throw new IllegalStateException(MessageFormat.format("sharee.userId={0} is invalid", sharee.getUserId())); //NOI18N - } else if (null == addressbook) { - // Throw NPE again - throw new NullPointerException("addressbook is null"); //NOI18N - } else if (addressbook.getAddressbookId() == null) { - // Throw NPE again - throw new NullPointerException("addressbook.addressbookId is null"); //NOI18N - } else if (addressbook.getAddressbookId() < 1) { - // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookId={0} is invalid.", addressbook.getAddressbookId())); //NOI18N - } else if (Objects.equals(addressbook.getAddressbookUser(), sharee)) { - // Sharing with yourself! - throw new IllegalStateException("User tries to share with himself."); //NOI18N - } - - // Is the entry already there? - if (this.isUserAlreadySharingAddressbook(addressbook, sharee)) { - // Abort here - throw new UserAlreadySharingAddressbookException(addressbook, sharee); - } - - // All fine so far, then create the instance - ShareableAddressbook share = new AddressbookShare(addressbook, sharee); - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("startSharing: share={0}", share)); //NOI18N - - // Persist it - this.getEntityManager().persist(share); - - // Flush to get id number - this.getEntityManager().flush(); - - // Return updated instance - return share; - } - - /** - * Checks whether the owner of the given address book is already sharing it - * with the sharee. - *

- * @param addressbook Address book to be shared with - * @param sharee User sharee instance - *

- * @return Wether the address book is already shared with the sharee - */ - private boolean isUserAlreadySharingAddressbook (final Addressbook addressbook, final User sharee) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserAlreadySharingAddressbook: addressbook={0},sharee={1} - CALLED!", addressbook, sharee)); //NOI18N - - // Get named query - Query query = this.getEntityManager().createNamedQuery("SearchShareeAddressbookShare", AddressbookShare.class); //NOI18N - - // Set parameter - query.setParameter("addressbook", addressbook); //NOI18N - query.setParameter("sharee", sharee); //NOI18N - - // Default is not found - boolean isFound = false; - - // Try it - try { - // Get single instance - ShareableAddressbook share = (ShareableAddressbook) query.getSingleResult(); - - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserAlreadySharingAddressbook: share={0} - FOUND!", share)); //NOI18N - - // Set found - isFound = true; - } catch (final NoResultException ex) { - // Not found, log exception - this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserAlreadySharingAddressbook: Notfound. Exception: {0}", ex)); //NOI18N - } - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserAlreadySharingAddressbook: isFound={0} - EXIT!", isFound)); //NOI18N - - // Return it - return isFound; - } -} diff --git a/src/java/org/mxchange/jcontacts/contact/AddressbookAdminContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/FinancialsAdminContactSessionBean.java similarity index 93% rename from src/java/org/mxchange/jcontacts/contact/AddressbookAdminContactSessionBean.java rename to src/java/org/mxchange/jcontacts/contact/FinancialsAdminContactSessionBean.java index 4ed5a40..6c0e00c 100644 --- a/src/java/org/mxchange/jcontacts/contact/AddressbookAdminContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/FinancialsAdminContactSessionBean.java @@ -19,7 +19,7 @@ package org.mxchange.jcontacts.contact; import java.text.MessageFormat; import java.util.GregorianCalendar; import javax.ejb.Stateless; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; /** @@ -28,7 +28,7 @@ import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; * @author Roland Häder */ @Stateless (name = "adminContact", description = "An administrative contact EJB") -public class AddressbookAdminContactSessionBean extends BaseAddressbookDatabaseBean implements AdminContactSessionBeanRemote { +public class FinancialsAdminContactSessionBean extends BaseFinancialsDatabaseBean implements AdminContactSessionBeanRemote { /** * Serial number @@ -38,7 +38,7 @@ public class AddressbookAdminContactSessionBean extends BaseAddressbookDatabaseB /** * Default constructor */ - public AddressbookAdminContactSessionBean () { + public FinancialsAdminContactSessionBean () { } @Override diff --git a/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.java similarity index 98% rename from src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java rename to src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.java index 410ee2e..e6fe705 100644 --- a/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.java @@ -23,7 +23,7 @@ import java.util.Objects; import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jcontacts.contact.utils.ContactUtils; import org.mxchange.jcontacts.exceptions.ContactNotFoundException; @@ -33,7 +33,7 @@ import org.mxchange.jcontacts.exceptions.ContactNotFoundException; * @author Roland Häder */ @Stateless (name = "contact", description = "A bean handling contact data") -public class AddressbookContactSessionBean extends BaseAddressbookDatabaseBean implements ContactSessionBeanRemote { +public class FinancialsContactSessionBean extends BaseFinancialsDatabaseBean implements ContactSessionBeanRemote { /** * Serial number @@ -43,7 +43,7 @@ public class AddressbookContactSessionBean extends BaseAddressbookDatabaseBean i /** * Default constructor */ - public AddressbookContactSessionBean () { + public FinancialsContactSessionBean () { } @Override diff --git a/src/java/org/mxchange/jcontacts/phone/AddressbookAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jcontacts/phone/FinancialsAdminContactPhoneSessionBean.java similarity index 99% rename from src/java/org/mxchange/jcontacts/phone/AddressbookAdminContactPhoneSessionBean.java rename to src/java/org/mxchange/jcontacts/phone/FinancialsAdminContactPhoneSessionBean.java index f5d6110..5244ad1 100644 --- a/src/java/org/mxchange/jcontacts/phone/AddressbookAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jcontacts/phone/FinancialsAdminContactPhoneSessionBean.java @@ -21,7 +21,7 @@ import java.util.GregorianCalendar; import java.util.Objects; import javax.ejb.EJB; import javax.ejb.Stateless; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException; @@ -36,7 +36,7 @@ import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; * @author Roland Häder */ @Stateless (name = "adminContactPhone", description = "An administrative bean handling contact's phone data") -public class AddressbookAdminContactPhoneSessionBean extends BaseAddressbookDatabaseBean implements AdminContactsPhoneSessionBeanRemote { +public class FinancialsAdminContactPhoneSessionBean extends BaseFinancialsDatabaseBean implements AdminContactsPhoneSessionBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java b/src/java/org/mxchange/jcountry/data/FinancialsCountrySingletonBean.java similarity index 97% rename from src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java rename to src/java/org/mxchange/jcountry/data/FinancialsCountrySingletonBean.java index 4797f4e..3fce940 100644 --- a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/data/FinancialsCountrySingletonBean.java @@ -33,7 +33,7 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; */ @Startup @Singleton (name = "country", description = "A singleton session bean for country informations") -public class AddressbookCountrySingletonBean extends BaseDatabaseBean implements CountrySingletonBeanRemote { +public class FinancialsCountrySingletonBean extends BaseDatabaseBean implements CountrySingletonBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkSessionBean.java b/src/java/org/mxchange/jfinancials/beans/resendlink/FinancialsResendLinkSessionBean.java similarity index 93% rename from src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkSessionBean.java rename to src/java/org/mxchange/jfinancials/beans/resendlink/FinancialsResendLinkSessionBean.java index f08bbf5..53463a2 100644 --- a/src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkSessionBean.java +++ b/src/java/org/mxchange/jfinancials/beans/resendlink/FinancialsResendLinkSessionBean.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.addressbook.beans.resendlink; +package org.mxchange.jfinancials.beans.resendlink; import java.text.MessageFormat; import java.util.Locale; @@ -23,7 +23,7 @@ import javax.ejb.Stateless; import javax.mail.Address; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.status.UserAccountStatus; @@ -33,7 +33,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; * @author Roland Häder */ @Stateless (name = "resendLink", description = "A bean resending confirmation links") -public class AddressbookResendLinkSessionBean extends BaseAddressbookDatabaseBean implements ResendLinkSessionBeanRemote { +public class FinancialsResendLinkSessionBean extends BaseFinancialsDatabaseBean implements ResendLinkSessionBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java b/src/java/org/mxchange/jfinancials/mailer/model/delivery/FinancialsEmailDeliveryMessageBean.java similarity index 94% rename from src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java rename to src/java/org/mxchange/jfinancials/mailer/model/delivery/FinancialsEmailDeliveryMessageBean.java index ea99d16..cb33025 100644 --- a/src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java +++ b/src/java/org/mxchange/jfinancials/mailer/model/delivery/FinancialsEmailDeliveryMessageBean.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.addressbook.mailer.model.delivery; +package org.mxchange.jfinancials.mailer.model.delivery; import java.io.Serializable; import java.text.MessageFormat; @@ -28,7 +28,7 @@ import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.ObjectMessage; import javax.mail.MessagingException; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jmailee.model.delivery.wrapper.WrapableEmailDelivery; /** @@ -40,7 +40,7 @@ import org.mxchange.jmailee.model.delivery.wrapper.WrapableEmailDelivery; @ActivationConfigProperty (propertyName = "destinationLookup", propertyValue = "jms/addressbook-email-queue"), @ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) -public class AddressbookEmailDeliveryMessageBean extends BaseAddressbookDatabaseBean implements MessageListener { +public class FinancialsEmailDeliveryMessageBean extends BaseFinancialsDatabaseBean implements MessageListener { /** * Serial number @@ -55,14 +55,14 @@ public class AddressbookEmailDeliveryMessageBean extends BaseAddressbookDatabase /** * Mailer instance */ - private final DeliverableAddressbookEmail mailer; + private final DeliverableFinancialsEmail mailer; /** * Default constructor */ - public AddressbookEmailDeliveryMessageBean () { + public FinancialsEmailDeliveryMessageBean () { // Init mailer instance - this.mailer = new AddressbookMailer(); + this.mailer = new FinancialsMailer(); } /** diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java similarity index 96% rename from src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java rename to src/java/org/mxchange/jphone/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java index b9939e3..74986cd 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java @@ -28,7 +28,7 @@ import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException; * @author Roland Häder */ @Stateless (name = "adminMobileProvider", description = "A singleton session bean for mobile provider informations, admin-edition") -public class AddressbookAdminMobileProviderSessionBean extends BaseDatabaseBean implements AdminMobileProviderSessionBeanRemote { +public class FinancialsAdminMobileProviderSessionBean extends BaseDatabaseBean implements AdminMobileProviderSessionBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/FinancialsMobileProviderSingletonBean.java similarity index 94% rename from src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java rename to src/java/org/mxchange/jphone/phonenumbers/mobileprovider/FinancialsMobileProviderSingletonBean.java index 4f0122e..f469d0a 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/FinancialsMobileProviderSingletonBean.java @@ -30,7 +30,7 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean; */ @Startup @Singleton (name = "mobileprovider", description = "A singleton session bean for SMS provider informations") -public class AddressbookMobileProviderSingletonBean extends BaseDatabaseBean implements MobileProviderSingletonBeanRemote { +public class FinancialsMobileProviderSingletonBean extends BaseDatabaseBean implements MobileProviderSingletonBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java similarity index 98% rename from src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java rename to src/java/org/mxchange/jphone/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java index d4fe99f..f6e622e 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java @@ -19,7 +19,7 @@ package org.mxchange.jphone.phonenumbers.phone; import java.text.MessageFormat; import java.util.GregorianCalendar; import javax.ejb.Stateless; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; @@ -30,7 +30,7 @@ import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; * @author Roland Häder */ @Stateless (name = "adminPhone", description = "An administrative bean handling phone data") -public class AddressbookAdminPhoneSessionBean extends BaseAddressbookDatabaseBean implements AdminPhoneSessionBeanRemote { +public class FinancialsAdminPhoneSessionBean extends BaseFinancialsDatabaseBean implements AdminPhoneSessionBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/FinancialsPhoneSessionBean.java similarity index 98% rename from src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java rename to src/java/org/mxchange/jphone/phonenumbers/phone/FinancialsPhoneSessionBean.java index 0a637d0..d280e21 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/FinancialsPhoneSessionBean.java @@ -36,7 +36,7 @@ import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; * @author Roland Häder */ @Stateless (name = "phone", description = "A bean handling phone data") -public class AddressbookPhoneSessionBean extends BaseDatabaseBean implements PhoneSessionBeanRemote { +public class FinancialsPhoneSessionBean extends BaseDatabaseBean implements PhoneSessionBeanRemote { /** * Serial number @@ -46,7 +46,7 @@ public class AddressbookPhoneSessionBean extends BaseDatabaseBean implements Pho /** * Default constructor */ - public AddressbookPhoneSessionBean () { + public FinancialsPhoneSessionBean () { } @SuppressWarnings ("unchecked") diff --git a/src/java/org/mxchange/jusercore/model/email_address/AddressbookUserEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/FinancialsUserEmailChangeSessionBean.java similarity index 97% rename from src/java/org/mxchange/jusercore/model/email_address/AddressbookUserEmailChangeSessionBean.java rename to src/java/org/mxchange/jusercore/model/email_address/FinancialsUserEmailChangeSessionBean.java index dd9924f..3963452 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/AddressbookUserEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/FinancialsUserEmailChangeSessionBean.java @@ -27,7 +27,7 @@ import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.persistence.NoResultException; import javax.persistence.Query; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.UserUtils; @@ -37,7 +37,7 @@ import org.mxchange.jusercore.model.user.UserUtils; * @author Roland Häder */ @Stateless (name = "userEmailChange", description = "A bean handling user email changes") -public class AddressbookUserEmailChangeSessionBean extends BaseAddressbookDatabaseBean implements UserEmailChangeSessionBeanRemote { +public class FinancialsUserEmailChangeSessionBean extends BaseFinancialsDatabaseBean implements UserEmailChangeSessionBeanRemote { /** * Serial number @@ -53,7 +53,7 @@ public class AddressbookUserEmailChangeSessionBean extends BaseAddressbookDataba /** * Default constructor */ - public AddressbookUserEmailChangeSessionBean () { + public FinancialsUserEmailChangeSessionBean () { } @Override diff --git a/src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java b/src/java/org/mxchange/jusercore/model/login/FinancialsUserLoginSessionBean.java similarity index 98% rename from src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java rename to src/java/org/mxchange/jusercore/model/login/FinancialsUserLoginSessionBean.java index 0f4cf51..75f5ee7 100644 --- a/src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/login/FinancialsUserLoginSessionBean.java @@ -37,7 +37,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; * @author Roland Häder */ @Stateless (name = "login", description = "A bean handling the user login for Addressbook project") -public class AddressbookUserLoginSessionBean extends BaseDatabaseBean implements UserLoginSessionBeanRemote { +public class FinancialsUserLoginSessionBean extends BaseDatabaseBean implements UserLoginSessionBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java b/src/java/org/mxchange/jusercore/model/register/FinancialsUserRegistrationSessionBean.java similarity index 97% rename from src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java rename to src/java/org/mxchange/jusercore/model/register/FinancialsUserRegistrationSessionBean.java index 0e47344..ed3858f 100644 --- a/src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/register/FinancialsUserRegistrationSessionBean.java @@ -25,7 +25,7 @@ import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.persistence.NoResultException; import javax.persistence.Query; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; @@ -41,7 +41,7 @@ import org.mxchange.jusercore.model.user.UserUtils; * @author Roland Häder */ @Stateless (name = "register", description = "A bean handling the user registration") -public class AddressbookUserRegistrationSessionBean extends BaseAddressbookDatabaseBean implements UserRegistrationSessionBeanRemote { +public class FinancialsUserRegistrationSessionBean extends BaseFinancialsDatabaseBean implements UserRegistrationSessionBeanRemote { /** * Serial number diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/FinancialsAdminUserSessionBean.java similarity index 98% rename from src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java rename to src/java/org/mxchange/jusercore/model/user/FinancialsAdminUserSessionBean.java index 212969b..1db5c53 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/FinancialsAdminUserSessionBean.java @@ -24,7 +24,7 @@ import javax.ejb.Stateless; import javax.mail.Address; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; @@ -41,7 +41,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; * @author Roland Häder */ @Stateless (name = "adminUser", description = "A bean handling the user data") -public class AddressbookAdminUserSessionBean extends BaseAddressbookDatabaseBean implements AdminUserSessionBeanRemote { +public class FinancialsAdminUserSessionBean extends BaseFinancialsDatabaseBean implements AdminUserSessionBeanRemote { /** * Serial number @@ -63,7 +63,7 @@ public class AddressbookAdminUserSessionBean extends BaseAddressbookDatabaseBean /** * Default constructor */ - public AddressbookAdminUserSessionBean () { + public FinancialsAdminUserSessionBean () { } @Override diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java similarity index 99% rename from src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java rename to src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java index 06ab9ad..bbfabd4 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java @@ -28,7 +28,7 @@ import javax.mail.internet.InternetAddress; import javax.persistence.NoResultException; import javax.persistence.PersistenceException; import javax.persistence.Query; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; @@ -49,7 +49,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; * @author Roland Häder */ @Stateless (name = "user", description = "A bean handling the user data") -public class AddressbookUserSessionBean extends BaseAddressbookDatabaseBean implements UserSessionBeanRemote { +public class FinancialsUserSessionBean extends BaseFinancialsDatabaseBean implements UserSessionBeanRemote { /** * Serial number @@ -65,7 +65,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookDatabaseBean impl /** * Default constructor */ - public AddressbookUserSessionBean () { + public FinancialsUserSessionBean () { } @Override diff --git a/src/java/org/mxchange/jusercore/model/user/password_history/AddressbookUserPasswordHistorySessionBean.java b/src/java/org/mxchange/jusercore/model/user/password_history/FinancialsUserPasswordHistorySessionBean.java similarity index 90% rename from src/java/org/mxchange/jusercore/model/user/password_history/AddressbookUserPasswordHistorySessionBean.java rename to src/java/org/mxchange/jusercore/model/user/password_history/FinancialsUserPasswordHistorySessionBean.java index ce16c8e..403fd5e 100644 --- a/src/java/org/mxchange/jusercore/model/user/password_history/AddressbookUserPasswordHistorySessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/password_history/FinancialsUserPasswordHistorySessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean; +import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jusercore.model.user.User; /** @@ -29,7 +29,7 @@ import org.mxchange.jusercore.model.user.User; * @author Roland Häder */ @Stateless (name = "userPasswordHistory", description = "A stateless EJB for user's password history. This bean does return the full user's password history and not limited. The application then needs to limit it to it's purpose.") -public class AddressbookUserPasswordHistorySessionBean extends BaseAddressbookDatabaseBean implements UserPasswordHistorySessionBeanRemote { +public class FinancialsUserPasswordHistorySessionBean extends BaseFinancialsDatabaseBean implements UserPasswordHistorySessionBeanRemote { /** * Serial number @@ -39,7 +39,7 @@ public class AddressbookUserPasswordHistorySessionBean extends BaseAddressbookDa /** * Default constructor */ - public AddressbookUserPasswordHistorySessionBean () { + public FinancialsUserPasswordHistorySessionBean () { } @Override -- 2.39.5