]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 18:53:28 +0000 (20:53 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 20:30:08 +0000 (22:30 +0200)
- added administrative and general backing bean for company employees + added
  JNDI lookup, still at wrong place
- Employees have an instance back to business basic data which makes it
  impossible for creation (no fancy AJAX stuff now) of business basic data
  with founder and/or contact person
- separated package of businessdata to business/basicdata so above
  business/company_employee package is nicely possible

Signed-off-by: Roland Häder <roland@mxchange.org>
13 files changed:
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebSessionController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaAdminBusinessDataWebSessionBean.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaAdminBusinessDataWebSessionController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaBusinessDataWebSessionBean.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaBusinessDataWebSessionController.java [deleted file]
web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl

diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java
new file mode 100644 (file)
index 0000000..95f9b84
--- /dev/null
@@ -0,0 +1,400 @@
+/*
+ * 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.business.basicdata;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+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.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.employee.Employee;
+import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jcountry.data.Country;
+import org.mxchange.jusercore.model.user.User;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
+
+/**
+ * An administrative business contact bean (controller)
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("adminBusinessDataController")
+@SessionScoped
+public class PizzaAdminBusinessDataWebRequestBean extends BasePizzaController implements PizzaAdminBusinessDataWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 56_189_028_928_374L;
+
+       /**
+        * Remote contact bean
+        */
+       private AdminBusinessDataSessionBeanRemote adminBusinessDataBean;
+
+       /**
+        * Comments for this company
+        */
+       private String companyComments;
+
+       /**
+        * An employee as contact person with this company
+        */
+       private Employee companyContactEmployee;
+
+       /**
+        * Companies (main) email address (example: info@company.example)
+        */
+       private String companyEmailAddress;
+
+       /**
+        * Head quarter data for this company
+        */
+       private HeadQuartersData companyHeadQuarters;
+
+       /**
+        * Company name
+        */
+       private String companyName;
+
+       /**
+        * Tax number
+        */
+       private String companyTaxNumber;
+
+       /**
+        * Web site URL
+        */
+       private String companyWebsiteUrl;
+
+       /**
+        * Owning user instance (which this company is assigned to)
+        */
+       private User contactCompanyUserOwner;
+
+       /**
+        * Area code for fax number
+        */
+       private Integer faxAreaCode;
+
+       /**
+        * Country for fax number
+        */
+       private Country faxCountry;
+
+       /**
+        * Dial number for fax number
+        */
+       private Long faxNumber;
+
+       /**
+        * Area code for land-line number
+        */
+       private Integer landLineAreaCode;
+
+       /**
+        * Country for land-line number
+        */
+       private Country landLineCountry;
+
+       /**
+        * Dial number for land-line number
+        */
+       private Long landLineNumber;
+
+       /**
+        * Constructor
+        */
+       public PizzaAdminBusinessDataWebRequestBean () {
+               // Call super constructor
+               super();
+       }
+
+       /**
+        * Getter for comments
+        * <p>
+        * @return Comments
+        */
+       public String getCompanyComments () {
+               return this.companyComments;
+       }
+
+       /**
+        * Setter for comments
+        * <p>
+        * @param companyComments Comments
+        */
+       public void setCompanyComments (final String companyComments) {
+               this.companyComments = companyComments;
+       }
+
+       /**
+        * Getter for employee as contact person
+        * <p>
+        * @return Employee as contact person
+        */
+       public Employee getCompanyContactEmployee () {
+               return this.companyContactEmployee;
+       }
+
+       /**
+        * Setter for employee as contact person
+        * <p>
+        * @param companyContactEmployee Employee as contact person
+        */
+       public void setCompanyContactEmployee (final Employee companyContactEmployee) {
+               this.companyContactEmployee = companyContactEmployee;
+       }
+
+       /**
+        * Getter for company's (main) email address
+        * <p>
+        * @return Company's (main) email address
+        */
+       public String getCompanyEmailAddress () {
+               return this.companyEmailAddress;
+       }
+
+       /**
+        * Setter for company's (main) email address
+        * <p>
+        * @param companyEmailAddress Company's (main) email address
+        */
+       public void setCompanyEmailAddress (final String companyEmailAddress) {
+               this.companyEmailAddress = companyEmailAddress;
+       }
+
+       /**
+        * Getter for headquarters data
+        * <p>
+        * @return Headquarters data
+        */
+       public HeadQuartersData getCompanyHeadQuarters () {
+               return this.companyHeadQuarters;
+       }
+
+       /**
+        * Setter for headquarters data
+        * <p>
+        * @param companyHeadQuarters Headquarters data
+        */
+       public void setCompanyHeadQuarters (final HeadQuartersData companyHeadQuarters) {
+               this.companyHeadQuarters = companyHeadQuarters;
+       }
+
+       /**
+        * Getter for company name
+        * <p>
+        * @return Company name
+        */
+       public String getCompanyName () {
+               return this.companyName;
+       }
+
+       /**
+        * Setter for company name
+        * <p>
+        * @param companyName Company name
+        */
+       public void setCompanyName (final String companyName) {
+               this.companyName = companyName;
+       }
+
+       /**
+        * Getter for company tax number
+        * <p>
+        * @return Company tax number
+        */
+       public String getCompanyTaxNumber () {
+               return this.companyTaxNumber;
+       }
+
+       /**
+        * Setter for company tax number
+        * <p>
+        * @param companyTaxNumber Company tax number
+        */
+       public void setCompanyTaxNumber (final String companyTaxNumber) {
+               this.companyTaxNumber = companyTaxNumber;
+       }
+
+       /**
+        * Getter for company web site URL
+        * <p>
+        * @return Company web site URL
+        */
+       public String getCompanyWebsiteUrl () {
+               return this.companyWebsiteUrl;
+       }
+
+       /**
+        * Getter for company web site URL
+        * <p>
+        * @param companyWebsiteUrl Company web site URL
+        */
+       public void setCompanyWebsiteUrl (final String companyWebsiteUrl) {
+               this.companyWebsiteUrl = companyWebsiteUrl;
+       }
+
+       /**
+        * Getter for owning user instance
+        * <p>
+        * @return Owning user instance
+        */
+       public User getContactCompanyUserOwner () {
+               return this.contactCompanyUserOwner;
+       }
+
+       /**
+        * Setter for owning user instance
+        * <p>
+        * @param contactCompanyUserOwner Owning user instance
+        */
+       public void setContactCompanyUserOwner (final User contactCompanyUserOwner) {
+               this.contactCompanyUserOwner = contactCompanyUserOwner;
+       }
+
+       /**
+        * Getter for fax number's area code
+        * <p>
+        * @return Fax number's area code
+        */
+       public Integer getFaxAreaCode () {
+               return this.faxAreaCode;
+       }
+
+       /**
+        * Setter for fax number's area code
+        * <p>
+        * @param faxAreaCode Fax number's area code
+        */
+       public void setFaxAreaCode (final Integer faxAreaCode) {
+               this.faxAreaCode = faxAreaCode;
+       }
+
+       /**
+        * Getter for fax's country instance
+        * <p>
+        * @return Fax' country instance
+        */
+       public Country getFaxCountry () {
+               return this.faxCountry;
+       }
+
+       /**
+        * Setter for fax's country instance
+        * <p>
+        * @param faxCountry Fax' country instance
+        */
+       public void setFaxCountry (final Country faxCountry) {
+               this.faxCountry = faxCountry;
+       }
+
+       /**
+        * Getter for fax number
+        * <p>
+        * @return Fax number
+        */
+       public Long getFaxNumber () {
+               return this.faxNumber;
+       }
+
+       /**
+        * Setter for fax number
+        * <p>
+        * @param faxNumber Fax number
+        */
+       public void setFaxNumber (final Long faxNumber) {
+               this.faxNumber = faxNumber;
+       }
+
+       /**
+        * Getter for land-line number's area code
+        * <p>
+        * @return Land-line number's area code
+        */
+       public Integer getLandLineAreaCode () {
+               return this.landLineAreaCode;
+       }
+
+       /**
+        * Setter for land-line number's area code
+        * <p>
+        * @param landLineAreaCode Land-line number's area code
+        */
+       public void setLandLineAreaCode (final Integer landLineAreaCode) {
+               this.landLineAreaCode = landLineAreaCode;
+       }
+
+       /**
+        * Getter for land-line number's country instance
+        * <p>
+        * @return Land-line number's country instance
+        */
+       public Country getLandLineCountry () {
+               return this.landLineCountry;
+       }
+
+       /**
+        * Setter for land-line number's country instance
+        * <p>
+        * @param landLineCountry Land-line number's country instance
+        */
+       public void setLandLineCountry (final Country landLineCountry) {
+               this.landLineCountry = landLineCountry;
+       }
+
+       /**
+        * Getter for land-line number
+        * <p>
+        * @return Land-line number
+        */
+       public Long getLandLineNumber () {
+               return this.landLineNumber;
+       }
+
+       /**
+        * Setter for land-line number
+        * <p>
+        * @param landLineNumber Land-line number
+        */
+       public void setLandLineNumber (final Long landLineNumber) {
+               this.landLineNumber = landLineNumber;
+       }
+
+       /**
+        * Post-initialization of this class
+        */
+       @PostConstruct
+       public void init () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestController.java
new file mode 100644 (file)
index 0000000..7b2e814
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 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.business.basicdata;
+
+import java.io.Serializable;
+
+/**
+ * An interface for session-scoped financial controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface PizzaAdminBusinessDataWebRequestController extends Serializable {
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java
new file mode 100644 (file)
index 0000000..cb060dd
--- /dev/null
@@ -0,0 +1,315 @@
+/*
+ * 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.business.basicdata;
+
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
+import org.mxchange.jcountry.data.Country;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
+
+/**
+ * A business contact bean (controller)
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("businessDataController")
+@SessionScoped
+public class PizzaBusinessDataWebSessionBean extends BasePizzaController implements PizzaBusinessDataWebSessionController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 56_189_028_928_371L;
+
+       /**
+        * Remote contact bean
+        */
+       private AdminBusinessDataSessionBeanRemote adminBusinessDataBean;
+
+       /**
+        * A list of all registered companies (globally)
+        */
+       private List<BusinessBasicData> businessContacts;
+
+       /**
+        * Remote contact bean
+        */
+       private BusinessDataSessionBeanRemote businessDataBean;
+
+       /**
+        * Comments for this company
+        */
+       private String companyComments;
+
+       /**
+        * Companies (main) email address (example: info@company.example)
+        */
+       private String companyEmailAddress;
+
+       /**
+        * Company name
+        */
+       private String companyName;
+
+       /**
+        * Area code for fax number
+        */
+       private Integer faxAreaCode;
+
+       /**
+        * Country for fax number
+        */
+       private Country faxCountry;
+
+       /**
+        * Dial number for fax number
+        */
+       private Long faxNumber;
+
+       /**
+        * Area code for land-line number
+        */
+       private Integer landLineAreaCode;
+
+       /**
+        * Country for land-line number
+        */
+       private Country landLineCountry;
+
+       /**
+        * Dial number for land-line number
+        */
+       private Long landLineNumber;
+
+       /**
+        * User instance
+        */
+       @Inject
+       private PizzaUserLoginWebSessionController userLoginController;
+
+       /**
+        * Constructor
+        */
+       public PizzaBusinessDataWebSessionBean () {
+               // Call super constructor
+               super();
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<BusinessBasicData> allBusinessContacts () {
+               return this.businessContacts;
+       }
+
+       /**
+        * Getter for comments
+        * <p>
+        * @return Comments
+        */
+       public String getCompanyComments () {
+               return this.companyComments;
+       }
+
+       /**
+        * Setter for comments
+        * <p>
+        * @param companyComments Comments
+        */
+       public void setCompanyComments (final String companyComments) {
+               this.companyComments = companyComments;
+       }
+
+       /**
+        * Getter for company's (main) email address
+        * <p>
+        * @return Company's (main) email address
+        */
+       public String getCompanyEmailAddress () {
+               return this.companyEmailAddress;
+       }
+
+       /**
+        * Setter for company's (main) email address
+        * <p>
+        * @param companyEmailAddress Company's (main) email address
+        */
+       public void setCompanyEmailAddress (final String companyEmailAddress) {
+               this.companyEmailAddress = companyEmailAddress;
+       }
+
+       /**
+        * Getter for company name
+        * <p>
+        * @return Company name
+        */
+       public String getCompanyName () {
+               return this.companyName;
+       }
+
+       /**
+        * Setter for company name
+        * <p>
+        * @param companyName Company name
+        */
+       public void setCompanyName (final String companyName) {
+               this.companyName = companyName;
+       }
+
+       /**
+        * Getter for fax number's area code
+        * <p>
+        * @return Fax number's area code
+        */
+       public Integer getFaxAreaCode () {
+               return this.faxAreaCode;
+       }
+
+       /**
+        * Setter for fax number's area code
+        * <p>
+        * @param faxAreaCode Fax number's area code
+        */
+       public void setFaxAreaCode (final Integer faxAreaCode) {
+               this.faxAreaCode = faxAreaCode;
+       }
+
+       /**
+        * Getter for fax's country instance
+        * <p>
+        * @return Fax' country instance
+        */
+       public Country getFaxCountry () {
+               return this.faxCountry;
+       }
+
+       /**
+        * Setter for fax's country instance
+        * <p>
+        * @param faxCountry Fax' country instance
+        */
+       public void setFaxCountry (final Country faxCountry) {
+               this.faxCountry = faxCountry;
+       }
+
+       /**
+        * Getter for fax number
+        * <p>
+        * @return Fax number
+        */
+       public Long getFaxNumber () {
+               return this.faxNumber;
+       }
+
+       /**
+        * Setter for fax number
+        * <p>
+        * @param faxNumber Fax number
+        */
+       public void setFaxNumber (final Long faxNumber) {
+               this.faxNumber = faxNumber;
+       }
+
+       /**
+        * Getter for land-line number's area code
+        * <p>
+        * @return Land-line number's area code
+        */
+       public Integer getLandLineAreaCode () {
+               return this.landLineAreaCode;
+       }
+
+       /**
+        * Setter for land-line number's area code
+        * <p>
+        * @param landLineAreaCode Land-line number's area code
+        */
+       public void setLandLineAreaCode (final Integer landLineAreaCode) {
+               this.landLineAreaCode = landLineAreaCode;
+       }
+
+       /**
+        * Getter for land-line number's country instance
+        * <p>
+        * @return Land-line number's country instance
+        */
+       public Country getLandLineCountry () {
+               return this.landLineCountry;
+       }
+
+       /**
+        * Setter for land-line number's country instance
+        * <p>
+        * @param landLineCountry Land-line number's country instance
+        */
+       public void setLandLineCountry (final Country landLineCountry) {
+               this.landLineCountry = landLineCountry;
+       }
+
+       /**
+        * Getter for land-line number
+        * <p>
+        * @return Land-line number
+        */
+       public Long getLandLineNumber () {
+               return this.landLineNumber;
+       }
+
+       /**
+        * Setter for land-line number
+        * <p>
+        * @param landLineNumber Land-line number
+        */
+       public void setLandLineNumber (final Long landLineNumber) {
+               this.landLineNumber = landLineNumber;
+       }
+
+       /**
+        * Post-initialization of this class
+        */
+       @PostConstruct
+       public void init () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.businessDataBean = (BusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N
+
+                       // Try to lookup
+                       this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+
+               // Init user's contact list
+               this.businessContacts = this.adminBusinessDataBean.allBusinessContacts();
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionController.java
new file mode 100644 (file)
index 0000000..8d38ab7
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 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.business.basicdata;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
+
+/**
+ * An interface for session-scoped financial controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface PizzaBusinessDataWebSessionController extends Serializable {
+
+       /**
+        * Returns a list of all business contacts
+        * <p>
+        * @return A list of all business contacts
+        */
+       List<BusinessBasicData> allBusinessContacts ();
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java
new file mode 100644 (file)
index 0000000..8ca9eb0
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2017 RRoland 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.business.employee;
+
+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.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
+
+/**
+ * A request-scoped bean for administrative purposes for company employees.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("adminCompanyEmployeeController")
+@RequestScoped
+public class PizzaAdminCompanyEmployeeWebRequestBean extends BasePizzaController implements PizzaAdminCompanyEmployeeWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 12_886_968_547_360L;
+
+       /**
+        * EJB for administrative company employee purposes
+        */
+       private AdminCompanyEmployeeSessionBeanRemote adminCompanyEmployeeBean;
+
+       /**
+        * Default constructor
+        */
+       public PizzaAdminCompanyEmployeeWebRequestBean () {
+               // Call super constructor
+               super();
+       }
+
+       /**
+        * Initialization method
+        */
+       @PostConstruct
+       public void init () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.adminCompanyEmployeeBean = (AdminCompanyEmployeeSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestController.java
new file mode 100644 (file)
index 0000000..5733208
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 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.business.employee;
+
+import java.io.Serializable;
+
+/**
+ * An interface for request-scoped administrative company employee beans
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface PizzaAdminCompanyEmployeeWebRequestController extends Serializable {
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java
new file mode 100644 (file)
index 0000000..82c5adf
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2017 RRoland 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.business.employee;
+
+import java.util.LinkedList;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+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.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.employee.Employee;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
+
+/**
+ * A request-scoped bean for general purposes for company employees.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("companyEmployeeController")
+@SessionScoped
+public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaController implements PizzaCompanyEmployeeWebSessionController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 12_886_968_547_361L;
+
+       /**
+        * EJB for general company employee purposes
+        */
+       private CompanyEmployeeSessionBeanRemote companyEmployeeBean;
+
+       /**
+        * List of all company employees
+        */
+       private final List<Employee> companyEmployees;
+
+       /**
+        * Default constructor
+        */
+       public PizzaCompanyEmployeeWebRequestBean () {
+               // Call super constructor
+               super();
+
+               // Init list instance
+               this.companyEmployees = new LinkedList<>();
+       }
+
+       /**
+        * Returns a list of all company employees
+        * <p>
+        * @return List of all company employees
+        */
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<Employee> allCompanyEmployees () {
+               return this.companyEmployees;
+       }
+
+       /**
+        * Initialization method
+        */
+       @PostConstruct
+       public void init () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.companyEmployeeBean = (CompanyEmployeeSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+
+               // Get all entries from remote bean
+               List<Employee> employees = this.companyEmployeeBean.allCompanyEmployees();
+
+               // Copy it to main list
+               this.companyEmployees.addAll(employees);
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebSessionController.java
new file mode 100644 (file)
index 0000000..cf39402
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 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.business.employee;
+
+import java.io.Serializable;
+
+/**
+ * An interface for request-scoped general company employee beans
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface PizzaCompanyEmployeeWebSessionController extends Serializable {
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaAdminBusinessDataWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaAdminBusinessDataWebSessionBean.java
deleted file mode 100644 (file)
index 95c9b6f..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * 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.businessdata;
-
-import java.util.List;
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
-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.jcontactsbusiness.basicdata.BusinessBasicData;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
-import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote;
-
-/**
- * An administrative business contact bean (controller)
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("adminBusinessDataController")
-@SessionScoped
-public class PizzaAdminBusinessDataWebSessionBean extends BasePizzaController implements PizzaAdminBusinessDataWebSessionController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 56_189_028_928_374L;
-
-       /**
-        * Remote contact bean
-        */
-       private AdminBusinessDataSessionBeanRemote adminBusinessDataBean;
-
-       /**
-        * A list of all registered companies (globally)
-        */
-       private List<BusinessBasicData> businessContacts;
-
-       /**
-        * Comments for this company
-        */
-       private String companyComments;
-
-       /**
-        * Companies (main) email address (example: info@company.example)
-        */
-       private String companyEmailAddress;
-
-       /**
-        * Company name
-        */
-       private String companyName;
-
-       /**
-        * Area code for fax number
-        */
-       private Integer faxAreaCode;
-
-       /**
-        * Country for fax number
-        */
-       private Country faxCountry;
-
-       /**
-        * Dial number for fax number
-        */
-       private Long faxNumber;
-
-       /**
-        * Area code for land-line number
-        */
-       private Integer landLineAreaCode;
-
-       /**
-        * Country for land-line number
-        */
-       private Country landLineCountry;
-
-       /**
-        * Dial number for land-line number
-        */
-       private Long landLineNumber;
-
-       /**
-        * Constructor
-        */
-       public PizzaAdminBusinessDataWebSessionBean () {
-               // Call super constructor
-               super();
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<BusinessBasicData> allBusinessContacts () {
-               return this.businessContacts;
-       }
-
-       /**
-        * Getter for comments
-        * <p>
-        * @return Comments
-        */
-       public String getCompanyComments () {
-               return this.companyComments;
-       }
-
-       /**
-        * Setter for comments
-        * <p>
-        * @param companyComments Comments
-        */
-       public void setCompanyComments (final String companyComments) {
-               this.companyComments = companyComments;
-       }
-
-       /**
-        * Getter for company's (main) email address
-        * <p>
-        * @return Company's (main) email address
-        */
-       public String getCompanyEmailAddress () {
-               return this.companyEmailAddress;
-       }
-
-       /**
-        * Setter for company's (main) email address
-        * <p>
-        * @param companyEmailAddress Company's (main) email address
-        */
-       public void setCompanyEmailAddress (final String companyEmailAddress) {
-               this.companyEmailAddress = companyEmailAddress;
-       }
-
-       /**
-        * Getter for company name
-        * <p>
-        * @return Company name
-        */
-       public String getCompanyName () {
-               return this.companyName;
-       }
-
-       /**
-        * Setter for company name
-        * <p>
-        * @param companyName Company name
-        */
-       public void setCompanyName (final String companyName) {
-               this.companyName = companyName;
-       }
-
-       /**
-        * Getter for fax number's area code
-        * <p>
-        * @return Fax number's area code
-        */
-       public Integer getFaxAreaCode () {
-               return this.faxAreaCode;
-       }
-
-       /**
-        * Setter for fax number's area code
-        * <p>
-        * @param faxAreaCode Fax number's area code
-        */
-       public void setFaxAreaCode (final Integer faxAreaCode) {
-               this.faxAreaCode = faxAreaCode;
-       }
-
-       /**
-        * Getter for fax's country instance
-        * <p>
-        * @return Fax' country instance
-        */
-       public Country getFaxCountry () {
-               return this.faxCountry;
-       }
-
-       /**
-        * Setter for fax's country instance
-        * <p>
-        * @param faxCountry Fax' country instance
-        */
-       public void setFaxCountry (final Country faxCountry) {
-               this.faxCountry = faxCountry;
-       }
-
-       /**
-        * Getter for fax number
-        * <p>
-        * @return Fax number
-        */
-       public Long getFaxNumber () {
-               return this.faxNumber;
-       }
-
-       /**
-        * Setter for fax number
-        * <p>
-        * @param faxNumber Fax number
-        */
-       public void setFaxNumber (final Long faxNumber) {
-               this.faxNumber = faxNumber;
-       }
-
-       /**
-        * Getter for land-line number's area code
-        * <p>
-        * @return Land-line number's area code
-        */
-       public Integer getLandLineAreaCode () {
-               return this.landLineAreaCode;
-       }
-
-       /**
-        * Setter for land-line number's area code
-        * <p>
-        * @param landLineAreaCode Land-line number's area code
-        */
-       public void setLandLineAreaCode (final Integer landLineAreaCode) {
-               this.landLineAreaCode = landLineAreaCode;
-       }
-
-       /**
-        * Getter for land-line number's country instance
-        * <p>
-        * @return Land-line number's country instance
-        */
-       public Country getLandLineCountry () {
-               return this.landLineCountry;
-       }
-
-       /**
-        * Setter for land-line number's country instance
-        * <p>
-        * @param landLineCountry Land-line number's country instance
-        */
-       public void setLandLineCountry (final Country landLineCountry) {
-               this.landLineCountry = landLineCountry;
-       }
-
-       /**
-        * Getter for land-line number
-        * <p>
-        * @return Land-line number
-        */
-       public Long getLandLineNumber () {
-               return this.landLineNumber;
-       }
-
-       /**
-        * Setter for land-line number
-        * <p>
-        * @param landLineNumber Land-line number
-        */
-       public void setLandLineNumber (final Long landLineNumber) {
-               this.landLineNumber = landLineNumber;
-       }
-
-       /**
-        * Post-initialization of this class
-        */
-       @PostConstruct
-       public void init () {
-               // Try it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup
-                       this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/pizzaapplication-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N
-               } catch (final NamingException e) {
-                       // Throw again
-                       throw new FaceletException(e);
-               }
-
-               // Init user's contact list
-               this.businessContacts = this.adminBusinessDataBean.allBusinessContacts();
-       }
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaAdminBusinessDataWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaAdminBusinessDataWebSessionController.java
deleted file mode 100644 (file)
index 6ace790..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 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.businessdata;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
-
-/**
- * An interface for session-scoped financial controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface PizzaAdminBusinessDataWebSessionController extends Serializable {
-
-       /**
-        * Returns a list of all business contacts
-        * <p>
-        * @return A list of all business contacts
-        */
-       List<BusinessBasicData> allBusinessContacts ();
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaBusinessDataWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaBusinessDataWebSessionBean.java
deleted file mode 100644 (file)
index c6dae5d..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * 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.businessdata;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
-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.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.employee.Employee;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
-
-/**
- * A business contact bean (controller)
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("businessDataController")
-@SessionScoped
-public class PizzaBusinessDataWebSessionBean extends BasePizzaController implements PizzaBusinessDataWebSessionController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 56_189_028_928_371L;
-
-       /**
-        * Remote contact bean
-        */
-       private BusinessDataSessionBeanRemote businessDataBean;
-
-       /**
-        * Comments for this company
-        */
-       private String companyComments;
-
-       /**
-        * An employee as contact person with this company
-        */
-       private Employee companyContactEmployee;
-
-       /**
-        * Companies (main) email address (example: info@company.example)
-        */
-       private String companyEmailAddress;
-
-       /**
-        * Company name
-        */
-       private String companyName;
-
-       /**
-        * Area code for fax number
-        */
-       private Integer faxAreaCode;
-
-       /**
-        * Country for fax number
-        */
-       private Country faxCountry;
-
-       /**
-        * Dial number for fax number
-        */
-       private Long faxNumber;
-
-       /**
-        * Area code for land-line number
-        */
-       private Integer landLineAreaCode;
-
-       /**
-        * Country for land-line number
-        */
-       private Country landLineCountry;
-
-       /**
-        * Dial number for land-line number
-        */
-       private Long landLineNumber;
-
-       /**
-        * Constructor
-        */
-       public PizzaBusinessDataWebSessionBean () {
-               // Call super constructor
-               super();
-       }
-
-       /**
-        * Getter for comments
-        * <p>
-        * @return Comments
-        */
-       public String getCompanyComments () {
-               return this.companyComments;
-       }
-
-       /**
-        * Setter for comments
-        * <p>
-        * @param companyComments Comments
-        */
-       public void setCompanyComments (final String companyComments) {
-               this.companyComments = companyComments;
-       }
-
-       /**
-        * Getter for employee as contact person
-        * <p>
-        * @return Employee as contact person
-        */
-       public Employee getCompanyContactEmployee () {
-               return this.companyContactEmployee;
-       }
-
-       /**
-        * Setter for employee as contact person
-        * <p>
-        * @param companyContactEmployee Employee as contact person
-        */
-       public void setCompanyContactEmployee (final Employee companyContactEmployee) {
-               this.companyContactEmployee = companyContactEmployee;
-       }
-
-       /**
-        * Getter for company's (main) email address
-        * <p>
-        * @return Company's (main) email address
-        */
-       public String getCompanyEmailAddress () {
-               return this.companyEmailAddress;
-       }
-
-       /**
-        * Setter for company's (main) email address
-        * <p>
-        * @param companyEmailAddress Company's (main) email address
-        */
-       public void setCompanyEmailAddress (final String companyEmailAddress) {
-               this.companyEmailAddress = companyEmailAddress;
-       }
-
-       /**
-        * Getter for company name
-        * <p>
-        * @return Company name
-        */
-       public String getCompanyName () {
-               return this.companyName;
-       }
-
-       /**
-        * Setter for company name
-        * <p>
-        * @param companyName Company name
-        */
-       public void setCompanyName (final String companyName) {
-               this.companyName = companyName;
-       }
-
-       /**
-        * Getter for fax number's area code
-        * <p>
-        * @return Fax number's area code
-        */
-       public Integer getFaxAreaCode () {
-               return this.faxAreaCode;
-       }
-
-       /**
-        * Setter for fax number's area code
-        * <p>
-        * @param faxAreaCode Fax number's area code
-        */
-       public void setFaxAreaCode (final Integer faxAreaCode) {
-               this.faxAreaCode = faxAreaCode;
-       }
-
-       /**
-        * Getter for fax's country instance
-        * <p>
-        * @return Fax' country instance
-        */
-       public Country getFaxCountry () {
-               return this.faxCountry;
-       }
-
-       /**
-        * Setter for fax's country instance
-        * <p>
-        * @param faxCountry Fax' country instance
-        */
-       public void setFaxCountry (final Country faxCountry) {
-               this.faxCountry = faxCountry;
-       }
-
-       /**
-        * Getter for fax number
-        * <p>
-        * @return Fax number
-        */
-       public Long getFaxNumber () {
-               return this.faxNumber;
-       }
-
-       /**
-        * Setter for fax number
-        * <p>
-        * @param faxNumber Fax number
-        */
-       public void setFaxNumber (final Long faxNumber) {
-               this.faxNumber = faxNumber;
-       }
-
-       /**
-        * Getter for land-line number's area code
-        * <p>
-        * @return Land-line number's area code
-        */
-       public Integer getLandLineAreaCode () {
-               return this.landLineAreaCode;
-       }
-
-       /**
-        * Setter for land-line number's area code
-        * <p>
-        * @param landLineAreaCode Land-line number's area code
-        */
-       public void setLandLineAreaCode (final Integer landLineAreaCode) {
-               this.landLineAreaCode = landLineAreaCode;
-       }
-
-       /**
-        * Getter for land-line number's country instance
-        * <p>
-        * @return Land-line number's country instance
-        */
-       public Country getLandLineCountry () {
-               return this.landLineCountry;
-       }
-
-       /**
-        * Setter for land-line number's country instance
-        * <p>
-        * @param landLineCountry Land-line number's country instance
-        */
-       public void setLandLineCountry (final Country landLineCountry) {
-               this.landLineCountry = landLineCountry;
-       }
-
-       /**
-        * Getter for land-line number
-        * <p>
-        * @return Land-line number
-        */
-       public Long getLandLineNumber () {
-               return this.landLineNumber;
-       }
-
-       /**
-        * Setter for land-line number
-        * <p>
-        * @param landLineNumber Land-line number
-        */
-       public void setLandLineNumber (final Long landLineNumber) {
-               this.landLineNumber = landLineNumber;
-       }
-
-       /**
-        * Post-initialization of this class
-        */
-       @PostConstruct
-       public void init () {
-               // Try it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup
-                       this.businessDataBean = (BusinessDataSessionBeanRemote) context.lookup("java:global/pizzaapplication-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N
-               } catch (final NamingException e) {
-                       // Throw again
-                       throw new FaceletException(e);
-               }
-       }
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaBusinessDataWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/businessdata/PizzaBusinessDataWebSessionController.java
deleted file mode 100644 (file)
index eade489..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 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.businessdata;
-
-import java.io.Serializable;
-
-/**
- * An interface for session-scoped financial controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface PizzaBusinessDataWebSessionController extends Serializable {
-
-}
index 0daf0e550ce49ba47dceaf95a8ce145cef59b3e8..23ea3bbd5a25ad6295a9197dce9418f42e631747 100644 (file)
                                <h:message for="companyEmailAddress" errorClass="errors" warnClass="warnings" fatalClass="errors" />
                        </h:panelGroup>
 
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="companyContactEmployee" value="#{msg.ADMIN_SELECT_BUSINESS_DATA_COMPANY_CONTACT_EMPLOYEE}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select" id="companyContactEmployee" value="#{adminBusinessDataController.companyContactEmployee}">
-                                               <f:converter converterId="CompanyEmployeeConverter" />
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{adminCompanyEmployeeController.allCompanyEmployees()}" var="companyEmployee" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo})" />
-                                       </h:selectOneMenu>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="error_container" layout="block">
-                               <h:message for="companyContactEmployee" errorClass="errors" warnClass="warnings" fatalClass="errors" />
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="companyFounder" value="#{msg.ADMIN_SELECT_BUSINESS_DATA_COMPANY_FOUNDER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select" id="companyFounder" value="#{adminBusinessDataController.companyFounder}">
-                                               <f:converter converterId="CompanyEmployeeConverter" />
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{adminCompanyEmployeeController.allCompanyEmployees()}" var="companyEmployee" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo})" />
-                                       </h:selectOneMenu>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="error_container" layout="block">
-                               <h:message for="companyFounder" errorClass="errors" warnClass="warnings" fatalClass="errors" />
-                       </h:panelGroup>
-
                        <h:panelGroup styleClass="table_row" layout="block">
                                <div class="table_left_medium">
                                        <h:outputLabel for="companyLogo" value="#{msg.ADMIN_SELECT_BUSINESS_DATA_COMPANY_FOUNDER}" />
                                        <h:selectOneMenu styleClass="select" id="contactCompanyUserOwner" value="#{adminBusinessDataController.contactCompanyUserOwner}">
                                                <f:converter converterId="UserConverter" />
                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{userController.allUsers()}" var="companyUserOwner" itemValue="#{companyUserOwner}" itemLabel="#{companyUserOwner.foo})" />
+                                               <f:selectItems value="#{userController.allUsers()}" var="companyUserOwner" itemValue="#{companyUserOwner}" itemLabel="#{companyUserOwner.userContact.contactFirstName} #{companyUserOwner.userContact.contactFamilyName} (#{companyUserOwner.userName})" />
                                        </h:selectOneMenu>
                                </div>
 
                                        <h:selectOneMenu styleClass="select" id="companyHeadQuarters" value="#{adminBusinessDataController.companyHeadQuarters}">
                                                <f:converter converterId="CompanyEmployeeConverter" />
                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{adminCompanyHeadquartersController.allCompanyHeadquarters()}" var="companyHeadQuarters" itemValue="#{companyHeadQuarters}" itemLabel="#{companyHeadQuarters.foo})" />
+                                               <f:selectItems value="#{companyHeadquartersController.allCompanyHeadquarters()}" var="companyHeadQuarters" itemValue="#{companyHeadQuarters}" itemLabel="#{companyHeadQuarters.foo}" />
                                        </h:selectOneMenu>
                                </div>