From ed9c91fbbd582a412f08e3c200883f5814207163 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 12 Apr 2016 20:05:51 +0200 Subject: [PATCH] Changed interface (POJI) name SmsProvider to MobileProvider --- lib/jphone-core.jar | Bin 24405 -> 24411 bytes lib/jphone-lib.jar | Bin 1622 -> 1640 bytes ...bookMobileProviderWebApplicationBean.java} | 18 ++++++------- ...bileProviderWebApplicationController.java} | 6 ++--- .../AddressbookAdminUserWebSessionBean.java | 10 ++++---- ...ressbookAdminUserWebSessionController.java | 6 ++--- .../user/AddressbookUserWebSessionBean.java | 12 ++++----- .../AddressbookUserWebSessionController.java | 6 ++--- ...> AddressbookMobileProviderConverter.java} | 24 +++++++++--------- 9 files changed, 41 insertions(+), 41 deletions(-) rename src/java/org/mxchange/addressbook/beans/smsprovider/{AddressbookSmsProviderWebApplicationBean.java => AddressbookMobileProviderWebApplicationBean.java} (70%) rename src/java/org/mxchange/addressbook/beans/smsprovider/{AddressbookSmsProviderWebApplicationController.java => AddressbookMobileProviderWebApplicationController.java} (83%) rename src/java/org/mxchange/addressbook/converter/smsprovider/{AddressbookSmsProviderConverter.java => AddressbookMobileProviderConverter.java} (81%) diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar index 06e206cabe3a6cb130f40d3bf254f6b71a32984e..ec8a9b92f168dd26cce8f8c0540926ee0f2da933 100644 GIT binary patch delta 328 zcmcb*kMZ_CM(zM_W)?061`Y;>xf8jy80Ty>i)Un`m<|k$5q;3utxTPxuQWR_-*WDn%zyQK743imSlqc&u z%Wkf>Q{mtebj-Mns!xh3 zWjZf4`C*LuWPWM!$=)#nlaIzoF?LOU5R=H{r~|fYftmc|)>s23c|9nXbMkg0zR9jJ zLJF9UV}OGtjcRrip1m(jLMS}xD_XR z#~3i3kpgnnCl^QyP8N?9n|wM(im6=&EW{UU$z-PkR@|VYI$1VWVDiFPDJB^`u+W28 zO$CtK;VuKZ&V>O1mNY8cffd@j^GvpL7Mz?JXTZed4;7LEa>XXUi<4rS83Ys(o2(FT K%62y#q#XbSz-ZwB diff --git a/lib/jphone-lib.jar b/lib/jphone-lib.jar index cd5aade5b6e0df051f37ee11fd7dc2c7d69d4b2b..2fc3981fc2bb4825116a152cda7739fc56fc61f8 100644 GIT binary patch delta 272 zcmcb{^MZ#rz?+$ci-CcIf#LRoo{78~%(sA)#eC+8KVxS>MjJ3a zgV93}DDDxPnc%aDk%0k(LneP@G+^`1Ps+?moh;9$IN6m+luIx%CkHB&$fV5}IJuX} z0jA~xlN7reT)oU>E@pE^zsU=jbYTkQ*`z1;GG{RZT{rm`vjxa`lTBId!7eCgfw*WT liv^hf1S+n^>I3GNvPNKW;XPJ6gyFhe5ljpWznB?-005VFT9g0) delta 271 zcmaFCbB%{Lz?+$ci-CcIfniZj*F;_o=7m7YVm_FPF=0|*CB{>W&+9GqJ`*^o_fvImnWJ6~c>4v3%5q|N9zc`}oOB9IqQ zlwX#al3HYKXU)jK6`WsMl$`38nUl)MpbXI~Gg*w;oY8x-AG0plv_|GuW}y2fbFx@~ v?RH_Y2h(jV5I60BihqWRo3i?V cellphoneList; + private List cellphoneList; /** * Default constructor */ - public AddressbookSmsProviderWebApplicationBean () { + public AddressbookMobileProviderWebApplicationBean () { // Try this try { // Get initial context Context context = new InitialContext(); // Try to lookup the bean - this.cellphoneBean = (SmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote"); //NOI18N + this.cellphoneBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.MobileProviderSingletonBeanRemote"); //NOI18N } catch (final NamingException ex) { // Continue to throw throw new FaceletException(ex); @@ -70,7 +70,7 @@ public class AddressbookSmsProviderWebApplicationBean implements AddressbookSmsP } @Override - public List allSmsProvider () { + public List allMobileProvider () { // Return "cached" version return Collections.unmodifiableList(this.cellphoneList); } @@ -80,6 +80,6 @@ public class AddressbookSmsProviderWebApplicationBean implements AddressbookSmsP */ @PostConstruct public void init () { - this.cellphoneList = this.cellphoneBean.allSmsProvider(); + this.cellphoneList = this.cellphoneBean.allMobileProvider(); } } diff --git a/src/java/org/mxchange/addressbook/beans/smsprovider/AddressbookSmsProviderWebApplicationController.java b/src/java/org/mxchange/addressbook/beans/smsprovider/AddressbookMobileProviderWebApplicationController.java similarity index 83% rename from src/java/org/mxchange/addressbook/beans/smsprovider/AddressbookSmsProviderWebApplicationController.java rename to src/java/org/mxchange/addressbook/beans/smsprovider/AddressbookMobileProviderWebApplicationController.java index ea0e083d..0041b71f 100644 --- a/src/java/org/mxchange/addressbook/beans/smsprovider/AddressbookSmsProviderWebApplicationController.java +++ b/src/java/org/mxchange/addressbook/beans/smsprovider/AddressbookMobileProviderWebApplicationController.java @@ -18,19 +18,19 @@ package org.mxchange.addressbook.beans.smsprovider; import java.io.Serializable; import java.util.List; -import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; /** * An interface for country beans *

* @author Roland Haeder */ -public interface AddressbookSmsProviderWebApplicationController extends Serializable { +public interface AddressbookMobileProviderWebApplicationController extends Serializable { /** * A list of all countries *

* @return All countries */ - List allSmsProvider (); + List allMobileProvider (); } diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java index 8a6b701d..153617d4 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java @@ -39,7 +39,7 @@ 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.jphone.phonenumbers.smsprovider.SmsProvider; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -73,7 +73,7 @@ public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserW /** * Cellphone number's carrier */ - private SmsProvider cellphoneCarrier; + private MobileProvider cellphoneCarrier; /** * Cellphone number @@ -285,7 +285,7 @@ public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserW } // Is the provider set? - if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof SmsProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) { + if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof MobileProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) { // Is the number set? if (cellphone.getPhoneNumber() == null) { // Is null @@ -360,12 +360,12 @@ public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserW } @Override - public SmsProvider getCellphoneCarrier () { + public MobileProvider getCellphoneCarrier () { return this.cellphoneCarrier; } @Override - public void setCellphoneCarrier (final SmsProvider cellphoneCarrier) { + public void setCellphoneCarrier (final MobileProvider cellphoneCarrier) { this.cellphoneCarrier = cellphoneCarrier; } diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java index 22c5fdbe..99197044 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java @@ -21,7 +21,7 @@ import java.util.Date; import java.util.List; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcountry.data.Country; -import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; @@ -85,14 +85,14 @@ public interface AddressbookAdminUserWebSessionController extends Serializable { *

* @return Cellphone number's carrier */ - SmsProvider getCellphoneCarrier (); + MobileProvider getCellphoneCarrier (); /** * Setter for cellphone number's carrier prefix *

* @param cellphoneCarrier Cellphone number's carrier prefix */ - void setCellphoneCarrier (final SmsProvider cellphoneCarrier); + void setCellphoneCarrier (final MobileProvider cellphoneCarrier); /** * Getter for ellphone number diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java index 68465833..ea5cb658 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java @@ -41,7 +41,7 @@ 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.jphone.phonenumbers.smsprovider.SmsProvider; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -74,7 +74,7 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC /** * Cellphone number's carrier */ - private SmsProvider cellphoneCarrier; + private MobileProvider cellphoneCarrier; /** * Cellphone number @@ -401,7 +401,7 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC } // Is the provider set? - if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof SmsProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) { + if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof MobileProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) { // Is the number set? if (cellphone.getPhoneNumber() == null) { // Is null @@ -442,12 +442,12 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC } @Override - public SmsProvider getCellphoneCarrier () { + public MobileProvider getCellphoneCarrier () { return this.cellphoneCarrier; } @Override - public void setCellphoneCarrier (final SmsProvider cellphoneCarrier) { + public void setCellphoneCarrier (final MobileProvider cellphoneCarrier) { this.cellphoneCarrier = cellphoneCarrier; } @@ -894,7 +894,7 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC this.setPhoneAreaCode(phone.getPhoneAreaCode()); this.setPhoneNumber(phone.getPhoneNumber()); } - if ((cellphone instanceof DialableCellphoneNumber) && (cellphone.getCellphoneProvider() instanceof SmsProvider)) { + if ((cellphone instanceof DialableCellphoneNumber) && (cellphone.getCellphoneProvider() instanceof MobileProvider)) { this.setCellphoneCarrier(cellphone.getCellphoneProvider()); this.setCellphoneNumber(cellphone.getPhoneNumber()); } diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java index ce542ad1..7ea78ad2 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java @@ -21,7 +21,7 @@ import java.util.Date; import java.util.List; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcountry.data.Country; -import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -99,14 +99,14 @@ public interface AddressbookUserWebSessionController extends Serializable { *

* @return Cellphone number's carrier */ - SmsProvider getCellphoneCarrier (); + MobileProvider getCellphoneCarrier (); /** * Setter for cellphone number's carrier prefix *

* @param cellphoneCarrier Cellphone number's carrier prefix */ - void setCellphoneCarrier (final SmsProvider cellphoneCarrier); + void setCellphoneCarrier (final MobileProvider cellphoneCarrier); /** * Getter for ellphone number diff --git a/src/java/org/mxchange/addressbook/converter/smsprovider/AddressbookSmsProviderConverter.java b/src/java/org/mxchange/addressbook/converter/smsprovider/AddressbookMobileProviderConverter.java similarity index 81% rename from src/java/org/mxchange/addressbook/converter/smsprovider/AddressbookSmsProviderConverter.java rename to src/java/org/mxchange/addressbook/converter/smsprovider/AddressbookMobileProviderConverter.java index f827637d..1c4861cd 100644 --- a/src/java/org/mxchange/addressbook/converter/smsprovider/AddressbookSmsProviderConverter.java +++ b/src/java/org/mxchange/addressbook/converter/smsprovider/AddressbookMobileProviderConverter.java @@ -28,8 +28,8 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreeelogger.beans.local.logger.Log; import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; -import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; -import org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProviderSingletonBeanRemote; /** * Converter for SMS provider instance @@ -37,7 +37,7 @@ import org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemo * @author Roland Haeder */ @FacesConverter (value = "cellphoneCarrier") -public class AddressbookSmsProviderConverter implements Converter { +public class AddressbookMobileProviderConverter implements Converter { /** * Logger instance @@ -48,12 +48,12 @@ public class AddressbookSmsProviderConverter implements Converter { /** * SMS provider bean */ - private SmsProviderSingletonBeanRemote providerController; + private MobileProviderSingletonBeanRemote providerController; /** * Initialization of this converter */ - public AddressbookSmsProviderConverter () { + public AddressbookMobileProviderConverter () { // Try to get it try { // Get initial context @@ -63,7 +63,7 @@ public class AddressbookSmsProviderConverter implements Converter { this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N /// and SMS provider controller - this.providerController = (SmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote"); //NOI18N + this.providerController = (MobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.MobileProviderSingletonBeanRemote"); //NOI18N } catch (final NamingException ex) { // Continue to throw it throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N @@ -85,10 +85,10 @@ public class AddressbookSmsProviderConverter implements Converter { } // Get full list - List providerList = this.providerController.allSmsProvider(); + List providerList = this.providerController.allMobileProvider(); // Init value - SmsProvider provider = null; + MobileProvider provider = null; // Try this better try { @@ -102,7 +102,7 @@ public class AddressbookSmsProviderConverter implements Converter { this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: providerId={0}", providerId)); //NOI18N // Try to find it - for (final SmsProvider prov : providerList) { + for (final MobileProvider prov : providerList) { // Is the id the same? (null-safe) if (Objects.equals(prov.getProviderId(), providerId)) { // Found it @@ -128,13 +128,13 @@ public class AddressbookSmsProviderConverter implements Converter { if ((null == value) || ((String.valueOf(value)).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof SmsProvider)) { + } else if (!(value instanceof MobileProvider)) { // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement SmsProvider.", value)); //NOI18N + throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement MobileProvider.", value)); //NOI18N } // Return category id - return String.valueOf(((SmsProvider) value).getProviderId()); + return String.valueOf(((MobileProvider) value).getProviderId()); } } -- 2.39.5