--- /dev/null
+/*
+ * 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;
+ }
+
+}
+++ /dev/null
-/*
- * 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;
- }
-
-}
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
*/
@Named ("basketController")
@SessionScoped
-public class PizzaBasketWebSessionBean extends BasePizzaController implements PizzaBasketWebSessionController {
+public class PizzaBasketWebSessionBean extends BasePizzaBean implements PizzaBasketWebSessionController {
/**
* Serial number
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)
*/
@Named ("adminCompanyDataController")
@RequestScoped
-public class PizzaAdminBusinessDataWebRequestBean extends BasePizzaController implements PizzaAdminBusinessDataWebRequestController {
+public class PizzaAdminBusinessDataWebRequestBean extends BasePizzaBean implements PizzaAdminBusinessDataWebRequestController {
/**
* Serial number
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;
/**
*/
@Named ("basicDataController")
@RequestScoped
-public class PizzaBusinessDataWebRequestBean extends BasePizzaController implements PizzaBusinessDataWebRequestController {
+public class PizzaBusinessDataWebRequestBean extends BasePizzaBean implements PizzaBusinessDataWebRequestController {
/**
* Serial number
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
*/
@Named ("adminBranchOfficeController")
@RequestScoped
-public class PizzaAdminBranchOfficeWebRequestBean extends BasePizzaController implements PizzaAdminBranchOfficeWebRequestController {
+public class PizzaAdminBranchOfficeWebRequestBean extends BasePizzaBean implements PizzaAdminBranchOfficeWebRequestController {
/**
* Serial number
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
*/
@Named ("branchOfficeController")
@RequestScoped
-public class PizzaBranchOfficeWebRequestBean extends BasePizzaController implements PizzaBranchOfficeWebRequestController {
+public class PizzaBranchOfficeWebRequestBean extends BasePizzaBean implements PizzaBranchOfficeWebRequestController {
/**
* Serial number
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.
*/
@Named ("adminCompanyEmployeeController")
@RequestScoped
-public class PizzaAdminCompanyEmployeeWebRequestBean extends BasePizzaController implements PizzaAdminCompanyEmployeeWebRequestController {
+public class PizzaAdminCompanyEmployeeWebRequestBean extends BasePizzaBean implements PizzaAdminCompanyEmployeeWebRequestController {
/**
* Serial number
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.
*/
@Named ("companyEmployeeController")
@RequestScoped
-public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaController implements PizzaCompanyEmployeeWebRequestController {
+public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaBean implements PizzaCompanyEmployeeWebRequestController {
/**
* Serial number
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
*/
@Named ("adminCategoryController")
@RequestScoped
-public class PizzaAdminCategoryWebRequestBean extends BasePizzaController implements PizzaAdminCategoryWebRequestController {
+public class PizzaAdminCategoryWebRequestBean extends BasePizzaBean implements PizzaAdminCategoryWebRequestController {
/**
* Serial number
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);
-
}
+++ /dev/null
-/*
- * 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);
- }
- }
-
-}
+++ /dev/null
-/*
- * 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);
-
-}
--- /dev/null
+/*
+ * 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);
+ }
+ }
+
+}
--- /dev/null
+/*
+ * 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 {
+
+}
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;
*/
@Named ("checkoutController")
@SessionScoped
-public class PizzaCheckoutWebSessionBean extends BasePizzaController implements PizzaCheckoutWebSessionController {
+public class PizzaCheckoutWebSessionBean extends BasePizzaBean implements PizzaCheckoutWebSessionController {
/**
* Serial number
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)
*/
@Named ("adminContactController")
@RequestScoped
-public class PizzaAdminContactWebRequestBean extends BasePizzaController implements PizzaAdminContactWebRequestController {
+public class PizzaAdminContactWebRequestBean extends BasePizzaBean implements PizzaAdminContactWebRequestController {
/**
* Serial number
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;
*/
@Named ("contactController")
@RequestScoped
-public class PizzaContactWebRequestBean extends BasePizzaController implements PizzaContactWebRequestController {
+public class PizzaContactWebRequestBean extends BasePizzaBean implements PizzaContactWebRequestController {
/**
* Serial number
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;
/**
*/
@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)
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;
/**
*/
@Named ("contactPhoneController")
@RequestScoped
-public class PizzaContactPhoneWebRequestBean extends BasePizzaController implements PizzaContactPhoneWebRequestController {
+public class PizzaContactPhoneWebRequestBean extends BasePizzaBean implements PizzaContactPhoneWebRequestController {
/**
* Serial number
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
*/
@Named ("adminCountryController")
@RequestScoped
-public class PizzaAdminCountryWebRequestBean extends BasePizzaController implements PizzaAdminCountryWebRequestController {
+public class PizzaAdminCountryWebRequestBean extends BasePizzaBean implements PizzaAdminCountryWebRequestController {
/**
* Serial number
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
*/
@Named ("countryController")
@RequestScoped
-public class PizzaCountryWebRequestBean extends BasePizzaController implements PizzaCountryWebRequestController {
+public class PizzaCountryWebRequestBean extends BasePizzaBean implements PizzaCountryWebRequestController {
/**
* Serial number
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;
*/
@Named ("adminCustomerController")
@RequestScoped
-public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implements PizzaAdminCustomerWebRequestController {
+public class PizzaAdminCustomerWebRequestBean extends BasePizzaBean implements PizzaAdminCustomerWebRequestController {
/**
* Serial number
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;
*/
@Named ("customerController")
@SessionScoped
-public class PizzaCustomerWebSessionBean extends BasePizzaController implements PizzaCustomerWebSessionController {
+public class PizzaCustomerWebSessionBean extends BasePizzaBean implements PizzaCustomerWebSessionController {
/**
* Serial number
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
*/
@Named ("featureController")
@ApplicationScoped
-public class PizzaFeatureWebApplicationBean extends BasePizzaController implements PizzaFeaturesWebApplicationController {
+public class PizzaFeatureWebApplicationBean extends BasePizzaBean implements PizzaFeaturesWebApplicationController {
/**
* Serial number
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
*/
@Named ("genderController")
@ApplicationScoped
-public class PizzaGenderWebApplicationBean extends BasePizzaController implements PizzaGenderWebApplicationController {
+public class PizzaGenderWebApplicationBean extends BasePizzaBean implements PizzaGenderWebApplicationController {
/**
* Serial number
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.
*/
@Named ("localizationController")
@SessionScoped
-public class PizzaLocalizationSessionBean extends BasePizzaController implements PizzaLocalizationSessionController {
+public class PizzaLocalizationSessionBean extends BasePizzaBean implements PizzaLocalizationSessionController {
/**
* Serial number
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
*/
@Named ("adminMobileProviderController")
@RequestScoped
-public class PizzaAdminMobileProviderWebRequestBean extends BasePizzaController implements PizzaAdminMobileProviderWebRequestController {
+public class PizzaAdminMobileProviderWebRequestBean extends BasePizzaBean implements PizzaAdminMobileProviderWebRequestController {
/**
* Serial number
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
*/
@Named ("mobileProviderController")
@RequestScoped
-public class PizzaMobileProviderWebRequestBean extends BasePizzaController implements PizzaMobileProviderWebRequestController {
+public class PizzaMobileProviderWebRequestBean extends BasePizzaBean implements PizzaMobileProviderWebRequestController {
/**
* Serial number
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
*/
@Named ("adminPhoneController")
@RequestScoped
-public class PizzaAdminPhoneWebRequestBean extends BasePizzaController implements PizzaAdminPhoneWebRequestController {
+public class PizzaAdminPhoneWebRequestBean extends BasePizzaBean implements PizzaAdminPhoneWebRequestController {
/**
* Call-stack position
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
*/
@Named ("phoneController")
@RequestScoped
-public class PizzaPhoneWebRequestBean extends BasePizzaController implements PizzaPhoneWebRequestController {
+public class PizzaPhoneWebRequestBean extends BasePizzaBean implements PizzaPhoneWebRequestController {
/**
* Serial number
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
*/
@Named ("adminProductController")
@RequestScoped
-public class PizzaAdminProductWebRequestBean extends BasePizzaController implements PizzaAdminProductWebRequestController {
+public class PizzaAdminProductWebRequestBean extends BasePizzaBean implements PizzaAdminProductWebRequestController {
/**
* Serial number
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);
-
}
+++ /dev/null
-/*
- * 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);
- }
- }
-
-}
+++ /dev/null
-/*
- * 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);
-
-}
--- /dev/null
+/*
+ * 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);
+ }
+ }
+
+}
--- /dev/null
+/*
+ * 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 {
+
+}
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;
*/
@Named (value = "profileController")
@RequestScoped
-public class PizzaUserProfileWebRequestBean extends BasePizzaController implements PizzaUserProfileWebRequestController {
+public class PizzaUserProfileWebRequestBean extends BasePizzaBean implements PizzaUserProfileWebRequestController {
/**
* Serial number
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
*/
@Named ("profileModeController")
@ApplicationScoped
-public class PizzaProfileModeWebApplicationBean extends BasePizzaController implements PizzaProfileModeWebApplicationController {
+public class PizzaProfileModeWebApplicationBean extends BasePizzaBean implements PizzaProfileModeWebApplicationController {
/**
* Serial number
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;
/**
*/
@Named ("receiptController")
@RequestScoped
-public class PizzaReceiptWebRequestBean extends BasePizzaController implements PizzaReceiptWebRequestController {
+public class PizzaReceiptWebRequestBean extends BasePizzaBean implements PizzaReceiptWebRequestController {
/**
* Serial number
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;
*/
@Named ("adminUserController")
@RequestScoped
-public class PizzaAdminUserWebRequestBean extends BasePizzaController implements PizzaAdminUserWebRequestController {
+public class PizzaAdminUserWebRequestBean extends BasePizzaBean implements PizzaAdminUserWebRequestController {
/**
* Serial number
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;
*/
@Named ("userController")
@RequestScoped
-public class PizzaUserWebRequestBean extends BasePizzaController implements PizzaUserWebRequestController {
+public class PizzaUserWebRequestBean extends BasePizzaBean implements PizzaUserWebRequestController {
/**
* Serial number
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
*/
@Named ("userActivityController")
@RequestScoped
-public class PizzaUserActivityWebRequestBean extends BasePizzaController implements PizzaUserActivityWebRequestController {
+public class PizzaUserActivityWebRequestBean extends BasePizzaBean implements PizzaUserActivityWebRequestController {
/**
* Serial number
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;
/**
*/
@Named ("userConfirmationLinkController")
@RequestScoped
-public class PizzaConfirmationLinkWebRequestBean extends BasePizzaController implements PizzaConfirmationLinkWebRequestController {
+public class PizzaConfirmationLinkWebRequestBean extends BasePizzaBean implements PizzaConfirmationLinkWebRequestController {
/**
* Serial number
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;
*/
@Named ("userEmailChangeController")
@RequestScoped
-public class PizzaEmailChangeWebRequestBean extends BasePizzaController implements PizzaEmailChangeWebRequestController {
+public class PizzaEmailChangeWebRequestBean extends BasePizzaBean implements PizzaEmailChangeWebRequestController {
/**
* Serial number
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;
/**
*/
@Named ("userLoginController")
@SessionScoped
-public class PizzaUserLoginWebSessionBean extends BasePizzaController implements PizzaUserLoginWebSessionController {
+public class PizzaUserLoginWebSessionBean extends BasePizzaBean implements PizzaUserLoginWebSessionController {
/**
* Path name for guest base template
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;
*/
@Named ("userPasswordController")
@RequestScoped
-public class PizzaUserPasswordWebRequestBean extends BasePizzaController implements PizzaUserPasswordWebRequestController {
+public class PizzaUserPasswordWebRequestBean extends BasePizzaBean implements PizzaUserPasswordWebRequestController {
/**
* Serial number
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;
*/
@Named ("userRegistrationController")
@RequestScoped
-public class PizzaUserRegisterWebRequestBean extends BasePizzaController implements PizzaUserRegisterWebRequestController {
+public class PizzaUserRegisterWebRequestBean extends BasePizzaBean implements PizzaUserRegisterWebRequestController {
/**
* Serial number
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;
*/
@Named ("userResendConfirmationController")
@RequestScoped
-public class PizzaResendLinkWebRequestBean extends BasePizzaController implements PizzaResendLinkWebRequestController {
+public class PizzaResendLinkWebRequestBean extends BasePizzaBean implements PizzaResendLinkWebRequestController {
/**
* Serial number
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
// 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())) {