From 441e508dbd59fc37cf51cbe2f804d399d2c675b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 9 Sep 2017 22:23:54 +0200 Subject: [PATCH] Please repeat: - renamed to project's prefix - copied cache-based code from jfinancials MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- ...sbookAdminBranchOfficeWebRequestBean.java} | 32 +++++++++---------- ...dminBranchOfficeWebRequestController.java} | 2 +- ...ddressbookBranchOfficeWebRequestBean.java} | 10 +++--- ...bookBranchOfficeWebRequestController.java} | 4 +-- ...AddressbookContactPhoneWebRequestBean.java | 24 +++++++------- 5 files changed, 36 insertions(+), 36 deletions(-) rename src/java/org/mxchange/addressbook/beans/business/branchoffice/{FinancialsAdminBranchOfficeWebRequestBean.java => AddressbookAdminBranchOfficeWebRequestBean.java} (92%) rename src/java/org/mxchange/addressbook/beans/business/branchoffice/{FinancialsAdminBranchOfficeWebRequestController.java => AddressbookAdminBranchOfficeWebRequestController.java} (91%) rename src/java/org/mxchange/addressbook/beans/business/branchoffice/{FinancialsBranchOfficeWebRequestBean.java => AddressbookBranchOfficeWebRequestBean.java} (90%) rename src/java/org/mxchange/addressbook/beans/business/branchoffice/{FinancialsBranchOfficeWebRequestController.java => AddressbookBranchOfficeWebRequestController.java} (87%) diff --git a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsAdminBranchOfficeWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookAdminBranchOfficeWebRequestBean.java similarity index 92% rename from src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsAdminBranchOfficeWebRequestBean.java rename to src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookAdminBranchOfficeWebRequestBean.java index 6de5a4e4..4645d763 100644 --- a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsAdminBranchOfficeWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookAdminBranchOfficeWebRequestBean.java @@ -23,21 +23,21 @@ import javax.enterprise.event.Event; import javax.enterprise.inject.Any; import javax.inject.Inject; import javax.inject.Named; -import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData; -import org.mxchange.jcontactsbusiness.branchoffice.AdminBranchOfficeSessionBeanRemote; -import org.mxchange.jcontactsbusiness.branchoffice.BranchOffice; -import org.mxchange.jcontactsbusiness.branchoffice.BranchOfficeUtils; -import org.mxchange.jcontactsbusiness.branchoffice.CompanyBranchOffice; -import org.mxchange.jcontactsbusiness.employee.Employee; +import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.jcontactsbusiness.events.branchoffice.added.BranchOfficeAddedEvent; import org.mxchange.jcontactsbusiness.events.branchoffice.added.ObservableBranchOfficeAddedEvent; import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeAlreadyAddedException; -import org.mxchange.jcountry.data.Country; -import org.mxchange.jfinancials.beans.BaseFinancialsController; -import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.phonenumbers.fax.FaxNumber; -import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; -import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; +import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData; +import org.mxchange.jcontactsbusiness.model.branchoffice.AdminBranchOfficeSessionBeanRemote; +import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; +import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffices; +import org.mxchange.jcontactsbusiness.model.branchoffice.CompanyBranchOffice; +import org.mxchange.jcontactsbusiness.model.employee.Employee; +import org.mxchange.jcountry.model.data.Country; +import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber; +import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber; import org.mxchange.jusercore.model.user.User; /** @@ -47,7 +47,7 @@ import org.mxchange.jusercore.model.user.User; */ @Named ("adminBranchOfficeController") @RequestScoped -public class FinancialsAdminBranchOfficeWebRequestBean extends BaseFinancialsController implements FinancialsAdminBranchOfficeWebRequestController { +public class AddressbookAdminBranchOfficeWebRequestBean extends BaseAddressbookController implements AddressbookAdminBranchOfficeWebRequestController { /** * Serial number @@ -101,7 +101,7 @@ public class FinancialsAdminBranchOfficeWebRequestBean extends BaseFinancialsCon * A general branch office controller (backing bean) */ @Inject - private FinancialsBranchOfficeWebRequestController branchOfficeController; + private AddressbookBranchOfficeWebRequestController branchOfficeController; /** * Store @@ -161,7 +161,7 @@ public class FinancialsAdminBranchOfficeWebRequestBean extends BaseFinancialsCon /** * Default constructor */ - public FinancialsAdminBranchOfficeWebRequestBean () { + public AddressbookAdminBranchOfficeWebRequestBean () { // Call super constructor super(); } @@ -597,7 +597,7 @@ public class FinancialsAdminBranchOfficeWebRequestBean extends BaseFinancialsCon // Now check each entry for (final BranchOffice bo : branchOffices) { // Is same address? - if (BranchOfficeUtils.isSameAddress(bo, branchOffice)) { + if (BranchOffices.isSameAddress(bo, branchOffice)) { // Found one isFound = true; break; diff --git a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsAdminBranchOfficeWebRequestController.java b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookAdminBranchOfficeWebRequestController.java similarity index 91% rename from src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsAdminBranchOfficeWebRequestController.java rename to src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookAdminBranchOfficeWebRequestController.java index 79397305..3bfd195f 100644 --- a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsAdminBranchOfficeWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookAdminBranchOfficeWebRequestController.java @@ -23,6 +23,6 @@ import java.io.Serializable; *

* @author Roland Häder */ -public interface FinancialsAdminBranchOfficeWebRequestController extends Serializable { +public interface AddressbookAdminBranchOfficeWebRequestController extends Serializable { } diff --git a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsBranchOfficeWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookBranchOfficeWebRequestBean.java similarity index 90% rename from src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsBranchOfficeWebRequestBean.java rename to src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookBranchOfficeWebRequestBean.java index 9c2b3f99..c7a06ae5 100644 --- a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsBranchOfficeWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookBranchOfficeWebRequestBean.java @@ -28,10 +28,10 @@ import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Observes; import javax.inject.Inject; import javax.inject.Named; -import org.mxchange.jcontactsbusiness.branchoffice.BranchOffice; -import org.mxchange.jcontactsbusiness.branchoffice.BranchOfficeSessionBeanRemote; +import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.jcontactsbusiness.events.branchoffice.added.ObservableBranchOfficeAddedEvent; -import org.mxchange.jfinancials.beans.BaseFinancialsController; +import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; +import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOfficeSessionBeanRemote; /** * A general bean for branch offices @@ -40,7 +40,7 @@ import org.mxchange.jfinancials.beans.BaseFinancialsController; */ @Named ("branchOfficeController") @RequestScoped -public class FinancialsBranchOfficeWebRequestBean extends BaseFinancialsController implements FinancialsBranchOfficeWebRequestController { +public class AddressbookBranchOfficeWebRequestBean extends BaseAddressbookController implements AddressbookBranchOfficeWebRequestController { /** * Serial number @@ -63,7 +63,7 @@ public class FinancialsBranchOfficeWebRequestBean extends BaseFinancialsControll /** * Default constructor */ - public FinancialsBranchOfficeWebRequestBean () { + public AddressbookBranchOfficeWebRequestBean () { // Call super constructor super(); } diff --git a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsBranchOfficeWebRequestController.java b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookBranchOfficeWebRequestController.java similarity index 87% rename from src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsBranchOfficeWebRequestController.java rename to src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookBranchOfficeWebRequestController.java index afac4351..31922670 100644 --- a/src/java/org/mxchange/addressbook/beans/business/branchoffice/FinancialsBranchOfficeWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/business/branchoffice/AddressbookBranchOfficeWebRequestController.java @@ -18,14 +18,14 @@ package org.mxchange.addressbook.beans.business.branchoffice; import java.io.Serializable; import java.util.List; -import org.mxchange.jcontactsbusiness.branchoffice.BranchOffice; +import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; /** * An interface for general branch office controller *

* @author Roland Häder */ -public interface FinancialsBranchOfficeWebRequestController extends Serializable { +public interface AddressbookBranchOfficeWebRequestController extends Serializable { /** * Returns a list of all branch offices diff --git a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebRequestBean.java index f6dfb028..df70da6d 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebRequestBean.java @@ -168,7 +168,7 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro } // Remove it from list - this.contacts.remove(event.getUnlinkedFaxNumber()); + this.contactsPhoneCache.remove(event.getUnlinkedFaxNumber()); // Clear all data this.clear(); @@ -196,7 +196,7 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro } // Remove it from list - this.contacts.remove(event.getUnlinkedLandLineNumber()); + this.contactsPhoneCache.remove(event.getUnlinkedLandLineNumber()); // Clear all data this.clear(); @@ -224,7 +224,7 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro } // Remove it from list - this.contacts.remove(event.getUnlinkedMobileNumber()); + this.contactsPhoneCache.remove(event.getUnlinkedMobileNumber()); // Clear all data this.clear(); @@ -343,9 +343,9 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro final DialableFaxNumber number = this.getFaxNumber(); // Is cache there? - if (this.contacts.containsKey(number)) { + if (this.contactsPhoneCache.containsKey(number)) { // Return cached version - return this.contacts.get(number); + return this.contactsPhoneCache.get(number); } else { // Ask bean final List list = new LinkedList<>(); @@ -360,7 +360,7 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro } // Store result in cache - this.contacts.put(number, list); + this.contactsPhoneCache.put(number, list); // Return now-cached list return list; @@ -377,9 +377,9 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro final DialableLandLineNumber number = this.getLandLineNumber(); // Is cache there? - if (this.contacts.containsKey(number)) { + if (this.contactsPhoneCache.containsKey(number)) { // Return cached version - return this.contacts.get(number); + return this.contactsPhoneCache.get(number); } else { // Ask bean final List list = new LinkedList<>(); @@ -394,7 +394,7 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro } // Store result in cache - this.contacts.put(number, list); + this.contactsPhoneCache.put(number, list); // Return now-cached list return list; @@ -411,9 +411,9 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro final DialableMobileNumber number = this.getMobileNumber(); // Is cache there? - if (this.contacts.containsKey(number)) { + if (this.contactsPhoneCache.containsKey(number)) { // Return cached version - return this.contacts.get(number); + return this.contactsPhoneCache.get(number); } else { // Ask bean final List list = new LinkedList<>(); @@ -428,7 +428,7 @@ public class AddressbookContactPhoneWebRequestBean extends BaseAddressbookContro } // Store result in cache - this.contacts.put(number, list); + this.contactsPhoneCache.put(number, list); // Return now-cached list return list; -- 2.39.5