From 082638190d3515abcdf3b6bdb0c2ffd35d006cde Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 27 Apr 2016 22:02:15 +0200 Subject: [PATCH] updated (maybe not cherry-pick this) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../PizzaAdminCustomerWebRequestBean.java} | 16 +++---- ...zzaAdminCustomerWebRequestController.java} | 8 ++-- .../helper/PizzaAdminWebRequestHelper.java | 2 - .../PizzaUserProfileWebRequestController.java | 47 +++++++++++++++++++ ...zaProfileModeWebApplicationController.java | 36 ++++++++++++++ .../user/PizzaAdminUserWebRequestBean.java | 2 - 6 files changed, 95 insertions(+), 16 deletions(-) rename src/java/{de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java => org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java} (75%) rename src/java/{de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java => org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java} (83%) create mode 100644 src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestController.java create mode 100644 src/java/org/mxchange/pizzaapplication/beans/profilemode/PizzaProfileModeWebApplicationController.java diff --git a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java similarity index 75% rename from src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java rename to src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java index 200bec9a..9536ebec 100644 --- a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cho-Time GmbH + * Copyright (C) 2016 Roland Haeder * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -14,9 +14,8 @@ * 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; +package org.mxchange.pizzaapplication.beans.customer; -import de.chotime.jratecalc.model.customer.RateCalcAdminCustomerSessionBeanRemote; import java.util.Collections; import java.util.List; import javax.annotation.PostConstruct; @@ -27,15 +26,16 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcustomercore.model.customer.Customer; +import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote; /** * Administrative customer bean (controller) *

- * @author Roland Haeder + * @author Roland Haeder */ @Named ("adminCustomerController") @RequestScoped -public class RateCalcAdminCustomerWebRequestBean implements RateCalcAdminCustomerWebRequestController { +public class PizzaAdminCustomerWebRequestBean implements PizzaAdminCustomerWebRequestController { /** * Serial number @@ -45,7 +45,7 @@ public class RateCalcAdminCustomerWebRequestBean implements RateCalcAdminCustome /** * Administrative customer EJB */ - private RateCalcAdminCustomerSessionBeanRemote adminCustomerBean; + private PizzaAdminCustomerSessionBeanRemote adminCustomerBean; /** * A list of all customers @@ -55,14 +55,14 @@ public class RateCalcAdminCustomerWebRequestBean implements RateCalcAdminCustome /** * Default constructor */ - public RateCalcAdminCustomerWebRequestBean () { + public PizzaAdminCustomerWebRequestBean () { // Try it try { // Get initial context Context context = new InitialContext(); // Try to lookup - this.adminCustomerBean = (RateCalcAdminCustomerSessionBeanRemote) context.lookup("java:global/jratecalc-ejb/admincustomer!de.chotime.jratecalc.model.customer.RateCalcAdminCustomerSessionBeanRemote"); //NOI18N + this.adminCustomerBean = (PizzaAdminCustomerSessionBeanRemote) context.lookup("java:global/PizzaService-ejb/admincustomer!org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote"); //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/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java similarity index 83% rename from src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java rename to src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java index bc50cd53..daddfd88 100644 --- a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cho-Time GmbH + * Copyright (C) 2016 Roland Haeder * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -14,7 +14,7 @@ * 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; +package org.mxchange.pizzaapplication.beans.customer; import java.io.Serializable; import java.util.List; @@ -23,9 +23,9 @@ import org.mxchange.jcustomercore.model.customer.Customer; /** * An interface for user beans *

- * @author Roland Haeder + * @author Roland Haeder */ -public interface RateCalcAdminCustomerWebRequestController extends Serializable { +public interface PizzaAdminCustomerWebRequestController extends Serializable { /** * All customer diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java index 284858a4..6d538c23 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java +++ b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java @@ -16,8 +16,6 @@ */ 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; diff --git a/src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestController.java new file mode 100644 index 00000000..3541725e --- /dev/null +++ b/src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestController.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.pizzaapplication.beans.profile; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.User; + +/** + * A bean interface for user profiles + *

+ * @author Roland Haeder + */ +public interface PizzaUserProfileWebRequestController extends Serializable { + + /** + * Checks if the user profile link is visible + *

+ * @param userId User id + *

+ * @return Whether the profile link is visible + */ + boolean isProfileLinkVisibleById (final Long userId); + + /** + * Checks if given user's profile is visible + *

+ * @param user User instance to check + *

+ * @return Whether the user's profile is visible + */ + boolean isProfileLinkVisibleByUser (final User user); + +} diff --git a/src/java/org/mxchange/pizzaapplication/beans/profilemode/PizzaProfileModeWebApplicationController.java b/src/java/org/mxchange/pizzaapplication/beans/profilemode/PizzaProfileModeWebApplicationController.java new file mode 100644 index 00000000..e576dca0 --- /dev/null +++ b/src/java/org/mxchange/pizzaapplication/beans/profilemode/PizzaProfileModeWebApplicationController.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.pizzaapplication.beans.profilemode; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; + +/** + * An interface for data beans + *

+ * @author Roland Haeder + */ +public interface PizzaProfileModeWebApplicationController extends Serializable { + + /** + * Getter for all genders as array + *

+ * @return All genders as array + */ + ProfileMode[] getAllProfileModes (); + +} diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java index ec2786a4..6f98b9c6 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java @@ -16,8 +16,6 @@ */ 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; -- 2.39.5