From 8e326aa59f6193d7bda1669b7a9a9ca42652fd3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 20 Apr 2016 16:45:09 +0200 Subject: [PATCH] Continued a bit: - moved all admin controllers from session-scope to request-scope - renamed them, too MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- nbproject/faces-config.NavData | 106 +++++++++--------- ...ddressbookAdminCountryWebRequestBean.java} | 8 +- ...bookAdminCountryWebRequestController.java} | 2 +- .../AddressbookAdminWebRequestHelper.java | 4 +- ...sbookAdminContactPhoneWebRequestBean.java} | 8 +- ...dminContactPhoneWebRequestController.java} | 2 +- ...> AddressbookAdminUserWebRequestBean.java} | 12 +- ...essbookAdminUserWebRequestController.java} | 2 +- .../user/AddressbookUserWebSessionBean.java | 6 +- 9 files changed, 75 insertions(+), 75 deletions(-) rename src/java/org/mxchange/addressbook/beans/country/{AddressbookAdminCountryWebApplicationBean.java => AddressbookAdminCountryWebRequestBean.java} (96%) rename src/java/org/mxchange/addressbook/beans/country/{AddressbookAdminCountryWebApplicationController.java => AddressbookAdminCountryWebRequestController.java} (97%) rename src/java/org/mxchange/addressbook/beans/phone/{AddressbookAdminContactPhoneWebSessionBean.java => AddressbookAdminContactPhoneWebRequestBean.java} (94%) rename src/java/org/mxchange/addressbook/beans/phone/{AddressbookAdminContactPhoneWebSessionController.java => AddressbookAdminContactPhoneWebRequestController.java} (97%) rename src/java/org/mxchange/addressbook/beans/user/{AddressbookAdminUserWebSessionBean.java => AddressbookAdminUserWebRequestBean.java} (97%) rename src/java/org/mxchange/addressbook/beans/user/{AddressbookAdminUserWebSessionController.java => AddressbookAdminUserWebRequestController.java} (97%) diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index 0fa75d50..644e41ad 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,61 +2,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java similarity index 96% rename from src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java rename to src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java index 5b5be64c..baac32d4 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java @@ -19,7 +19,7 @@ package org.mxchange.addressbook.beans.country; import java.util.Iterator; import java.util.List; import java.util.Objects; -import javax.enterprise.context.ApplicationScoped; +import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Event; import javax.enterprise.inject.Any; import javax.faces.view.facelets.FaceletException; @@ -41,8 +41,8 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; * @author Roland Haeder */ @Named ("adminCountryController") -@ApplicationScoped -public class AddressbookAdminCountryWebApplicationBean implements AddressbookAdminCountryWebApplicationController { +@RequestScoped +public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCountryWebRequestController { /** * Serial number @@ -100,7 +100,7 @@ public class AddressbookAdminCountryWebApplicationBean implements AddressbookAdm /** * Default constructor */ - public AddressbookAdminCountryWebApplicationBean () { + public AddressbookAdminCountryWebRequestBean () { // Try this try { // Get initial context diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationController.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestController.java similarity index 97% rename from src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationController.java rename to src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestController.java index 03980806..061baa46 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationController.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestController.java @@ -25,7 +25,7 @@ import org.mxchange.jcountry.data.Country; *

* @author Roland Haeder */ -public interface AddressbookAdminCountryWebApplicationController extends Serializable { +public interface AddressbookAdminCountryWebRequestController extends Serializable { /** * A list of all countries diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java index 0f45c175..9c599d16 100644 --- a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java +++ b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java @@ -21,9 +21,9 @@ import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.inject.Named; import org.mxchange.addressbook.beans.contact.AddressbookAdminContactWebRequestController; -import org.mxchange.addressbook.beans.user.AddressbookAdminUserWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.model.user.User; +import org.mxchange.addressbook.beans.user.AddressbookAdminUserWebRequestController; /** * A general helper for beans @@ -49,7 +49,7 @@ public class AddressbookAdminWebRequestHelper implements AddressbookAdminWebRequ * Admin user controller */ @Inject - private AddressbookAdminUserWebSessionController adminUserController; + private AddressbookAdminUserWebRequestController adminUserController; /** * User instance diff --git a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java similarity index 94% rename from src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebSessionBean.java rename to src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java index 2d6718bf..7ba2f6c3 100644 --- a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java @@ -19,7 +19,7 @@ package org.mxchange.addressbook.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,8 +37,8 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; * @author Roland Haeder */ @Named ("adminContactPhoneController") -@SessionScoped -public class AddressbookAdminContactPhoneWebSessionBean implements AddressbookAdminContactPhoneWebSessionController { +@RequestScoped +public class AddressbookAdminContactPhoneWebRequestBean implements AddressbookAdminContactPhoneWebRequestController { /** * Serial number @@ -79,7 +79,7 @@ public class AddressbookAdminContactPhoneWebSessionBean implements AddressbookAd /** * Default constructor */ - public AddressbookAdminContactPhoneWebSessionBean () { + public AddressbookAdminContactPhoneWebRequestBean () { // Try it try { // Get initial context diff --git a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebSessionController.java b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestController.java similarity index 97% rename from src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebSessionController.java rename to src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestController.java index b9442338..04af7f01 100644 --- a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestController.java @@ -29,7 +29,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; *

* @author Roland Haeder */ -public interface AddressbookAdminContactPhoneWebSessionController extends Serializable { +public interface AddressbookAdminContactPhoneWebRequestController extends Serializable { /** * Getter for all contacts having current cellphone instance linked diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java similarity index 97% rename from src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java rename to src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index 4173c524..eae1bfe8 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -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,8 +52,8 @@ import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionContro * @author Roland Haeder */ @Named ("adminUserController") -@SessionScoped -public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserWebSessionController { +@RequestScoped +public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserWebRequestController { /** * Serial number @@ -99,8 +99,8 @@ public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserW private String userPasswordRepeat; /** -<<<<<<< HEAD:src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java - * ZIP code +<<<<<<< HEAD:src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java + ZIP code */ private Integer zipCode; @@ -113,7 +113,7 @@ public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserW /** * Default constructor */ - public AddressbookAdminUserWebSessionBean () { + public AddressbookAdminUserWebRequestBean () { // Try it try { // Get initial context diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java similarity index 97% rename from src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java rename to src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java index 979276d2..c2e24241 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java @@ -26,7 +26,7 @@ import org.mxchange.jusercore.model.user.User; *

* @author Roland Haeder */ -public interface AddressbookAdminUserWebSessionController extends Serializable { +public interface AddressbookAdminUserWebRequestController extends Serializable { /** * Tries to lookup user by given id number. If the user is not found or the diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java index 6282bdd5..402c21e4 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java @@ -30,6 +30,8 @@ import javax.inject.Named; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; +import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; +import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; @@ -37,13 +39,11 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; +import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.model.user.LoginUser; 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.addressbook.beans.login.AddressbookUserLoginWebSessionController; -import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; /** * A user bean (controller) -- 2.39.5