]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Wed, 20 Apr 2016 14:45:09 +0000 (16:45 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 20 Apr 2016 19:54:16 +0000 (21:54 +0200)
- moved all admin controllers from session-scope to request-scope
- renamed them, too

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebApplicationBean.java [deleted file]
src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebApplicationController.java [deleted file]
src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java

diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebApplicationBean.java
deleted file mode 100644 (file)
index c6f4f68..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jjobs.beans.country;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Objects;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcountry.data.CountryData;
-import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
-import org.mxchange.jcountry.events.AdminAddedCountryEvent;
-import org.mxchange.jcountry.events.AdminEventCountryAdded;
-import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
-
-/**
- * An administrative country bean
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("adminCountryController")
-@ApplicationScoped
-public class JobsAdminCountryWebApplicationBean implements JobsAdminCountryWebApplicationController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 18_598_175_719_603L;
-
-       /**
-        * An event triggered when the administrator has added a country
-        */
-       @Inject
-       @Any
-       private Event<AdminAddedCountryEvent> addedCountryEvent;
-
-       /**
-        * Abroad dial prefix
-        */
-       private String countryAbroadDialPrefix;
-
-       /**
-        * Remote country EJB
-        */
-       private CountrySingletonBeanRemote countryBean;
-
-       /**
-        * 2-letter country code
-        */
-       private String countryCode;
-
-       /**
-        * Regular country controller
-        */
-       @Inject
-       private JobsCountryWebApplicationController countryController;
-
-       /**
-        * Local dial prefix
-        */
-       private String countryExternalDialPrefix;
-
-       /**
-        * i18n bundle key
-        */
-       private String countryI18nKey;
-
-       /**
-        * Whether the local dial prefix is required to use
-        */
-       private Boolean countryIsLocalPrefixRequired;
-
-       /**
-        * Phone code
-        */
-       private Short countryPhoneCode;
-
-       /**
-        * Default constructor
-        */
-       public JobsAdminCountryWebApplicationBean () {
-               // Try this
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup the bean
-                       this.countryBean = (CountrySingletonBeanRemote) context.lookup("java:global/jjobs-ejb/country!org.mxchange.jcountry.data.CountrySingletonBeanRemote"); //NOI18N
-               } catch (final NamingException ex) {
-                       // Continue to throw
-                       throw new FaceletException(ex);
-               }
-       }
-
-       @Override
-       public void addCountry () {
-               // Create new country object
-               Country country = new CountryData();
-
-               // Add all data
-               country.setCountryAbroadDialPrefix(this.getCountryAbroadDialPrefix());
-               country.setCountryCode(this.getCountryCode());
-               country.setCountryExternalDialPrefix(this.getCountryExternalDialPrefix());
-               country.setCountryI18nkey(this.getCountryI18nKey());
-               country.setCountryIsLocalPrefixRequired(this.getCountryIsLocalPrefixRequired());
-               country.setCountryPhoneCode(this.getCountryPhoneCode());
-
-               // Does it already exist?
-               if (this.isCountryAdded(country)) {
-                       // Yes, then abort here
-                       throw new FaceletException(new CountryAlreadyAddedException(country));
-               }
-
-               // Init variable
-               Country updatedCountry = null;
-
-               try {
-                       // Send country to bean
-                       updatedCountry = this.countryBean.addCountry(country);
-               } catch (final CountryAlreadyAddedException ex) {
-                       // Throw again
-                       throw new FaceletException(ex);
-               }
-
-               // Fire event
-               this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
-
-               // Clear bean
-               this.clear();
-       }
-
-       @Override
-       public List<Country> allCountries () {
-               // Return "cached" version
-               return this.countryController.allCountries();
-       }
-
-       @Override
-       public String getCountryAbroadDialPrefix () {
-               return this.countryAbroadDialPrefix;
-       }
-
-       @Override
-       public void setCountryAbroadDialPrefix (final String countryAbroadDialPrefix) {
-               this.countryAbroadDialPrefix = countryAbroadDialPrefix;
-       }
-
-       @Override
-       public String getCountryCode () {
-               return this.countryCode;
-       }
-
-       @Override
-       public void setCountryCode (final String countryCode) {
-               this.countryCode = countryCode;
-       }
-
-       @Override
-       public String getCountryExternalDialPrefix () {
-               return this.countryExternalDialPrefix;
-       }
-
-       @Override
-       public void setCountryExternalDialPrefix (final String countryExternalDialPrefix) {
-               this.countryExternalDialPrefix = countryExternalDialPrefix;
-       }
-
-       @Override
-       public String getCountryI18nKey () {
-               return this.countryI18nKey;
-       }
-
-       @Override
-       public void setCountryI18nKey (final String countryI18nKey) {
-               this.countryI18nKey = countryI18nKey;
-       }
-
-       @Override
-       public Boolean getCountryIsLocalPrefixRequired () {
-               return this.countryIsLocalPrefixRequired;
-       }
-
-       @Override
-       public void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired) {
-               this.countryIsLocalPrefixRequired = countryIsLocalPrefixRequired;
-       }
-
-       @Override
-       public Short getCountryPhoneCode () {
-               return this.countryPhoneCode;
-       }
-
-       @Override
-       public void setCountryPhoneCode (final Short countryPhoneCode) {
-               this.countryPhoneCode = countryPhoneCode;
-       }
-
-       @Override
-       public boolean hasCountries () {
-               return (!this.allCountries().isEmpty());
-       }
-
-       /**
-        * Clears this bean
-        */
-       private void clear () {
-               // Clear all
-               this.setCountryAbroadDialPrefix(null);
-               this.setCountryCode(null);
-               this.setCountryExternalDialPrefix(null);
-               this.setCountryI18nKey(null);
-               this.setCountryIsLocalPrefixRequired(null);
-               this.setCountryPhoneCode(null);
-       }
-
-       /**
-        * Checks if given country is already added by iterating over the whole list
-        * and try to find it.
-        * <p>
-        * @param country Country instance to look for
-        * <p>
-        * @return Whether the country was already found
-        */
-       private boolean isCountryAdded (final Country country) {
-               // Default is not found
-               boolean isAdded = false;
-
-               // Now get whole ist
-               List<Country> countries = this.countryController.allCountries();
-
-               // Get iterator from it
-               Iterator<Country> iterator = countries.iterator();
-
-               // Check whole list
-               while (iterator.hasNext()) {
-                       // Get next country
-                       Country next = iterator.next();
-
-                       // Is country code or i18n the same?
-                       if ((Objects.equals(country.getCountryCode(), next.getCountryCode())) || (Objects.equals(country.getCountryI18nkey(), next.getCountryI18nkey()))) {
-                               // Yes, then abort search
-                               isAdded = true;
-                               break;
-                       }
-               }
-
-               // Return result
-               return isAdded;
-       }
-
-}
diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebApplicationController.java b/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebApplicationController.java
deleted file mode 100644 (file)
index ad4dc46..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jjobs.beans.country;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcountry.data.Country;
-
-/**
- * An interface for administrative country beans
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface JobsAdminCountryWebApplicationController extends Serializable {
-
-       /**
-        * A list of all countries
-        * <p>
-        * @return All countries
-        */
-       List<Country> allCountries ();
-
-       /**
-        * Adds country to all relevant beans and sends it to the EJB.
-        */
-       void addCountry ();
-
-       /**
-        * Checks whether countries has been registered
-        * <p>
-        * @return Whether countries has been registered
-        */
-       boolean hasCountries ();
-
-       /**
-        * Getter for abroad dial prefix
-        * <p>
-        * @return Abroad dial prefix
-        */
-       String getCountryAbroadDialPrefix ();
-
-       /**
-        * Setter for abroad dial prefix
-        * <p>
-        * @param countryAbroadDialPrefix Abroad dial prefix
-        */
-       void setCountryAbroadDialPrefix (final String countryAbroadDialPrefix);
-
-       /**
-        * Getter for 2-characters country code
-        * <p>
-        * @return Country code
-        */
-       String getCountryCode ();
-
-       /**
-        * Setter for 2-characters country code
-        * <p>
-        * @param countryCode Country code
-        */
-       void setCountryCode (final String countryCode);
-
-       /**
-        * Getter for i18n key for country name
-        * <p>
-        * @return i18n key for country name
-        */
-       String getCountryI18nKey ();
-
-       /**
-        * Setter for i18n key for country name
-        * <p>
-        * @param countryI18nKey i18n key for country name
-        */
-       void setCountryI18nKey (final String countryI18nKey);
-
-       /**
-        * Getter for whether the local dial prefix is required for local calls
-        * <p>
-        * @return Whether the local dial prefix is required
-        */
-       Boolean getCountryIsLocalPrefixRequired ();
-
-       /**
-        * Setter for whether the local dial prefix is required for local calls
-        * <p>
-        * @param countryIsLocalPrefixRequired Whether the local dial prefix is
-        *                                     required
-        */
-       void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired);
-
-       /**
-        * Getter for external dial prefix
-        * <p>
-        * @return External dial prefix
-        */
-       String getCountryExternalDialPrefix ();
-
-       /**
-        * Setter for external dial prefix
-        * <p>
-        * @param countryExternalDialPrefix External dial prefix
-        */
-       void setCountryExternalDialPrefix (final String countryExternalDialPrefix);
-
-       /**
-        * Getter for country code (example: 49 for Germany, 63 for Philippines)
-        * <p>
-        * @return Dial number without prefix
-        */
-       Short getCountryPhoneCode ();
-
-       /**
-        * Setter for country code (example: 49 for Germany, 63 for Philippines)
-        * <p>
-        * @param countryPhoneCode Country code
-        */
-       void setCountryPhoneCode (final Short countryPhoneCode);
-
-}
diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java
new file mode 100644 (file)
index 0000000..eed8f3b
--- /dev/null
@@ -0,0 +1,273 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans.country;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcountry.data.Country;
+import org.mxchange.jcountry.data.CountryData;
+import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
+import org.mxchange.jcountry.events.AdminAddedCountryEvent;
+import org.mxchange.jcountry.events.AdminEventCountryAdded;
+import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
+
+/**
+ * An administrative country bean
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminCountryController")
+@RequestScoped
+public class JobsAdminCountryWebRequestBean implements JobsAdminCountryWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 18_598_175_719_603L;
+
+       /**
+        * An event triggered when the administrator has added a country
+        */
+       @Inject
+       @Any
+       private Event<AdminAddedCountryEvent> addedCountryEvent;
+
+       /**
+        * Abroad dial prefix
+        */
+       private String countryAbroadDialPrefix;
+
+       /**
+        * Remote country EJB
+        */
+       private CountrySingletonBeanRemote countryBean;
+
+       /**
+        * 2-letter country code
+        */
+       private String countryCode;
+
+       /**
+        * Regular country controller
+        */
+       @Inject
+       private JobsCountryWebApplicationController countryController;
+
+       /**
+        * Local dial prefix
+        */
+       private String countryExternalDialPrefix;
+
+       /**
+        * i18n bundle key
+        */
+       private String countryI18nKey;
+
+       /**
+        * Whether the local dial prefix is required to use
+        */
+       private Boolean countryIsLocalPrefixRequired;
+
+       /**
+        * Phone code
+        */
+       private Short countryPhoneCode;
+
+       /**
+        * Default constructor
+        */
+       public JobsAdminCountryWebRequestBean () {
+               // Try this
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup the bean
+                       this.countryBean = (CountrySingletonBeanRemote) context.lookup("java:global/jjobs-ejb/country!org.mxchange.jcountry.data.CountrySingletonBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw
+                       throw new FaceletException(ex);
+               }
+       }
+
+       @Override
+       public void addCountry () {
+               // Create new country object
+               Country country = new CountryData();
+
+               // Add all data
+               country.setCountryAbroadDialPrefix(this.getCountryAbroadDialPrefix());
+               country.setCountryCode(this.getCountryCode());
+               country.setCountryExternalDialPrefix(this.getCountryExternalDialPrefix());
+               country.setCountryI18nkey(this.getCountryI18nKey());
+               country.setCountryIsLocalPrefixRequired(this.getCountryIsLocalPrefixRequired());
+               country.setCountryPhoneCode(this.getCountryPhoneCode());
+
+               // Does it already exist?
+               if (this.isCountryAdded(country)) {
+                       // Yes, then abort here
+                       throw new FaceletException(new CountryAlreadyAddedException(country));
+               }
+
+               // Init variable
+               Country updatedCountry = null;
+
+               try {
+                       // Send country to bean
+                       updatedCountry = this.countryBean.addCountry(country);
+               } catch (final CountryAlreadyAddedException ex) {
+                       // Throw again
+                       throw new FaceletException(ex);
+               }
+
+               // Fire event
+               this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
+
+               // Clear bean
+               this.clear();
+       }
+
+       @Override
+       public List<Country> allCountries () {
+               // Return "cached" version
+               return this.countryController.allCountries();
+       }
+
+       @Override
+       public String getCountryAbroadDialPrefix () {
+               return this.countryAbroadDialPrefix;
+       }
+
+       @Override
+       public void setCountryAbroadDialPrefix (final String countryAbroadDialPrefix) {
+               this.countryAbroadDialPrefix = countryAbroadDialPrefix;
+       }
+
+       @Override
+       public String getCountryCode () {
+               return this.countryCode;
+       }
+
+       @Override
+       public void setCountryCode (final String countryCode) {
+               this.countryCode = countryCode;
+       }
+
+       @Override
+       public String getCountryExternalDialPrefix () {
+               return this.countryExternalDialPrefix;
+       }
+
+       @Override
+       public void setCountryExternalDialPrefix (final String countryExternalDialPrefix) {
+               this.countryExternalDialPrefix = countryExternalDialPrefix;
+       }
+
+       @Override
+       public String getCountryI18nKey () {
+               return this.countryI18nKey;
+       }
+
+       @Override
+       public void setCountryI18nKey (final String countryI18nKey) {
+               this.countryI18nKey = countryI18nKey;
+       }
+
+       @Override
+       public Boolean getCountryIsLocalPrefixRequired () {
+               return this.countryIsLocalPrefixRequired;
+       }
+
+       @Override
+       public void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired) {
+               this.countryIsLocalPrefixRequired = countryIsLocalPrefixRequired;
+       }
+
+       @Override
+       public Short getCountryPhoneCode () {
+               return this.countryPhoneCode;
+       }
+
+       @Override
+       public void setCountryPhoneCode (final Short countryPhoneCode) {
+               this.countryPhoneCode = countryPhoneCode;
+       }
+
+       @Override
+       public boolean hasCountries () {
+               return (!this.allCountries().isEmpty());
+       }
+
+       /**
+        * Clears this bean
+        */
+       private void clear () {
+               // Clear all
+               this.setCountryAbroadDialPrefix(null);
+               this.setCountryCode(null);
+               this.setCountryExternalDialPrefix(null);
+               this.setCountryI18nKey(null);
+               this.setCountryIsLocalPrefixRequired(null);
+               this.setCountryPhoneCode(null);
+       }
+
+       /**
+        * Checks if given country is already added by iterating over the whole list
+        * and try to find it.
+        * <p>
+        * @param country Country instance to look for
+        * <p>
+        * @return Whether the country was already found
+        */
+       private boolean isCountryAdded (final Country country) {
+               // Default is not found
+               boolean isAdded = false;
+
+               // Now get whole ist
+               List<Country> countries = this.countryController.allCountries();
+
+               // Get iterator from it
+               Iterator<Country> iterator = countries.iterator();
+
+               // Check whole list
+               while (iterator.hasNext()) {
+                       // Get next country
+                       Country next = iterator.next();
+
+                       // Is country code or i18n the same?
+                       if ((Objects.equals(country.getCountryCode(), next.getCountryCode())) || (Objects.equals(country.getCountryI18nkey(), next.getCountryI18nkey()))) {
+                               // Yes, then abort search
+                               isAdded = true;
+                               break;
+                       }
+               }
+
+               // Return result
+               return isAdded;
+       }
+
+}
diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestController.java b/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestController.java
new file mode 100644 (file)
index 0000000..f0ab501
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans.country;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jcountry.data.Country;
+
+/**
+ * An interface for administrative country beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface JobsAdminCountryWebRequestController extends Serializable {
+
+       /**
+        * A list of all countries
+        * <p>
+        * @return All countries
+        */
+       List<Country> allCountries ();
+
+       /**
+        * Adds country to all relevant beans and sends it to the EJB.
+        */
+       void addCountry ();
+
+       /**
+        * Checks whether countries has been registered
+        * <p>
+        * @return Whether countries has been registered
+        */
+       boolean hasCountries ();
+
+       /**
+        * Getter for abroad dial prefix
+        * <p>
+        * @return Abroad dial prefix
+        */
+       String getCountryAbroadDialPrefix ();
+
+       /**
+        * Setter for abroad dial prefix
+        * <p>
+        * @param countryAbroadDialPrefix Abroad dial prefix
+        */
+       void setCountryAbroadDialPrefix (final String countryAbroadDialPrefix);
+
+       /**
+        * Getter for 2-characters country code
+        * <p>
+        * @return Country code
+        */
+       String getCountryCode ();
+
+       /**
+        * Setter for 2-characters country code
+        * <p>
+        * @param countryCode Country code
+        */
+       void setCountryCode (final String countryCode);
+
+       /**
+        * Getter for i18n key for country name
+        * <p>
+        * @return i18n key for country name
+        */
+       String getCountryI18nKey ();
+
+       /**
+        * Setter for i18n key for country name
+        * <p>
+        * @param countryI18nKey i18n key for country name
+        */
+       void setCountryI18nKey (final String countryI18nKey);
+
+       /**
+        * Getter for whether the local dial prefix is required for local calls
+        * <p>
+        * @return Whether the local dial prefix is required
+        */
+       Boolean getCountryIsLocalPrefixRequired ();
+
+       /**
+        * Setter for whether the local dial prefix is required for local calls
+        * <p>
+        * @param countryIsLocalPrefixRequired Whether the local dial prefix is
+        *                                     required
+        */
+       void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired);
+
+       /**
+        * Getter for external dial prefix
+        * <p>
+        * @return External dial prefix
+        */
+       String getCountryExternalDialPrefix ();
+
+       /**
+        * Setter for external dial prefix
+        * <p>
+        * @param countryExternalDialPrefix External dial prefix
+        */
+       void setCountryExternalDialPrefix (final String countryExternalDialPrefix);
+
+       /**
+        * Getter for country code (example: 49 for Germany, 63 for Philippines)
+        * <p>
+        * @return Dial number without prefix
+        */
+       Short getCountryPhoneCode ();
+
+       /**
+        * Setter for country code (example: 49 for Germany, 63 for Philippines)
+        * <p>
+        * @param countryPhoneCode Country code
+        */
+       void setCountryPhoneCode (final Short countryPhoneCode);
+
+}
index 4b88e563820701c5e626bc3dd2307390081e7ebe..37f91756241fbab1447dd5a04613acabfe38c208 100644 (file)
@@ -22,8 +22,8 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
-import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jjobs.beans.user.JobsAdminUserWebRequestController;
+import org.mxchange.jusercore.model.user.User;
 
 /**
  * A general helper for beans
index e54617fb132e15f19ecd3e86452b3dde01228f6d..4f4bfe020bed0873e0e24c939c1b3d4b7497437d 100644 (file)
@@ -19,7 +19,7 @@ package org.mxchange.jjobs.beans.phone;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Named;
 import javax.naming.Context;
@@ -37,7 +37,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
  * @author Roland Haeder<roland@mxchange.org>
  */
 @Named ("adminContactPhoneController")
-@SessionScoped
+@RequestScoped
 public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhoneWebSessionController {
 
        /**
index b58623e1326185dbac09e1dad6cbb1a0747fc00f..11363c2cd3c60bc0f9bbac3a566f0e0ed22ae9c8 100644 (file)
@@ -22,7 +22,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
 import javax.faces.view.facelets.FaceletException;
@@ -52,7 +52,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  * @author Roland Haeder<roland@mxchange.org>
  */
 @Named ("adminUserController")
-@SessionScoped
+@RequestScoped
 public class JobsAdminUserWebRequestBean implements JobsAdminUserWebRequestController {
 
        /**