]> git.mxchange.org Git - addressbook-war.git/commitdiff
Fixed JNDI names + moved converter to proper packages
authorRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 20:34:30 +0000 (22:34 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 20:35:57 +0000 (22:35 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
19 files changed:
src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionController.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/business/employee/AddressbookAdminCompanyEmployeeWebRequestBean.java
src/java/org/mxchange/addressbook/beans/business/employee/AddressbookCompanyEmployeeWebRequestBean.java
src/java/org/mxchange/addressbook/beans/businessdata/AddressbookAdminBusinessDataWebRequestBean.java [deleted file]
src/java/org/mxchange/addressbook/beans/businessdata/AddressbookAdminBusinessDataWebRequestController.java [deleted file]
src/java/org/mxchange/addressbook/beans/businessdata/AddressbookBusinessDataWebSessionBean.java [deleted file]
src/java/org/mxchange/addressbook/beans/businessdata/AddressbookBusinessDataWebSessionController.java [deleted file]
src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/activity/AddressbookUserActivityWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/user/confirmlink/AddressbookConfirmationLinkWebRequestBean.java
src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/converter/businesscontact/AddressbookBusinessContactConverter.java [deleted file]
src/java/org/mxchange/addressbook/converter/company_employee/AddressbookCompanyEmployeeConverter.java [deleted file]

diff --git a/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java
new file mode 100644 (file)
index 0000000..94c3148
--- /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.addressbook.beans.business.basicdata;
+
+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.addressbook.beans.BaseAddressbookController;
+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;
+
+/**
+ * An administrative business contact bean (controller)
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("adminBusinessDataController")
+@RequestScoped
+public class AddressbookAdminBusinessDataWebRequestBean extends BaseAddressbookController implements AddressbookAdminBusinessDataWebRequestController {
+
+       /**
+        * 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 AddressbookAdminBusinessDataWebRequestBean () {
+               // 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/addressbook-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/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestController.java b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestController.java
new file mode 100644 (file)
index 0000000..3e0dccb
--- /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.addressbook.beans.business.basicdata;
+
+import java.io.Serializable;
+
+/**
+ * An interface for session-scoped financial controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface AddressbookAdminBusinessDataWebRequestController extends Serializable {
+
+}
diff --git a/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java
new file mode 100644 (file)
index 0000000..d817be1
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * 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.addressbook.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.addressbook.beans.BaseAddressbookController;
+import org.mxchange.addressbook.beans.user.login.AddressbookUserLoginWebSessionController;
+import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
+import org.mxchange.jcountry.data.Country;
+
+/**
+ * A business contact bean (controller)
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("businessDataController")
+@SessionScoped
+public class AddressbookBusinessDataWebSessionBean extends BaseAddressbookController implements AddressbookBusinessDataWebSessionController {
+
+       /**
+        * 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 AddressbookUserLoginWebSessionController userLoginController;
+
+       /**
+        * Constructor
+        */
+       public AddressbookBusinessDataWebSessionBean () {
+               // Call super constructor
+               super();
+       }
+
+
+       /**
+        * Returns a list of all business contacts
+        * <p>
+        * @return A list of all business contacts
+        */
+       @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/addressbook-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N
+
+                       // Try to lookup
+                       this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/addressbook-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/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionController.java b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionController.java
new file mode 100644 (file)
index 0000000..ca46bea
--- /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.addressbook.beans.business.basicdata;
+
+import java.io.Serializable;
+
+/**
+ * An interface for session-scoped financial controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface AddressbookBusinessDataWebSessionController extends Serializable {
+
+}
index 87f527265b4a8fb17c96d7cf264c61ac65a3aed3..250859f1026a87c3171ac77b17a35571224655df 100644 (file)
@@ -64,7 +64,7 @@ public class AddressbookAdminCompanyEmployeeWebRequestBean extends BaseAddressbo
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.adminCompanyEmployeeBean = (AdminCompanyEmployeeSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote"); //NOI18N
+                       this.adminCompanyEmployeeBean = (AdminCompanyEmployeeSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index 24ae8e8d833884ce65686c89c65f406c5925a4d8..b292995dbc10c56aed6857c1fa7cfa26bd47aa37 100644 (file)
@@ -85,7 +85,7 @@ public class AddressbookCompanyEmployeeWebRequestBean extends BaseAddressbookCon
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.companyEmployeeBean = (CompanyEmployeeSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
+                       this.companyEmployeeBean = (CompanyEmployeeSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
diff --git a/src/java/org/mxchange/addressbook/beans/businessdata/AddressbookAdminBusinessDataWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/businessdata/AddressbookAdminBusinessDataWebRequestBean.java
deleted file mode 100644 (file)
index b82851d..0000000
+++ /dev/null
@@ -1,400 +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.addressbook.beans.businessdata;
-
-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.addressbook.beans.BaseAddressbookController;
-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;
-
-/**
- * An administrative business contact bean (controller)
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("adminBusinessDataController")
-@RequestScoped
-public class AddressbookAdminBusinessDataWebRequestBean extends BaseAddressbookController implements AddressbookAdminBusinessDataWebRequestController {
-
-       /**
-        * 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 AddressbookAdminBusinessDataWebRequestBean () {
-               // 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/addressbook-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/addressbook/beans/businessdata/AddressbookAdminBusinessDataWebRequestController.java b/src/java/org/mxchange/addressbook/beans/businessdata/AddressbookAdminBusinessDataWebRequestController.java
deleted file mode 100644 (file)
index dbc3d9b..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.addressbook.beans.businessdata;
-
-import java.io.Serializable;
-
-/**
- * An interface for session-scoped financial controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface AddressbookAdminBusinessDataWebRequestController extends Serializable {
-
-}
diff --git a/src/java/org/mxchange/addressbook/beans/businessdata/AddressbookBusinessDataWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/businessdata/AddressbookBusinessDataWebSessionBean.java
deleted file mode 100644 (file)
index e00cdca..0000000
+++ /dev/null
@@ -1,320 +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.addressbook.beans.businessdata;
-
-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.addressbook.beans.BaseAddressbookController;
-import org.mxchange.addressbook.beans.user.login.AddressbookUserLoginWebSessionController;
-import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
-import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
-import org.mxchange.jcountry.data.Country;
-
-/**
- * A business contact bean (controller)
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("businessDataController")
-@SessionScoped
-public class AddressbookBusinessDataWebSessionBean extends BaseAddressbookController implements AddressbookBusinessDataWebSessionController {
-
-       /**
-        * 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 AddressbookUserLoginWebSessionController userLoginController;
-
-       /**
-        * Constructor
-        */
-       public AddressbookBusinessDataWebSessionBean () {
-               // Call super constructor
-               super();
-       }
-
-
-       /**
-        * Returns a list of all business contacts
-        * <p>
-        * @return A list of all business contacts
-        */
-       @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/addressbook-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/addressbook/beans/businessdata/AddressbookBusinessDataWebSessionController.java b/src/java/org/mxchange/addressbook/beans/businessdata/AddressbookBusinessDataWebSessionController.java
deleted file mode 100644 (file)
index b02a65c..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.addressbook.beans.businessdata;
-
-import java.io.Serializable;
-
-/**
- * An interface for session-scoped financial controller
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface AddressbookBusinessDataWebSessionController extends Serializable {
-
-}
index f70f25a56821d1423218809867cb5adf477fbae7..58d2a9af3dab84421895f564b178f5a642aff6f3 100644 (file)
@@ -794,7 +794,7 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookC
                        Context context = new InitialContext();
 
                        // Try to lookup the beans
-                       this.adminContactPhoneBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminContactPhone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
+                       this.adminContactPhoneBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminContactPhone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index f27ff9fe1f0d98a2ff6e154148c262a131cc919b..40dc28111ca70686c9eb00de67f1f464f33b91ed 100644 (file)
@@ -650,8 +650,8 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
-                       this.adminUserBean = (AdminUserSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminUser!org.mxchange.jusercore.model.user.AdminUserSessionBeanRemote"); //NOI18N
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/addressbook-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+                       this.adminUserBean = (AdminUserSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminUser!org.mxchange.jusercore.model.user.AdminUserSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index 7fed770cf5313d02b5c821f9c2108bf23532bf37..23a577c319688c1db6ea41a81ecdc2de5e95ef41 100644 (file)
@@ -838,7 +838,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/addressbook-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index 9c17a283c11d9eac6b472fe57ef1e95e4d3afab0..7d8407f179d434ef3c2714c5f1ee5ec678c632d3 100644 (file)
@@ -557,7 +557,7 @@ public class AddressbookUserActivityWebApplicationBean extends BaseAddressbookCo
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.userActivityBean = (UserActivityLogSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/userActivity!org.mxchange.jusercore.model.user.activity.UserActivityLogSessionBeanRemote"); //NOI18N
+                       this.userActivityBean = (UserActivityLogSessionBeanRemote) context.lookup("java:global/addressbook-ejb/userActivity!org.mxchange.jusercore.model.user.activity.UserActivityLogSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index 31e288d875ba7252b1a7bd3a9da5d643d6863b95..720f64305343c07f5155a2f08447e89ecee0f7db 100644 (file)
@@ -132,7 +132,7 @@ public class AddressbookConfirmationLinkWebRequestBean extends BaseAddressbookCo
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/addressbook-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
diff --git a/src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java b/src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java
new file mode 100644 (file)
index 0000000..723afd6
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * 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.addressbook.converter.business.basicdata;
+
+import java.text.MessageFormat;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundException;
+
+/**
+ * Converter for contact id <-> valid business contact instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter (value = "BusinessContactConverter")
+public class AddressbookBusinessContactConverter implements Converter {
+
+       /**
+        * Business contact EJB
+        */
+       private static BusinessDataSessionBeanRemote BUSINESS_CONTACT_BEAN;
+
+       /**
+        * Default constructor
+        */
+       public AddressbookBusinessContactConverter () {
+       }
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Is the bean there?
+               // @TODO Requires this synchronization or is it (sync) confusing the container?
+               if (null == AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN) {
+                       // Try to get it
+                       try {
+                               // Get initial context
+                               Context initialContext = new InitialContext();
+
+                               // ... and user controller
+                               AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN = (BusinessDataSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N
+                       } catch (final NamingException ex) {
+                               // Continue to throw it
+                               throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
+                       }
+               }
+
+               // Init instance
+               BusinessBasicData businessContact = null;
+
+               try {
+                       // Try to parse the value as long
+                       Long contactId = Long.valueOf(submittedValue);
+
+                       // Try to get user instance from it
+                       businessContact = AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN.findBusinessDataById(contactId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final BusinessDataNotFoundException ex) {
+                       // Debug message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Return it
+               return businessContact;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               // Is the object null?
+               if ((null == value) || (String.valueOf(value).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               } else if (!(value instanceof Contact)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Contact.", value.getClass().getSimpleName())); //NOI18N
+               }
+
+               // Return id number
+               return String.valueOf(((BusinessBasicData) value).getBusinessDataId());
+       }
+
+}
diff --git a/src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java b/src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java
new file mode 100644 (file)
index 0000000..10a9366
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * 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.addressbook.converter.business.company_employee;
+
+import java.text.MessageFormat;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+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.jcontactsbusiness.exceptions.employee.CompanyEmployeeNotFoundException;
+
+/**
+ * Converter for converting company employee to and from id number
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter (value = "CompanyEmployeeConverter")
+public class AddressbookCompanyEmployeeConverter implements Converter {
+
+       /**
+        * CompanyEmployee EJB
+        */
+       private static CompanyEmployeeSessionBeanRemote COMPANY_EMPLOYEE_BEAN;
+
+       /**
+        * Default constructor
+        */
+       public AddressbookCompanyEmployeeConverter () {
+       }
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Is the bean there?
+               // @TODO Requires this synchronization or is it (sync) confusing the container?
+               if (null == AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN) {
+                       // Try to get it
+                       try {
+                               // Get initial context
+                               Context initialContext = new InitialContext();
+
+                               // ... and user controller
+                               AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/companyEmployee!org.mxchange.jcontactsbusiness.company_employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
+                       } catch (final NamingException ex) {
+                               // Continue to throw it
+                               throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
+                       }
+               }
+
+               // Init instance
+               Employee companyEmployee = null;
+
+               try {
+                       // Try to parse the value as long
+                       Long employeeId = Long.valueOf(submittedValue);
+
+                       // Try to get user instance from it
+                       companyEmployee = AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN.findCompanyEmployeeById(employeeId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final CompanyEmployeeNotFoundException ex) {
+                       // Debug message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Return it
+               return companyEmployee;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               // Is the object null?
+               if ((null == value) || (String.valueOf(value).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               } else if (!(value instanceof Employee)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Employee.", value.getClass().getSimpleName())); //NOI18N
+               }
+
+               // Return id number
+               return String.valueOf(((Employee) value).getEmployeeId());
+       }
+
+}
diff --git a/src/java/org/mxchange/addressbook/converter/businesscontact/AddressbookBusinessContactConverter.java b/src/java/org/mxchange/addressbook/converter/businesscontact/AddressbookBusinessContactConverter.java
deleted file mode 100644 (file)
index d09a21a..0000000
+++ /dev/null
@@ -1,115 +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.addressbook.converter.businesscontact;
-
-import java.text.MessageFormat;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
-import javax.faces.convert.FacesConverter;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
-import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundException;
-
-/**
- * Converter for contact id <-> valid business contact instance
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@FacesConverter (value = "BusinessContactConverter")
-public class AddressbookBusinessContactConverter implements Converter {
-
-       /**
-        * Business contact EJB
-        */
-       private static BusinessDataSessionBeanRemote BUSINESS_CONTACT_BEAN;
-
-       /**
-        * Default constructor
-        */
-       public AddressbookBusinessContactConverter () {
-       }
-
-       @Override
-       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the value null or empty?
-               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
-                       // Return null
-                       return null;
-               }
-
-               // Is the bean there?
-               // @TODO Requires this synchronization or is it (sync) confusing the container?
-               if (null == AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN) {
-                       // Try to get it
-                       try {
-                               // Get initial context
-                               Context initialContext = new InitialContext();
-
-                               // ... and user controller
-                               AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN = (BusinessDataSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N
-                       } catch (final NamingException ex) {
-                               // Continue to throw it
-                               throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
-                       }
-               }
-
-               // Init instance
-               BusinessBasicData businessContact = null;
-
-               try {
-                       // Try to parse the value as long
-                       Long contactId = Long.valueOf(submittedValue);
-
-                       // Try to get user instance from it
-                       businessContact = AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN.findBusinessDataById(contactId);
-               } catch (final NumberFormatException ex) {
-                       // Throw again
-                       throw new ConverterException(ex);
-               } catch (final BusinessDataNotFoundException ex) {
-                       // Debug message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
-               }
-
-               // Return it
-               return businessContact;
-       }
-
-       @Override
-       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
-               // Is the object null?
-               if ((null == value) || (String.valueOf(value).isEmpty())) {
-                       // Is null
-                       return ""; //NOI18N
-               } else if (!(value instanceof Contact)) {
-                       // Not same interface
-                       throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Contact.", value.getClass().getSimpleName())); //NOI18N
-               }
-
-               // Return id number
-               return String.valueOf(((BusinessBasicData) value).getBusinessDataId());
-       }
-
-}
diff --git a/src/java/org/mxchange/addressbook/converter/company_employee/AddressbookCompanyEmployeeConverter.java b/src/java/org/mxchange/addressbook/converter/company_employee/AddressbookCompanyEmployeeConverter.java
deleted file mode 100644 (file)
index 7213230..0000000
+++ /dev/null
@@ -1,114 +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.addressbook.converter.company_employee;
-
-import java.text.MessageFormat;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
-import javax.faces.convert.FacesConverter;
-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.jcontactsbusiness.exceptions.employee.CompanyEmployeeNotFoundException;
-
-/**
- * Converter for converting company employee to and from id number
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@FacesConverter (value = "CompanyEmployeeConverter")
-public class AddressbookCompanyEmployeeConverter implements Converter {
-
-       /**
-        * CompanyEmployee EJB
-        */
-       private static CompanyEmployeeSessionBeanRemote COMPANY_EMPLOYEE_BEAN;
-
-       /**
-        * Default constructor
-        */
-       public AddressbookCompanyEmployeeConverter () {
-       }
-
-       @Override
-       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the value null or empty?
-               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
-                       // Return null
-                       return null;
-               }
-
-               // Is the bean there?
-               // @TODO Requires this synchronization or is it (sync) confusing the container?
-               if (null == AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN) {
-                       // Try to get it
-                       try {
-                               // Get initial context
-                               Context initialContext = new InitialContext();
-
-                               // ... and user controller
-                               AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initialContext.lookup("java:global/jfinancials-ejb/companyEmployee!org.mxchange.jcontactsbusiness.company_employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
-                       } catch (final NamingException ex) {
-                               // Continue to throw it
-                               throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
-                       }
-               }
-
-               // Init instance
-               Employee companyEmployee = null;
-
-               try {
-                       // Try to parse the value as long
-                       Long employeeId = Long.valueOf(submittedValue);
-
-                       // Try to get user instance from it
-                       companyEmployee = AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN.findCompanyEmployeeById(employeeId);
-               } catch (final NumberFormatException ex) {
-                       // Throw again
-                       throw new ConverterException(ex);
-               } catch (final CompanyEmployeeNotFoundException ex) {
-                       // Debug message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
-               }
-
-               // Return it
-               return companyEmployee;
-       }
-
-       @Override
-       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
-               // Is the object null?
-               if ((null == value) || (String.valueOf(value).isEmpty())) {
-                       // Is null
-                       return ""; //NOI18N
-               } else if (!(value instanceof Employee)) {
-                       // Not same interface
-                       throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Employee.", value.getClass().getSimpleName())); //NOI18N
-               }
-
-               // Return id number
-               return String.valueOf(((Employee) value).getEmployeeId());
-       }
-
-}