]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Pre-commit:
authorRoland Häder <roland@mxchange.org>
Fri, 13 Oct 2017 23:32:27 +0000 (01:32 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 13 Oct 2017 23:32:27 +0000 (01:32 +0200)
- renamed BasePizzaController -> BasePizzaBean as "Controller" is reserverd for
  interfaces of backing beans
- category/product beans are no longer application-scoped, was some old-lost
  "cache" faking, now there is JCache (and sadly dependency to Payara)

Signed-off-by: Roland Häder <roland@mxchange.org>
50 files changed:
src/java/org/mxchange/pizzaapplication/beans/BasePizzaBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/business/branchoffice/PizzaAdminBranchOfficeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/business/branchoffice/PizzaBranchOfficeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/category/PizzaAdminCategoryWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/category/PizzaAdminCategoryWebRequestController.java
src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebApplicationBean.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebApplicationController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/checkout/PizzaCheckoutWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeatureWebApplicationBean.java
src/java/org/mxchange/pizzaapplication/beans/gender/PizzaGenderWebApplicationBean.java
src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/phone/PizzaAdminPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/phone/PizzaPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/product/PizzaAdminProductWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/product/PizzaAdminProductWebRequestController.java
src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebApplicationBean.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebApplicationController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/profilemode/PizzaProfileModeWebApplicationBean.java
src/java/org/mxchange/pizzaapplication/beans/receipt/PizzaReceiptWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/activity/PizzaUserActivityWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/confirmlink/PizzaConfirmationLinkWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/email_address/PizzaEmailChangeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/register/PizzaUserRegisterWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/resendlink/PizzaResendLinkWebRequestBean.java
src/java/org/mxchange/pizzaapplication/converter/category/PizzaCategoryConverter.java

diff --git a/src/java/org/mxchange/pizzaapplication/beans/BasePizzaBean.java b/src/java/org/mxchange/pizzaapplication/beans/BasePizzaBean.java
new file mode 100644 (file)
index 0000000..16365b0
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.pizzaapplication.beans;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import org.mxchange.jcoreee.bean.faces.BaseFacesBean;
+
+/**
+ * A general controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public abstract class BasePizzaBean extends BaseFacesBean {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 50_837_597_127_567_140L;
+
+       /**
+        * Protected constructor
+        */
+       protected BasePizzaBean () {
+               // Call super constructor
+               super();
+       }
+
+       @Override
+       protected ResourceBundle loadResourceBundle (final Locale locale) {
+               // Load resource bundle
+               ResourceBundle bundle = ResourceBundle.getBundle("org.mxchange.localization.bundle", locale);
+
+               // Return it
+               return bundle;
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java b/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java
deleted file mode 100644 (file)
index 5dd11dd..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * 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.pizzaapplication.beans;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-import org.mxchange.jcoreee.bean.faces.BaseFacesBean;
-
-/**
- * A general controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public abstract class BasePizzaController extends BaseFacesBean {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 50_837_597_127_567_140L;
-
-       /**
-        * Protected constructor
-        */
-       protected BasePizzaController () {
-               // Call super constructor
-               super();
-       }
-
-       @Override
-       protected ResourceBundle loadResourceBundle (final Locale locale) {
-               // Load resource bundle
-               ResourceBundle bundle = ResourceBundle.getBundle("org.mxchange.localization.bundle", locale);
-
-               // Return it
-               return bundle;
-       }
-
-}
index ba0a57932e98eae8ead40768ba7f98275d7eb010..b20440cb0f681f330b2c1914171399caab99d0b6 100644 (file)
@@ -33,7 +33,7 @@ import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.model.basket.Basket;
 import org.mxchange.jshopcore.model.basket.BasketSessionBeanRemote;
 import org.mxchange.jshopcore.model.basket.items.BasketItem;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A bean for the basket
@@ -42,7 +42,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("basketController")
 @SessionScoped
-public class PizzaBasketWebSessionBean extends BasePizzaController implements PizzaBasketWebSessionController {
+public class PizzaBasketWebSessionBean extends BasePizzaBean implements PizzaBasketWebSessionController {
 
        /**
         * Serial number
index ed09de22cfb9f62b9b69ddbddcd7b5cc6414b467..566118e736af966f0623adb1772f2a1f75af897d 100644 (file)
@@ -37,7 +37,7 @@ import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jusercore.model.user.User;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * An administrative business contact bean (controller)
@@ -46,7 +46,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminCompanyDataController")
 @RequestScoped
-public class PizzaAdminBusinessDataWebRequestBean extends BasePizzaController implements PizzaAdminBusinessDataWebRequestController {
+public class PizzaAdminBusinessDataWebRequestBean extends BasePizzaBean implements PizzaAdminBusinessDataWebRequestController {
 
        /**
         * Serial number
index 6cc45beb61d81333e83d24c3a7c5f63d54cf4fe0..a3abfae345241a962b3dcaf8ba6016d8b574c2e0 100644 (file)
@@ -33,7 +33,7 @@ import org.mxchange.jcontactsbusiness.model.basicdata.AdminBasicCompanyDataSessi
 import org.mxchange.jcontactsbusiness.model.basicdata.BasicCompanyDataSessionBeanRemote;
 import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 import org.mxchange.jcountry.model.data.Country;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
 
 /**
@@ -43,7 +43,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  */
 @Named ("basicDataController")
 @RequestScoped
-public class PizzaBusinessDataWebRequestBean extends BasePizzaController implements PizzaBusinessDataWebRequestController {
+public class PizzaBusinessDataWebRequestBean extends BasePizzaBean implements PizzaBusinessDataWebRequestController {
 
        /**
         * Serial number
index f8a7c9bf63d482362415e36d76c3ec4da1872335..498e870b4bf38b899ea53f0601c17f8a3186cf94 100644 (file)
@@ -38,7 +38,7 @@ import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jusercore.model.user.User;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * An administrative bean for branch offices
@@ -47,7 +47,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminBranchOfficeController")
 @RequestScoped
-public class PizzaAdminBranchOfficeWebRequestBean extends BasePizzaController implements PizzaAdminBranchOfficeWebRequestController {
+public class PizzaAdminBranchOfficeWebRequestBean extends BasePizzaBean implements PizzaAdminBranchOfficeWebRequestController {
 
        /**
         * Serial number
index 90934360d8b6b45f078e9e7b1f17237e7214ae08..17e2242014d8dd7fa9a9aceb4eba47ac7c774ecb 100644 (file)
@@ -31,7 +31,7 @@ import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.events.branchoffice.added.ObservableBranchOfficeAddedEvent;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOfficeSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A general bean for branch offices
@@ -40,7 +40,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("branchOfficeController")
 @RequestScoped
-public class PizzaBranchOfficeWebRequestBean extends BasePizzaController implements PizzaBranchOfficeWebRequestController {
+public class PizzaBranchOfficeWebRequestBean extends BasePizzaBean implements PizzaBranchOfficeWebRequestController {
 
        /**
         * Serial number
index e71b686e71bc392c8f09a7bfb809ec5bc9344e02..32120ce20d982c8954dd56ee11a1eba22a7c5a66 100644 (file)
@@ -20,7 +20,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A request-scoped bean for administrative purposes for company employees.
@@ -29,7 +29,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminCompanyEmployeeController")
 @RequestScoped
-public class PizzaAdminCompanyEmployeeWebRequestBean extends BasePizzaController implements PizzaAdminCompanyEmployeeWebRequestController {
+public class PizzaAdminCompanyEmployeeWebRequestBean extends BasePizzaBean implements PizzaAdminCompanyEmployeeWebRequestController {
 
        /**
         * Serial number
index b6cf024ac9099ac65f7de879fb6ddcc7aedaaa83..3077a897a323cbc3c99f4e90278fc8d751c3db5f 100644 (file)
@@ -28,7 +28,7 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote;
 import org.mxchange.jcontactsbusiness.model.employee.Employee;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A request-scoped bean for general purposes for company employees.
@@ -37,7 +37,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("companyEmployeeController")
 @RequestScoped
-public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaController implements PizzaCompanyEmployeeWebRequestController {
+public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaBean implements PizzaCompanyEmployeeWebRequestController {
 
        /**
         * Serial number
index dd1592ec267613d48d1acd483e01f8ca1ca3d4bd..7ce3904cbf04e2a32566a957d40cdd598a1f8d2e 100644 (file)
@@ -31,8 +31,8 @@ import org.mxchange.jproduct.exceptions.CannotAddCategoryException;
 import org.mxchange.jproduct.exceptions.CategoryTitleAlreadyUsedException;
 import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.category.ProductCategory;
-import org.mxchange.jshopcore.model.category.AdminCategorySessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.jproduct.model.category.AdminCategorySessionBeanRemote;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * Main application class
@@ -41,7 +41,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminCategoryController")
 @RequestScoped
-public class PizzaAdminCategoryWebRequestBean extends BasePizzaController implements PizzaAdminCategoryWebRequestController {
+public class PizzaAdminCategoryWebRequestBean extends BasePizzaBean implements PizzaAdminCategoryWebRequestController {
 
        /**
         * Serial number
index f7ef7f21904a40fb77d9e7a8f7c2871ea11e91d7..a42aa4de745657ad45a714bb20bee0569b182667 100644 (file)
 package org.mxchange.pizzaapplication.beans.category;
 
 import java.io.Serializable;
-import javax.ejb.Local;
-import javax.faces.view.facelets.FaceletException;
-import org.mxchange.jproduct.model.category.Category;
 
 /**
  * An interface for product controllers for "ADMIN" role
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@Local
 public interface PizzaAdminCategoryWebRequestController extends Serializable {
 
-       /**
-        * Adds given category data from request to database
-        * <p>
-        * @throws javax.faces.view.facelets.FaceletException If something
-        * unexpected happened
-        */
-       void addCategory () throws FaceletException;
-
-       /**
-        * Getter for parent id
-        * <p>
-        * @return Parent id
-        */
-       Category getParentCategory ();
-
-       /**
-        * Setter for parent category
-        * <p>
-        * @param parentCategory Parent category to set
-        */
-       void setParentCategory (final Category parentCategory);
-
-       /**
-        * Getter for category title
-        * <p>
-        * @return the title
-        */
-       String getCategoryTitle ();
-
-       /**
-        * Setter for category title
-        * <p>
-        * @param categoryTitle the title to set
-        */
-       void setCategoryTitle (final String categoryTitle);
-
 }
diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebApplicationBean.java
deleted file mode 100644 (file)
index 1a5aef3..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * 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.pizzaapplication.beans.category;
-
-import java.text.MessageFormat;
-import java.util.LinkedList;
-import java.util.List;
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.faces.FacesException;
-import javax.faces.view.facelets.FaceletException;
-import javax.inject.Named;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jproduct.events.category.AddedCategoryEvent;
-import org.mxchange.jproduct.model.category.Category;
-import org.mxchange.jshopcore.model.category.CategorySessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
-
-/**
- * General (product) category controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("categoryController")
-@ApplicationScoped
-public class PizzaCategoryWebApplicationBean extends BasePizzaController implements PizzaCategoryWebApplicationController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 58_137_539_530_279L;
-
-       /**
-        * All categories
-        */
-       private List<Category> categories;
-
-       @Override
-       public void afterShopCategoryAdded (@Observes final AddedCategoryEvent event) {
-               // Is all valid?
-               if (null == event) {
-                       // Throw NPE
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getAddedCategory() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("event.addedCategory is null"); //NOI18N
-               } else if (event.getAddedCategory().getCategoryId() == null) {
-                       // And again ...
-                       throw new NullPointerException("event.addedCategory.categoryId is null"); //NOI18N
-               } else if (event.getAddedCategory().getCategoryId() < 1) {
-                       // Id is invalid
-                       throw new IllegalArgumentException(MessageFormat.format("event.addedCategory.categoryId={0} is not valid.", event.getAddedCategory().getCategoryId())); //NOI18N
-               }
-
-               // Add the category
-               this.categories.add(event.getAddedCategory());
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<Category> getAllCategories () throws FacesException {
-               // Return it
-               return this.categories;
-       }
-
-       @Override
-       public List<Category> getAllCategoriesParent () throws FaceletException {
-               // Get regular list
-               List<Category> list = new LinkedList<>(this.getAllCategories());
-
-               // Return it
-               return list;
-       }
-
-       /**
-        * Initialization of this bean
-        */
-       @PostConstruct
-       public void init () {
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup the bean
-                       CategorySessionBeanRemote categoryBean = (CategorySessionBeanRemote) context.lookup("java:global/jshop-ejb/category!org.mxchange.jshopcore.model.category.CategorySessionBeanRemote"); //NOI18N
-
-                       // Get all categories
-                       this.categories = categoryBean.getAllCategories();
-               } catch (final NamingException e) {
-                       // Continued to throw
-                       throw new FacesException(e);
-               }
-       }
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebApplicationController.java b/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebApplicationController.java
deleted file mode 100644 (file)
index 089525c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * 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.pizzaapplication.beans.category;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Local;
-import javax.faces.view.facelets.FaceletException;
-import org.mxchange.jproduct.events.category.AddedCategoryEvent;
-import org.mxchange.jproduct.model.category.Category;
-
-/**
- * An interface for (product) categories
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Local
-public interface PizzaCategoryWebApplicationController extends Serializable {
-
-       /**
-        * Some "getter" for a linked list of all categories
-        * <p>
-        * @return All categories
-        * <p>
-        * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-        */
-       List<Category> getAllCategories () throws FaceletException;
-
-       /**
-        * Some "getter" for a linked list of all categories including "Has no
-        * parent" fake category.
-        * <p>
-        * @return All categories
-        * <p>
-        * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-        */
-       List<Category> getAllCategoriesParent () throws FaceletException;
-
-       /**
-        * Observes events fired after a new product category has been added
-        * <p>
-        * @param event Event to be observed
-        */
-       void afterShopCategoryAdded (final AddedCategoryEvent event);
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebRequestBean.java
new file mode 100644 (file)
index 0000000..4b1e13b
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.pizzaapplication.beans.category;
+
+import java.text.MessageFormat;
+import java.util.LinkedList;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+import javax.faces.FacesException;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jproduct.events.category.AddedCategoryEvent;
+import org.mxchange.jproduct.model.category.Category;
+import org.mxchange.jproduct.model.category.CategorySessionBeanRemote;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
+
+/**
+ * General (product) category controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("categoryController")
+@RequestScoped
+public class PizzaCategoryWebRequestBean extends BasePizzaBean implements PizzaCategoryWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 58_137_539_530_279L;
+
+       /**
+        * All categories
+        */
+       private List<Category> categories;
+
+       @Override
+       public void afterShopCategoryAdded (@Observes final AddedCategoryEvent event) {
+               // Is all valid?
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getAddedCategory() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("event.addedCategory is null"); //NOI18N
+               } else if (event.getAddedCategory().getCategoryId() == null) {
+                       // And again ...
+                       throw new NullPointerException("event.addedCategory.categoryId is null"); //NOI18N
+               } else if (event.getAddedCategory().getCategoryId() < 1) {
+                       // Id is invalid
+                       throw new IllegalArgumentException(MessageFormat.format("event.addedCategory.categoryId={0} is not valid.", event.getAddedCategory().getCategoryId())); //NOI18N
+               }
+
+               // Add the category
+               this.categories.add(event.getAddedCategory());
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<Category> getAllCategories () throws FacesException {
+               // Return it
+               return this.categories;
+       }
+
+       @Override
+       public List<Category> getAllCategoriesParent () throws FaceletException {
+               // Get regular list
+               List<Category> list = new LinkedList<>(this.getAllCategories());
+
+               // Return it
+               return list;
+       }
+
+       /**
+        * Initialization of this bean
+        */
+       @PostConstruct
+       public void init () {
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup the bean
+                       CategorySessionBeanRemote categoryBean = (CategorySessionBeanRemote) context.lookup("java:global/jshop-ejb/category!org.mxchange.jshopcore.model.category.CategorySessionBeanRemote"); //NOI18N
+
+                       // Get all categories
+                       this.categories = categoryBean.allCategories();
+               } catch (final NamingException e) {
+                       // Continued to throw
+                       throw new FacesException(e);
+               }
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/category/PizzaCategoryWebRequestController.java
new file mode 100644 (file)
index 0000000..a1f0f24
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.pizzaapplication.beans.category;
+
+import java.io.Serializable;
+
+/**
+ * An interface for (product) categories
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface PizzaCategoryWebRequestController extends Serializable {
+
+}
index 25a065ba910c5164c1738032e8afa14da4aad509..b20046eb27a668b267491d07b7939ae53715b652 100644 (file)
@@ -40,7 +40,7 @@ import org.mxchange.jshopcore.events.ShopCheckoutCompletedEvent;
 import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.wrapper.CheckoutWrapper;
 import org.mxchange.jshopcore.wrapper.WrapableCheckout;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.basket.PizzaBasketWebSessionController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.customer.PizzaCustomerWebSessionController;
@@ -54,7 +54,7 @@ import org.mxchange.pizzaapplication.beans.receipt.PizzaReceiptWebRequestControl
  */
 @Named ("checkoutController")
 @SessionScoped
-public class PizzaCheckoutWebSessionBean extends BasePizzaController implements PizzaCheckoutWebSessionController {
+public class PizzaCheckoutWebSessionBean extends BasePizzaBean implements PizzaCheckoutWebSessionController {
 
        /**
         * Serial number
index efd9726dfed680bdc12da52f8c69522e46d1f691..56bd82694117da04fb421b3a9821fa231429ed9d 100644 (file)
@@ -48,7 +48,7 @@ import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * Administrative user bean (controller)
@@ -57,7 +57,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminContactController")
 @RequestScoped
-public class PizzaAdminContactWebRequestBean extends BasePizzaController implements PizzaAdminContactWebRequestController {
+public class PizzaAdminContactWebRequestBean extends BasePizzaBean implements PizzaAdminContactWebRequestController {
 
        /**
         * Serial number
index 246420d2a1f887409b1fe91a00c6d6ee584c1257..87924a659dfc24410e54fee87ef0913b9b6a8136 100644 (file)
@@ -53,7 +53,7 @@ import org.mxchange.juserlogincore.events.confirmation.ObservableUserConfirmedAc
 import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent;
 import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
 
@@ -64,7 +64,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  */
 @Named ("contactController")
 @RequestScoped
-public class PizzaContactWebRequestBean extends BasePizzaController implements PizzaContactWebRequestController {
+public class PizzaContactWebRequestBean extends BasePizzaBean implements PizzaContactWebRequestController {
 
        /**
         * Serial number
index a99e880fb124fcc18f3868a415b8d34c7e0332e3..7c515dd8fd56ba5d14274eb2269cb24462483ee2 100644 (file)
@@ -56,7 +56,7 @@ import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.phone.PizzaAdminPhoneWebRequestController;
 
 /**
@@ -66,7 +66,7 @@ import org.mxchange.pizzaapplication.beans.phone.PizzaAdminPhoneWebRequestContro
  */
 @Named ("adminContactPhoneController")
 @RequestScoped
-public class PizzaAdminContactPhoneWebRequestBean extends BasePizzaController implements PizzaAdminContactPhoneWebRequestController {
+public class PizzaAdminContactPhoneWebRequestBean extends BasePizzaBean implements PizzaAdminContactPhoneWebRequestController {
 
        /**
         * Call-stack instance (5 may show BeanELResolver.getValue as caller)
index d7100d3c0442d1bbf15e0a093a1e894c33b5b6a5..ebf2813583e8e361c3f088b4c7634538d791e645 100644 (file)
@@ -40,7 +40,7 @@ import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 
 /**
@@ -50,7 +50,7 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestControl
  */
 @Named ("contactPhoneController")
 @RequestScoped
-public class PizzaContactPhoneWebRequestBean extends BasePizzaController implements PizzaContactPhoneWebRequestController {
+public class PizzaContactPhoneWebRequestBean extends BasePizzaBean implements PizzaContactPhoneWebRequestController {
 
        /**
         * Serial number
index 492eb84d375165601d44e27dca0cb72f5495173b..15938fb62e79e47c0bd6abac6ab9c5f8f2efe4eb 100644 (file)
@@ -32,7 +32,7 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
 import org.mxchange.jcountry.model.data.Country;
 import org.mxchange.jcountry.model.data.CountryData;
 import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * An administrative country bean
@@ -41,7 +41,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminCountryController")
 @RequestScoped
-public class PizzaAdminCountryWebRequestBean extends BasePizzaController implements PizzaAdminCountryWebRequestController {
+public class PizzaAdminCountryWebRequestBean extends BasePizzaBean implements PizzaAdminCountryWebRequestController {
 
        /**
         * Serial number
index 1e005a04d68354823df1a945822cfcc5c463a2c3..7d85c00c6e9cd477bd866b5d3aebff6047ba03d9 100644 (file)
@@ -31,7 +31,7 @@ import javax.inject.Named;
 import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
 import org.mxchange.jcountry.model.data.Country;
 import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A country bean
@@ -40,7 +40,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("countryController")
 @RequestScoped
-public class PizzaCountryWebRequestBean extends BasePizzaController implements PizzaCountryWebRequestController {
+public class PizzaCountryWebRequestBean extends BasePizzaBean implements PizzaCountryWebRequestController {
 
        /**
         * Serial number
index c3f7f134be5584756e7155e55cfb00d0b23e95b4..c62cb94f1f02e912303878c932ee818037d485e9 100644 (file)
@@ -36,7 +36,7 @@ import org.mxchange.jcustomercore.events.customer.created.ObservableCreatedCusto
 import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;
 import org.mxchange.jcustomercore.model.customer.Customer;
 import org.mxchange.jcustomercore.model.customer.status.CustomerAccountStatus;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperController;
 import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote;
@@ -49,7 +49,7 @@ import org.mxchange.jcustomercore.model.customer.ContactCustomer;
  */
 @Named ("adminCustomerController")
 @RequestScoped
-public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implements PizzaAdminCustomerWebRequestController {
+public class PizzaAdminCustomerWebRequestBean extends BasePizzaBean implements PizzaAdminCustomerWebRequestController {
 
        /**
         * Serial number
index 190c9082190d8b6492f21ded696ee7632bf59e14..2f33ee2dc05b1ac37ab2279d1c9d6a61ea65508f 100644 (file)
@@ -35,7 +35,7 @@ import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote;
 import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent;
 import org.mxchange.jcustomercore.model.customer.Customer;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
 import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote;
 
@@ -46,7 +46,7 @@ import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBea
  */
 @Named ("customerController")
 @SessionScoped
-public class PizzaCustomerWebSessionBean extends BasePizzaController implements PizzaCustomerWebSessionController {
+public class PizzaCustomerWebSessionBean extends BasePizzaBean implements PizzaCustomerWebSessionController {
 
        /**
         * Serial number
index 910c5c588a55465c41628e8586a94725924e4ccf..9595e5b7814c7ecf522ca1cefe98d0967560da84 100644 (file)
@@ -19,7 +19,7 @@ package org.mxchange.pizzaapplication.beans.features;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A feature bean
@@ -28,7 +28,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("featureController")
 @ApplicationScoped
-public class PizzaFeatureWebApplicationBean extends BasePizzaController implements PizzaFeaturesWebApplicationController {
+public class PizzaFeatureWebApplicationBean extends BasePizzaBean implements PizzaFeaturesWebApplicationController {
 
        /**
         * Serial number
index 3dbe715180b591554e977b3c84ff1fc1326bcd75..4a8af86b7895311b39ea3389fa70ef0110458aa1 100644 (file)
@@ -21,7 +21,7 @@ import java.util.List;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
 import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A gender and title bean
@@ -30,7 +30,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("genderController")
 @ApplicationScoped
-public class PizzaGenderWebApplicationBean extends BasePizzaController implements PizzaGenderWebApplicationController {
+public class PizzaGenderWebApplicationBean extends BasePizzaBean implements PizzaGenderWebApplicationController {
 
        /**
         * Serial number
index 2cf13e0630406f0f1fe382b5baa9a3cc4bf32c26..83e9001fdeb93b3d94805efab6f0783e4b57cefa 100644 (file)
@@ -34,7 +34,7 @@ import org.mxchange.jcoreee.events.locale.LocaleChangeEvent;
 import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
 import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent;
 import org.mxchange.juserlogincore.events.logout.ObservableUserLogoutEvent;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A session-scoped bean for handling localization/internationalization changes.
@@ -46,7 +46,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("localizationController")
 @SessionScoped
-public class PizzaLocalizationSessionBean extends BasePizzaController implements PizzaLocalizationSessionController {
+public class PizzaLocalizationSessionBean extends BasePizzaBean implements PizzaLocalizationSessionController {
 
        /**
         * Serial number
index b2cfa7f6ae3f9a2fba99eab715f456e862f34ec8..300ede2e8cae1fa63d8454549743f035eb53d020 100644 (file)
@@ -33,7 +33,7 @@ import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.AdminMobileProviderSessionBeanRemote;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.CellphoneProvider;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * Administrative bean (controller) for mobile provider
@@ -42,7 +42,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminMobileProviderController")
 @RequestScoped
-public class PizzaAdminMobileProviderWebRequestBean extends BasePizzaController implements PizzaAdminMobileProviderWebRequestController {
+public class PizzaAdminMobileProviderWebRequestBean extends BasePizzaBean implements PizzaAdminMobileProviderWebRequestController {
 
        /**
         * Serial number
index 84b9959c0e8527e4b124da8ed7c0d67d4178d53b..6b622af799a2221a19d0fcc56549e907a13d2a68 100644 (file)
@@ -32,7 +32,7 @@ import javax.inject.Named;
 import org.mxchange.jphone.events.mobileprovider.added.AdminAddedMobileProviderEvent;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A general bean for mobile providers
@@ -41,7 +41,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("mobileProviderController")
 @RequestScoped
-public class PizzaMobileProviderWebRequestBean extends BasePizzaController implements PizzaMobileProviderWebRequestController {
+public class PizzaMobileProviderWebRequestBean extends BasePizzaBean implements PizzaMobileProviderWebRequestController {
 
        /**
         * Serial number
index 0b41a75477acddfb1b30a1219897ef9e8fc92d9f..6959cc782e826beed30f08b12feaa3a05c599c9a 100644 (file)
@@ -57,7 +57,7 @@ import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jphone.model.phonenumbers.phone.AdminPhoneSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * Administrative bean (controller) for phone numbers
@@ -66,7 +66,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminPhoneController")
 @RequestScoped
-public class PizzaAdminPhoneWebRequestBean extends BasePizzaController implements PizzaAdminPhoneWebRequestController {
+public class PizzaAdminPhoneWebRequestBean extends BasePizzaBean implements PizzaAdminPhoneWebRequestController {
 
        /**
         * Call-stack position
index 225094497d0d9dbe6861e48e8521b365544e811f..496988c69e4928e6cd57f0bafcf72cd575c3a174 100644 (file)
@@ -46,7 +46,7 @@ import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.model.phonenumbers.phone.PhoneSessionBeanRemote;
 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * Regular controller (bean) for phone numbers
@@ -55,7 +55,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("phoneController")
 @RequestScoped
-public class PizzaPhoneWebRequestBean extends BasePizzaController implements PizzaPhoneWebRequestController {
+public class PizzaPhoneWebRequestBean extends BasePizzaBean implements PizzaPhoneWebRequestController {
 
        /**
         * Serial number
index 7ff6b9af73fb3deeb3805c3d95c00b6fbb515703..702251f7c1e4c0a162a55053ba64b2da1e9eb672 100644 (file)
@@ -35,8 +35,8 @@ import org.mxchange.jproduct.exceptions.ProductTitleAlreadyUsedException;
 import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.product.GenericProduct;
 import org.mxchange.jproduct.model.product.Product;
-import org.mxchange.jshopcore.model.product.AdminProductSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.jproduct.model.product.AdminProductSessionBeanRemote;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * Main application class
@@ -45,7 +45,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("adminProductController")
 @RequestScoped
-public class PizzaAdminProductWebRequestBean extends BasePizzaController implements PizzaAdminProductWebRequestController {
+public class PizzaAdminProductWebRequestBean extends BasePizzaBean implements PizzaAdminProductWebRequestController {
 
        /**
         * Serial number
index bb0ea5b72ab964303b88bc635b8f1d8a8deee9e9..c7be52da54af4f8ad554aff2cd8394c3f3c31b94 100644 (file)
 package org.mxchange.pizzaapplication.beans.product;
 
 import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Local;
-import javax.faces.view.facelets.FaceletException;
-import org.mxchange.jproduct.model.category.Category;
-import org.mxchange.jproduct.model.product.Product;
 
 /**
  * An interface for product controllers for "ADMIN" role
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@Local
 public interface PizzaAdminProductWebRequestController extends Serializable {
 
-       /**
-        * Adds given product data from request to database
-        * <p>
-        * @throws javax.faces.view.facelets.FaceletException If something
-        * unexpected happened
-        */
-       void addProduct () throws FaceletException;
-
-       /**
-        * Some "getter" for a linked list of all products
-        * <p>
-        * @return All products
-        * <p>
-        * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-        */
-       List<Product> getAllProducts () throws FaceletException;
-
-       /**
-        * Getter for product's available property
-        * <p>
-        * @return Product's available property
-        */
-       Boolean getProductAvailability ();
-
-       /**
-        * Setter for product's available property
-        * <p>
-        * @param available Product's available property
-        */
-       void setProductAvailability (final Boolean available);
-
-       /**
-        * Getter for product's category
-        * <p>
-        * @return Product's category
-        */
-       Category getProductCategory ();
-
-       /**
-        * Setter for product's category instance
-        * <p>
-        * @param productCategory Product's category instance
-        */
-       void setProductCategory (final Category productCategory);
-
-       /**
-        * Getter for product's price property
-        * <p>
-        * @return Product's price property
-        */
-       Float getProductPrice ();
-
-       /**
-        * Setter for product's price property
-        * <p>
-        * @param price Product's price property
-        */
-       void setProductPrice (final Float price);
-
-       /**
-        * Getter for product's title property
-        * <p>
-        * @return Product's title
-        */
-       String getProductTitle ();
-
-       /**
-        * Setter for product's title property
-        * <p>
-        * @param title Product's title
-        */
-       void setProductTitle (final String title);
-
 }
diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebApplicationBean.java
deleted file mode 100644 (file)
index 7c94eba..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * 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.pizzaapplication.beans.product;
-
-import java.text.MessageFormat;
-import java.util.Collections;
-import java.util.List;
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.faces.FacesException;
-import javax.inject.Named;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jproduct.events.product.AddedProductEvent;
-import org.mxchange.jproduct.model.product.Product;
-import org.mxchange.jshopcore.model.product.ProductSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
-
-/**
- * General product controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("productController")
-@ApplicationScoped
-public class PizzaProductWebApplicationBean extends BasePizzaController implements PizzaProductWebApplicationController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 58_137_539_530_279L;
-
-       /**
-        * "Cache" for all available products
-        */
-       private List<Product> availableProducts;
-
-       @Override
-       public void afterShopProductAdded (@Observes final AddedProductEvent event) {
-               // Is all valid?
-               if (null == event) {
-                       // Throw NPE
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getAddedProduct()== null) {
-                       // Throw again ...
-                       throw new NullPointerException("event.addedProduct is null"); //NOI18N
-               } else if (event.getAddedProduct().getProductId() == null) {
-                       // And again ...
-                       throw new NullPointerException("event.addedProduct.productId is null"); //NOI18N
-               } else if (event.getAddedProduct().getProductId() < 1) {
-                       // Id is invalid
-                       throw new IllegalArgumentException(MessageFormat.format("event.addedProduct.productId={0} is not valid.", event.getAddedProduct().getProductId())); //NOI18N
-               }
-
-               // Is the product available?
-               if (event.getAddedProduct().getProductAvailability()) {
-                       // Add it
-                       this.availableProducts.add(event.getAddedProduct());
-               }
-       }
-
-       @Override
-       public List<Product> getAvailableProducts () throws FacesException {
-               // Return it
-               return Collections.unmodifiableList(this.availableProducts);
-       }
-
-       /**
-        * Initialization of this bean
-        */
-       @PostConstruct
-       public void init () {
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup the bean
-                       ProductSessionBeanRemote productBean = (ProductSessionBeanRemote) context.lookup("java:global/jshop-ejb/product!org.mxchange.jshopcore.model.product.ProductSessionBeanRemote"); //NOI18N
-
-                       // Get available products list
-                       this.availableProducts = productBean.getAvailableProducts();
-               } catch (final NamingException e) {
-                       // Continued to throw
-                       throw new FacesException(e);
-               }
-       }
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebApplicationController.java b/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebApplicationController.java
deleted file mode 100644 (file)
index 513fc65..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * 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.pizzaapplication.beans.product;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Local;
-import javax.faces.view.facelets.FaceletException;
-import org.mxchange.jproduct.events.product.AddedProductEvent;
-import org.mxchange.jproduct.model.product.Product;
-
-/**
- * An interface for products
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Local
-public interface PizzaProductWebApplicationController extends Serializable {
-
-       /**
-        * Some "getter" for a linked list of only available products
-        * <p>
-        * @return Only available products
-        * <p>
-        * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-        */
-       List<Product> getAvailableProducts () throws FaceletException;
-
-       /**
-        * Observes events fired after a new product has been added
-        * <p>
-        * @param event Event to be observed
-        * <p>
-        * @todo Move this to own controller
-        */
-       void afterShopProductAdded (final AddedProductEvent event);
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebRequestBean.java
new file mode 100644 (file)
index 0000000..05e3ee2
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.pizzaapplication.beans.product;
+
+import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+import javax.faces.FacesException;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jproduct.events.product.AddedProductEvent;
+import org.mxchange.jproduct.model.product.Product;
+import org.mxchange.jproduct.model.product.ProductSessionBeanRemote;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
+
+/**
+ * General product controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("productController")
+@RequestScoped
+public class PizzaProductWebRequestBean extends BasePizzaBean implements PizzaProductWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 58_137_539_530_279L;
+
+       /**
+        * "Cache" for all available products
+        */
+       private List<Product> availableProducts;
+
+       @Override
+       public void afterShopProductAdded (@Observes final AddedProductEvent event) {
+               // Is all valid?
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getAddedProduct()== null) {
+                       // Throw again ...
+                       throw new NullPointerException("event.addedProduct is null"); //NOI18N
+               } else if (event.getAddedProduct().getProductId() == null) {
+                       // And again ...
+                       throw new NullPointerException("event.addedProduct.productId is null"); //NOI18N
+               } else if (event.getAddedProduct().getProductId() < 1) {
+                       // Id is invalid
+                       throw new IllegalArgumentException(MessageFormat.format("event.addedProduct.productId={0} is not valid.", event.getAddedProduct().getProductId())); //NOI18N
+               }
+
+               // Is the product available?
+               if (event.getAddedProduct().getProductAvailability()) {
+                       // Add it
+                       this.availableProducts.add(event.getAddedProduct());
+               }
+       }
+
+       @Override
+       public List<Product> getAvailableProducts () throws FacesException {
+               // Return it
+               return Collections.unmodifiableList(this.availableProducts);
+       }
+
+       /**
+        * Initialization of this bean
+        */
+       @PostConstruct
+       public void init () {
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup the bean
+                       ProductSessionBeanRemote productBean = (ProductSessionBeanRemote) context.lookup("java:global/jshop-ejb/product!org.mxchange.jshopcore.model.product.ProductSessionBeanRemote"); //NOI18N
+
+                       // Get available products list
+                       this.availableProducts = productBean.getAvailableProducts();
+               } catch (final NamingException e) {
+                       // Continued to throw
+                       throw new FacesException(e);
+               }
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/product/PizzaProductWebRequestController.java
new file mode 100644 (file)
index 0000000..ee5addf
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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.pizzaapplication.beans.product;
+
+import java.io.Serializable;
+
+/**
+ * An interface for products
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface PizzaProductWebRequestController extends Serializable {
+
+}
index 1a6cb6d4248cfd0bcda486eb61ca54acc33e0eb5..cb13f285ffe0a78a7e3243bc26ee7026f22505cf 100644 (file)
@@ -24,7 +24,7 @@ import javax.inject.Named;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
 
@@ -35,7 +35,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  */
 @Named (value = "profileController")
 @RequestScoped
-public class PizzaUserProfileWebRequestBean extends BasePizzaController implements PizzaUserProfileWebRequestController {
+public class PizzaUserProfileWebRequestBean extends BasePizzaBean implements PizzaUserProfileWebRequestController {
 
        /**
         * Serial number
index be1911812353e3dcc07467ec62706d1d5f66daa9..2f4f4b9c10b2afe879fecd9071164868ed2924e6 100644 (file)
@@ -19,7 +19,7 @@ package org.mxchange.pizzaapplication.beans.profilemode;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A profile mode bean
@@ -28,7 +28,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("profileModeController")
 @ApplicationScoped
-public class PizzaProfileModeWebApplicationBean extends BasePizzaController implements PizzaProfileModeWebApplicationController {
+public class PizzaProfileModeWebApplicationBean extends BasePizzaBean implements PizzaProfileModeWebApplicationController {
 
        /**
         * Serial number
index a27cc1fd544241d1203f9e18be110a357b4bc37e..e93c1989c06747849b9fecb88fb4081333e34caf 100644 (file)
@@ -25,7 +25,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jshopcore.model.receipt.ReceiptBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperController;
 
 /**
@@ -35,7 +35,7 @@ import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperControlle
  */
 @Named ("receiptController")
 @RequestScoped
-public class PizzaReceiptWebRequestBean extends BasePizzaController implements PizzaReceiptWebRequestController {
+public class PizzaReceiptWebRequestBean extends BasePizzaBean implements PizzaReceiptWebRequestController {
 
        /**
         * Serial number
index 639c1d112d50dab58e40c074e3182d5a2173f249..804a8fbdcded8b4c229bcf03fa066f5614731ab9 100644 (file)
@@ -60,7 +60,7 @@ import org.mxchange.juserlogincore.container.login.UserLoginContainer;
 import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordRepeatMismatchException;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;
@@ -72,7 +72,7 @@ import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSession
  */
 @Named ("adminUserController")
 @RequestScoped
-public class PizzaAdminUserWebRequestBean extends BasePizzaController implements PizzaAdminUserWebRequestController {
+public class PizzaAdminUserWebRequestBean extends BasePizzaBean implements PizzaAdminUserWebRequestController {
 
        /**
         * Serial number
index 8c8fc6b7cf3db7bde6e6f450a71492d34dc277d6..b0808d8b965130d2053298fce0911abf6fdb2e0d 100644 (file)
@@ -59,7 +59,7 @@ import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredE
 import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;
@@ -72,7 +72,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  */
 @Named ("userController")
 @RequestScoped
-public class PizzaUserWebRequestBean extends BasePizzaController implements PizzaUserWebRequestController {
+public class PizzaUserWebRequestBean extends BasePizzaBean implements PizzaUserWebRequestController {
 
        /**
         * Serial number
index f44893e2c049b94304c4c1907c4518487facad6e..a0fae9ce098b351805cfc48157212411e22e78e3 100644 (file)
@@ -48,7 +48,7 @@ import org.mxchange.juserlogincore.events.logout.ObservableUserLogoutEvent;
 import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
 import org.mxchange.juserlogincore.events.resendlink.ObservableUserResendLinkAccountEvent;
 import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
  * A controller (bean) for user activity log
@@ -57,7 +57,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  */
 @Named ("userActivityController")
 @RequestScoped
-public class PizzaUserActivityWebRequestBean extends BasePizzaController implements PizzaUserActivityWebRequestController {
+public class PizzaUserActivityWebRequestBean extends BasePizzaBean implements PizzaUserActivityWebRequestController {
 
        /**
         * Serial number
index 4dd63dd218cca1f3035ba7935be0b9618624c0db..c665071157bd35de2b8e6d21c30feaf23f180aae 100644 (file)
@@ -39,7 +39,7 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 import org.mxchange.juserlogincore.events.confirmation.ObservableUserConfirmedAccountEvent;
 import org.mxchange.juserlogincore.events.confirmation.UserConfirmedAccountEvent;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 
 /**
@@ -49,7 +49,7 @@ import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
  */
 @Named ("userConfirmationLinkController")
 @RequestScoped
-public class PizzaConfirmationLinkWebRequestBean extends BasePizzaController implements PizzaConfirmationLinkWebRequestController {
+public class PizzaConfirmationLinkWebRequestBean extends BasePizzaBean implements PizzaConfirmationLinkWebRequestController {
 
        /**
         * Serial number
index fae80555d6a1008ab35b27bdf825f7cbb7de1c35..fb4a7ce3d375fbadc6c44113593dbf08b0516631 100644 (file)
@@ -35,7 +35,7 @@ import org.mxchange.jusercore.model.email_address.EmailAddressChange;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.email_address.UserEmailChangeSessionBeanRemote;
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
 
@@ -46,7 +46,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  */
 @Named ("userEmailChangeController")
 @RequestScoped
-public class PizzaEmailChangeWebRequestBean extends BasePizzaController implements PizzaEmailChangeWebRequestController {
+public class PizzaEmailChangeWebRequestBean extends BasePizzaBean implements PizzaEmailChangeWebRequestController {
 
        /**
         * Serial number
index cec9ccedd558fcb8555b9a4ae768054568c50b35..5ea2d812daab1050711d658fd300bd470822a8bb 100644 (file)
@@ -46,7 +46,7 @@ import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdated
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
 import org.mxchange.juserlogincore.model.user.login.UserLoginSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 
 /**
@@ -56,7 +56,7 @@ import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
  */
 @Named ("userLoginController")
 @SessionScoped
-public class PizzaUserLoginWebSessionBean extends BasePizzaController implements PizzaUserLoginWebSessionController {
+public class PizzaUserLoginWebSessionBean extends BasePizzaBean implements PizzaUserLoginWebSessionController {
 
        /**
         * Path name for guest base template
index 500f0897e225d85ef8dac7c57a9c907bce8cc6f2..53fc1dbd12b111988d99b69ca66fb662cc15dcdb 100644 (file)
@@ -35,7 +35,7 @@ import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdated
 import org.mxchange.juserlogincore.events.user.password_change.UpdatedUserPasswordEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
 
@@ -46,7 +46,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  */
 @Named ("userPasswordController")
 @RequestScoped
-public class PizzaUserPasswordWebRequestBean extends BasePizzaController implements PizzaUserPasswordWebRequestController {
+public class PizzaUserPasswordWebRequestBean extends BasePizzaBean implements PizzaUserPasswordWebRequestController {
 
        /**
         * Serial number
index 65bf80664ed8438b96cb9899e3585156f340014a..1d36de35e4cd0ec615566f909edc3ff409257e08 100644 (file)
@@ -43,7 +43,7 @@ import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdated
 import org.mxchange.juserlogincore.events.user.password_change.UpdatedUserPasswordEvent;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
 import org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.user.PizzaAdminUserWebRequestController;
@@ -56,7 +56,7 @@ import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
  */
 @Named ("userRegistrationController")
 @RequestScoped
-public class PizzaUserRegisterWebRequestBean extends BasePizzaController implements PizzaUserRegisterWebRequestController {
+public class PizzaUserRegisterWebRequestBean extends BasePizzaBean implements PizzaUserRegisterWebRequestController {
 
        /**
         * Serial number
index 5f04df0ab0d608f22040e5aceefd2021327cd518..0de92c6649f42f77f96c26ebf9214ed341c697c9 100644 (file)
@@ -35,7 +35,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 import org.mxchange.juserlogincore.events.resendlink.ObservableUserResendLinkAccountEvent;
 import org.mxchange.juserlogincore.events.resendlink.UserResendLinkAccountEvent;
 import org.mxchange.juserlogincore.model.user.resendlink.ResendLinkSessionBeanRemote;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 
@@ -46,7 +46,7 @@ import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
  */
 @Named ("userResendConfirmationController")
 @RequestScoped
-public class PizzaResendLinkWebRequestBean extends BasePizzaController implements PizzaResendLinkWebRequestController {
+public class PizzaResendLinkWebRequestBean extends BasePizzaBean implements PizzaResendLinkWebRequestController {
 
        /**
         * Serial number
index fa3e66fd9ae0adaac94d97f923e27e3824229599..262c5d2382fcf43cbb66cfa76cbadfd0b701b720 100644 (file)
@@ -29,7 +29,7 @@ import javax.naming.NamingException;
 import org.mxchange.jcoreeelogger.beans.local.logger.Log;
 import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 import org.mxchange.jproduct.model.category.Category;
-import org.mxchange.jshopcore.model.category.CategorySessionBeanRemote;
+import org.mxchange.jproduct.model.category.CategorySessionBeanRemote;
 
 /**
  * A converter for transferring category objects
@@ -76,7 +76,7 @@ public class PizzaCategoryConverter implements Converter {
                // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
 
                // Get full list
-               List<Category> categoryList = this.categoryBean.getAllCategories();
+               List<Category> categoryList = this.categoryBean.allCategories();
 
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {