From: Roland Häder Date: Mon, 25 Apr 2016 13:07:17 +0000 (+0200) Subject: Continued with administrative customer bean: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=568254bb23900e6d64dc42abfc55c4d7d122d238;p=pizzaservice-war.git Continued with administrative customer bean: - added request-scoped administrative customer bean - minor: better wording - updated navigation data file Signed-off-by: Roland Häder --- diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index e97c6287..826374fe 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,62 +2,62 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java b/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java new file mode 100644 index 00000000..ba669e09 --- /dev/null +++ b/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * 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 . + */ +package de.chotime.jratecalc.beans.customer; + +import javax.enterprise.context.RequestScoped; +import javax.faces.view.facelets.FaceletException; +import javax.inject.Named; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; + +/** + * Administrative customer bean (controller) + *

+ * @author Roland Haeder + */ +@Named ("adminCustomerController") +@RequestScoped +public class RateCalcAdminCustomerWebRequestBean implements RateCalcAdminCustomerWebRequestController { + + /** + * Serial number + */ + private static final long serialVersionUID = 12_487_062_487_527_913L; + + /** + * Default constructor + */ + public RateCalcAdminCustomerWebRequestBean () { + // Try it + try { + // Get initial context + Context context = new InitialContext(); + + // Try to lookup + //this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jratecalc-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N + } catch (final NamingException e) { + // Throw again + throw new FaceletException(e); + } + } + +} diff --git a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java b/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java new file mode 100644 index 00000000..2e3ea8bf --- /dev/null +++ b/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * 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 . + */ +package de.chotime.jratecalc.beans.customer; + +import java.io.Serializable; + +/** + * An interface for user beans + *

+ * @author Roland Haeder + */ +public interface RateCalcAdminCustomerWebRequestController extends Serializable { + +} diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java index 4c6d703f..30bce3d5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java @@ -43,7 +43,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController; /** - * An administrative user bean (controller) + * Administrative user bean (controller) *

* @author Roland Haeder */ diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java index 8b7f93fa..3ca70436 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java @@ -24,7 +24,7 @@ import org.mxchange.jcountry.data.Country; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; /** - * An administrative interface for user beans + * Administrative interface for user beans *

* @author Roland Haeder */ diff --git a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java index 6dcd7209..9a1be700 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java @@ -36,7 +36,7 @@ import org.mxchange.jcountry.events.AdminEventCountryAdded; import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; /** - * An administrative country bean + * Administrative country bean *

* @author Roland Haeder */ diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java index 41e629e4..284858a4 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java +++ b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java @@ -16,6 +16,8 @@ */ package org.mxchange.pizzaapplication.beans.helper; +import de.chotime.jratecalc.beans.contact.RateCalcAdminContactWebRequestController; +import de.chotime.jratecalc.beans.user.RateCalcAdminUserWebRequestController; import java.text.MessageFormat; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; @@ -26,7 +28,7 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestCo import org.mxchange.pizzaapplication.beans.user.PizzaAdminUserWebRequestController; /** - * A general helper for beans + * A general helper for administrative beans *

* @author Roland Haeder */ diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java index 4c77b0ee..ec2786a4 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java @@ -16,6 +16,8 @@ */ package org.mxchange.pizzaapplication.beans.user; +import de.chotime.jratecalc.beans.contact.RateCalcContactWebSessionController; +import de.chotime.jratecalc.beans.helper.RateCalcAdminWebRequestController; import java.text.MessageFormat; import java.util.Collections; import java.util.Iterator; @@ -53,7 +55,7 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionControl import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController; /** - * A user bean (controller) + * Administrative user bean (controller) *

* @author Roland Haeder */