+++ /dev/null
-/*
- * 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();
- }
-
-}
+++ /dev/null
-/*
- * 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 ();
-
-}
--- /dev/null
+/*
+ * 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();
+ }
+
+}
--- /dev/null
+/*
+ * 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 ();
+
+}
*/
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;
--- /dev/null
+/*
+ * 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);
+
+}
--- /dev/null
+/*
+ * 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 ();
+
+}
*/
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;