X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjava%2Forg%2Fmxchange%2Faddressbook%2Fconverter%2Fmobileprovider%2FAddressbookMobileProviderConverter.java;h=e257ea36d33f2559161f4f559763085f766cf3fa;hb=2a5c341d985ae0a9264498de9979ae9fcce07212;hp=2e435ba9852b61cee75689a5f9afd9682316d016;hpb=7faed57a793e3d1de69cd97aa2f710380c585c8a;p=addressbook-war.git
diff --git a/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java b/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java
index 2e435ba9..e257ea36 100644
--- a/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java
+++ b/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java
@@ -36,7 +36,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBe
*
* @author Roland Haeder
*/
-@FacesConverter (value = "cellphoneCarrier")
+@FacesConverter (value = "MobileProviderConverter")
public class AddressbookMobileProviderConverter implements Converter {
/**
@@ -46,9 +46,9 @@ public class AddressbookMobileProviderConverter implements Converter {
private LoggerBeanLocal loggerBeanLocal;
/**
- * SMS provider bean
+ * Mobile provider bean
*/
- private MobileProviderSingletonBeanRemote providerController;
+ private MobileProviderSingletonBeanRemote mobileRemoteBean;
/**
* Initialization of this converter
@@ -62,8 +62,8 @@ public class AddressbookMobileProviderConverter implements Converter {
// Lookup logger
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 = (MobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.MobileProvider.MobileProviderSingletonBeanRemote"); //NOI18N
+ /// and mobile provider controller
+ this.mobileRemoteBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.MobileProvider.MobileProviderSingletonBeanRemote"); //NOI18N
} catch (final NamingException ex) {
// Continue to throw it
throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
@@ -73,19 +73,19 @@ public class AddressbookMobileProviderConverter implements Converter {
@Override
public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// Trace message
- this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
+ // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
// Is the value null or empty?
if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
- // Trace message
- this.loggerBeanLocal.logTrace("getAsObject: submittedValue is null or empty - EXIT!"); //NOI18N
+ // Warning message
+ this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
// Return null
return null;
}
// Get full list
- List providerList = this.providerController.allMobileProvider();
+ List providerList = this.mobileRemoteBean.allMobileProvider();
// Init value
MobileProvider provider = null;
@@ -99,7 +99,7 @@ public class AddressbookMobileProviderConverter implements Converter {
assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N
// Debug message
- this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: providerId={0}", providerId)); //NOI18N
+ // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: providerId={0}", providerId)); //NOI18N
// Try to find it
for (final MobileProvider prov : providerList) {
@@ -116,7 +116,7 @@ public class AddressbookMobileProviderConverter implements Converter {
}
// Trace message
- this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: provider={0} - EXIT!", provider)); //NOI18N
+ // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: provider={0} - EXIT!", provider)); //NOI18N
// Return it
return provider;