]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
updated (maybe not cherry-pick this)
authorRoland Haeder <roland@mxchange.org>
Wed, 27 Apr 2016 20:02:15 +0000 (22:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 27 Apr 2016 20:02:33 +0000 (22:02 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java [deleted file]
src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java
src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/profilemode/PizzaProfileModeWebApplicationController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java

diff --git a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java b/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestBean.java
deleted file mode 100644 (file)
index 200bec9..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package de.chotime.jratecalc.beans.customer;
-
-import de.chotime.jratecalc.model.customer.RateCalcAdminCustomerSessionBeanRemote;
-import java.util.Collections;
-import java.util.List;
-import javax.annotation.PostConstruct;
-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;
-import org.mxchange.jcustomercore.model.customer.Customer;
-
-/**
- * Administrative customer bean (controller)
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-@Named ("adminCustomerController")
-@RequestScoped
-public class RateCalcAdminCustomerWebRequestBean implements RateCalcAdminCustomerWebRequestController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 12_487_062_487_527_913L;
-
-       /**
-        * Administrative customer EJB
-        */
-       private RateCalcAdminCustomerSessionBeanRemote adminCustomerBean;
-
-       /**
-        * A list of all customers
-        */
-       private List<Customer> customerList;
-
-       /**
-        * Default constructor
-        */
-       public RateCalcAdminCustomerWebRequestBean () {
-               // 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
-               } catch (final NamingException e) {
-                       // Throw again
-                       throw new FaceletException(e);
-               }
-       }
-
-       @Override
-       public List<Customer> allCustomers () {
-               // Return it
-               return Collections.unmodifiableList(this.customerList);
-       }
-
-       @Override
-       public boolean hasCustomers () {
-               return (!this.allCustomers().isEmpty());
-       }
-
-       /**
-        * Post-initialization of this class
-        */
-       @PostConstruct
-       public void init () {
-               // Initialize customer list
-               this.customerList = this.adminCustomerBean.allCustomers();
-       }
-
-}
diff --git a/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java b/src/java/de/chotime/jratecalc/beans/customer/RateCalcAdminCustomerWebRequestController.java
deleted file mode 100644 (file)
index bc50cd5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package de.chotime.jratecalc.beans.customer;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcustomercore.model.customer.Customer;
-
-/**
- * An interface for user beans
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-public interface RateCalcAdminCustomerWebRequestController extends Serializable {
-
-       /**
-        * All customer
-        * <p>
-        * @return A list of all customer profiles
-        */
-       List<Customer> allCustomers ();
-
-       /**
-        * Checks whether customers are registered
-        * <p>
-        * @return Whether customers are registered
-        */
-       boolean hasCustomers ();
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java
new file mode 100644 (file)
index 0000000..9536ebe
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.customer;
+
+import java.util.Collections;
+import java.util.List;
+import javax.annotation.PostConstruct;
+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;
+import org.mxchange.jcustomercore.model.customer.Customer;
+import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote;
+
+/**
+ * Administrative customer bean (controller)
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminCustomerController")
+@RequestScoped
+public class PizzaAdminCustomerWebRequestBean implements PizzaAdminCustomerWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 12_487_062_487_527_913L;
+
+       /**
+        * Administrative customer EJB
+        */
+       private PizzaAdminCustomerSessionBeanRemote adminCustomerBean;
+
+       /**
+        * A list of all customers
+        */
+       private List<Customer> customerList;
+
+       /**
+        * Default constructor
+        */
+       public PizzaAdminCustomerWebRequestBean () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       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);
+               }
+       }
+
+       @Override
+       public List<Customer> allCustomers () {
+               // Return it
+               return Collections.unmodifiableList(this.customerList);
+       }
+
+       @Override
+       public boolean hasCustomers () {
+               return (!this.allCustomers().isEmpty());
+       }
+
+       /**
+        * Post-initialization of this class
+        */
+       @PostConstruct
+       public void init () {
+               // Initialize customer list
+               this.customerList = this.adminCustomerBean.allCustomers();
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestController.java
new file mode 100644 (file)
index 0000000..daddfd8
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.customer;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jcustomercore.model.customer.Customer;
+
+/**
+ * An interface for user beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface PizzaAdminCustomerWebRequestController extends Serializable {
+
+       /**
+        * All customer
+        * <p>
+        * @return A list of all customer profiles
+        */
+       List<Customer> allCustomers ();
+
+       /**
+        * Checks whether customers are registered
+        * <p>
+        * @return Whether customers are registered
+        */
+       boolean hasCustomers ();
+
+}
index 284858a4f58f4dc0b0dea57686cca8f984e7e0a7..6d538c2327436ccd955d313f0a883352898006bd 100644 (file)
@@ -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 (file)
index 0000000..3541725
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.profile;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A bean interface for user profiles
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface PizzaUserProfileWebRequestController extends Serializable {
+
+       /**
+        * Checks if the user profile link is visible
+        * <p>
+        * @param userId User id
+        * <p>
+        * @return Whether the profile link is visible
+        */
+       boolean isProfileLinkVisibleById (final Long userId);
+
+       /**
+        * Checks if given user's profile is visible
+        * <p>
+        * @param user User instance to check
+        * <p>
+        * @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 (file)
index 0000000..e576dca
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.profilemode;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
+
+/**
+ * An interface for data beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface PizzaProfileModeWebApplicationController extends Serializable {
+
+       /**
+        * Getter for all genders as array
+        * <p>
+        * @return All genders as array
+        */
+       ProfileMode[] getAllProfileModes ();
+
+}
index ec2786a48e902759dc6970d557a267d0e9b75c25..6f98b9c61b65da8ff9d22d24a5172249c0a1e6a4 100644 (file)
@@ -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;