From 1f748e68a98fa19f85178c99d6017674dc6f6af6 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 12 Apr 2016 20:03:11 +0200 Subject: [PATCH] Changed interface (POJI) name SmsProvider to MobileProvider --- lib/jphone-core.jar | Bin 24369 -> 24411 bytes lib/jphone-lib.jar | Bin 1622 -> 1640 bytes ...JobsMobileProviderWebApplicationBean.java} | 18 ++++++------- ...bileProviderWebApplicationController.java} | 6 ++--- .../user/JobsAdminUserWebSessionBean.java | 10 ++++---- .../JobsAdminUserWebSessionController.java | 6 ++--- .../beans/user/JobsUserWebSessionBean.java | 12 ++++----- .../user/JobsUserWebSessionController.java | 6 ++--- ....java => JobsMobileProviderConverter.java} | 24 +++++++++--------- 9 files changed, 41 insertions(+), 41 deletions(-) rename src/java/org/mxchange/jjobs/beans/smsprovider/{JobsSmsProviderWebApplicationBean.java => JobsMobileProviderWebApplicationBean.java} (71%) rename src/java/org/mxchange/jjobs/beans/smsprovider/{JobsSmsProviderWebApplicationController.java => JobsMobileProviderWebApplicationController.java} (83%) rename src/java/org/mxchange/jjobs/converter/smsprovider/{JobsSmsProviderConverter.java => JobsMobileProviderConverter.java} (81%) diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar index f3842ac699566b448d005be0eb2aee5a71843015..ec8a9b92f168dd26cce8f8c0540926ee0f2da933 100644 GIT binary patch delta 916 zcmdnEkMZ_CMxFp~W)?061`Y;>xeF%pXfn-NFwuMglgWaKHx)qSZ%rUMS&h*EL`5*# zGR<8uc{-yzi1&ce5kx67xq$?;nLI(fZA{icYV&8NhfKV47xZ`puCTrQUyy;}|K^9R zyo`*tlQ-%pO*Y`+Ve`#T%FIdKtiT?`%os44QBt2DA`(!PUzVAYT4X)>fU?NuLtLJW z%=Q|ZXxb**^C&SofONsknZnc0%&0$EML+>2;x2HTo!12DgzL=>Gn|+h7@Q{SOH>nO zn6czUMvyO#N$mvFjWS#LL3|6HJ7B(;9;<*L$alf^aor693=AObGI@fG%H{w&D^^T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(jV5I60BihqWRo3i?V cellphoneList; + private List cellphoneList; /** * Default constructor */ - public JobsSmsProviderWebApplicationBean () { + public JobsMobileProviderWebApplicationBean () { // Try this try { // Get initial context Context context = new InitialContext(); // Try to lookup the bean - this.cellphoneBean = (SmsProviderSingletonBeanRemote) context.lookup("java:global/jjobs-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote"); //NOI18N + this.cellphoneBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/jjobs-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 JobsSmsProviderWebApplicationBean implements JobsSmsProviderWebAppl } @Override - public List allSmsProvider () { + public List allMobileProvider () { // Return "cached" version return Collections.unmodifiableList(this.cellphoneList); } @@ -80,6 +80,6 @@ public class JobsSmsProviderWebApplicationBean implements JobsSmsProviderWebAppl */ @PostConstruct public void init () { - this.cellphoneList = this.cellphoneBean.allSmsProvider(); + this.cellphoneList = this.cellphoneBean.allMobileProvider(); } } diff --git a/src/java/org/mxchange/jjobs/beans/smsprovider/JobsSmsProviderWebApplicationController.java b/src/java/org/mxchange/jjobs/beans/smsprovider/JobsMobileProviderWebApplicationController.java similarity index 83% rename from src/java/org/mxchange/jjobs/beans/smsprovider/JobsSmsProviderWebApplicationController.java rename to src/java/org/mxchange/jjobs/beans/smsprovider/JobsMobileProviderWebApplicationController.java index e7f08f6b..3a30af02 100644 --- a/src/java/org/mxchange/jjobs/beans/smsprovider/JobsSmsProviderWebApplicationController.java +++ b/src/java/org/mxchange/jjobs/beans/smsprovider/JobsMobileProviderWebApplicationController.java @@ -18,19 +18,19 @@ package org.mxchange.jjobs.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 JobsSmsProviderWebApplicationController extends Serializable { +public interface JobsMobileProviderWebApplicationController extends Serializable { /** * A list of all countries *

* @return All countries */ - List allSmsProvider (); + List allMobileProvider (); } diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java index 5286755d..323129c9 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java @@ -39,7 +39,6 @@ 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.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -49,6 +48,7 @@ import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; /** * A user bean (controller) @@ -73,7 +73,7 @@ public class JobsAdminUserWebSessionBean implements JobsAdminUserWebSessionContr /** * Cellphone number's carrier */ - private SmsProvider cellphoneCarrier; + private MobileProvider cellphoneCarrier; /** * Cellphone number @@ -285,7 +285,7 @@ public class JobsAdminUserWebSessionBean implements JobsAdminUserWebSessionContr } // 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 JobsAdminUserWebSessionBean implements JobsAdminUserWebSessionContr } @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/jjobs/beans/user/JobsAdminUserWebSessionController.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java index f14ccb9c..c615324d 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java @@ -21,10 +21,10 @@ 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.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; /** * An interface for user beans @@ -85,14 +85,14 @@ public interface JobsAdminUserWebSessionController 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/jjobs/beans/user/JobsUserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java index 1c38fc42..8f5dba3d 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java @@ -41,7 +41,6 @@ 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.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -51,6 +50,7 @@ import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; /** * A user bean (controller) @@ -74,7 +74,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { /** * Cellphone number's carrier */ - private SmsProvider cellphoneCarrier; + private MobileProvider cellphoneCarrier; /** * Cellphone number @@ -393,7 +393,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { } // 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 @@ -507,12 +507,12 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { } @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; } @@ -939,7 +939,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { 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/jjobs/beans/user/JobsUserWebSessionController.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java index b29c3e22..7b72a005 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java @@ -21,12 +21,12 @@ 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.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; /** * An interface for user beans @@ -99,14 +99,14 @@ public interface JobsUserWebSessionController 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/jjobs/converter/smsprovider/JobsSmsProviderConverter.java b/src/java/org/mxchange/jjobs/converter/smsprovider/JobsMobileProviderConverter.java similarity index 81% rename from src/java/org/mxchange/jjobs/converter/smsprovider/JobsSmsProviderConverter.java rename to src/java/org/mxchange/jjobs/converter/smsprovider/JobsMobileProviderConverter.java index 99feb4eb..53e4be8e 100644 --- a/src/java/org/mxchange/jjobs/converter/smsprovider/JobsSmsProviderConverter.java +++ b/src/java/org/mxchange/jjobs/converter/smsprovider/JobsMobileProviderConverter.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.MobileProviderSingletonBeanRemote; +import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider; /** * Converter for SMS provider instance @@ -37,7 +37,7 @@ import org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemo * @author Roland Haeder */ @FacesConverter (value = "cellphoneCarrier") -public class JobsSmsProviderConverter implements Converter { +public class JobsMobileProviderConverter implements Converter { /** * Logger instance @@ -48,12 +48,12 @@ public class JobsSmsProviderConverter implements Converter { /** * SMS provider bean */ - private SmsProviderSingletonBeanRemote providerController; + private MobileProviderSingletonBeanRemote providerController; /** * Initialization of this converter */ - public JobsSmsProviderConverter () { + public JobsMobileProviderConverter () { // Try to get it try { // Get initial context @@ -63,7 +63,7 @@ public class JobsSmsProviderConverter 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/jjobs-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote"); //NOI18N + this.providerController = (MobileProviderSingletonBeanRemote) context.lookup("java:global/jjobs-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 JobsSmsProviderConverter 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 JobsSmsProviderConverter 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 JobsSmsProviderConverter 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