]> git.mxchange.org Git - jjobs-war.git/commitdiff
Closed internal TODO: (please cherry-pick this)
authorRoland Häder <roland@mxchange.org>
Mon, 11 Jul 2016 16:03:32 +0000 (18:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 7 Aug 2016 11:06:23 +0000 (13:06 +0200)
- house numbers may have extensions like 'a', so the full number can be
  e.g. '123a' which should be better splitted into number and extension
- expanded templates for above stuff
- expanded controllers for this
- added missing i18n strings

Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
14 files changed:
src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestController.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java
src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java
src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelper.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java [deleted file]
src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeaturesWebApplicationController.java [deleted file]
web/WEB-INF/templates/admin/contact/admin_contact_data.tpl
web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl
web/WEB-INF/templates/contact/form_contact_data.tpl

index ea6ad9664b990d3593b53259cfb0edd2c33814a4..420ae887f41aa29503460a7df71b17e902553738 100644 (file)
@@ -174,6 +174,11 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
         */
        private Short houseNumber;
 
+       /**
+        * House number extension
+        */
+       private String houseNumberExtension;
+
        /**
         * Whether a cellphone entry has been unlinked
         */
@@ -636,6 +641,16 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
                this.houseNumber = houseNumber;
        }
 
+       @Override
+       public String getHouseNumberExtension () {
+               return this.houseNumberExtension;
+       }
+
+       @Override
+       public void setHouseNumberExtension (final String houseNumberExtension) {
+               this.houseNumberExtension = houseNumberExtension;
+       }
+
        @Override
        public Long getLandLineId () {
                return this.landLineId;
@@ -802,6 +817,7 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
                contact.setContactFamilyName(this.getFamilyName());
                contact.setContactStreet(this.getStreet());
                contact.setContactHouseNumber(this.getHouseNumber());
+               contact.setContactHouseNumberExtension(this.getHouseNumberExtension());
                contact.setContactZipCode(this.getZipCode());
                contact.setContactCity(this.getCity());
                contact.setContactCountry(this.getCountry());
index 8df27e4d4fe8cd68fcdd9bb1845c4e555e5fa545..af2c64b7ab7334852250d038d8eef50c919d473f 100644 (file)
@@ -313,6 +313,21 @@ public interface JobsAdminContactWebRequestController extends Serializable {
         */
        void setHouseNumber (final Short houseNumber);
 
+       /**
+        * Getter for house number extension, example: 123a 'a' is then the
+        * extension and 123 is the house number.
+        * <p>
+        * @return House number extension
+        */
+       String getHouseNumberExtension ();
+
+       /**
+        * Setter for house number extension
+        * <p>
+        * @param houseNumberExtension House number extension
+        */
+       void setHouseNumberExtension (final String houseNumberExtension);
+
        /**
         * Getter for phone number's area code
         * <p>
index 92c9c2364e5f22187ec787d75a19a8728f5af66d..f40bb6f3576ab557f1720778df240913dc2c7a66 100644 (file)
@@ -162,6 +162,11 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
         */
        private Short houseNumber;
 
+       /**
+        * House number extension
+        */
+       private String houseNumberExtension;
+
        /**
         * Whether a cellphone entry has been unlinked
         */
@@ -439,6 +444,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                Contact contact = new UserContact(this.getGender(), this.getFirstName(), this.getFamilyName());
                contact.setContactStreet(this.getStreet());
                contact.setContactHouseNumber(this.getHouseNumber());
+               contact.setContactHouseNumberExtension(this.getHouseNumberExtension());
                contact.setContactZipCode(this.getZipCode());
                contact.setContactCity(this.getCity());
                contact.setContactCountry(this.getCountry());
@@ -542,6 +548,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                contact.setContactFamilyName(this.getFamilyName());
                contact.setContactStreet(this.getStreet());
                contact.setContactHouseNumber(this.getHouseNumber());
+               contact.setContactHouseNumberExtension(this.getHouseNumberExtension());
                contact.setContactZipCode(this.getZipCode());
                contact.setContactCity(this.getCity());
                contact.setContactCountry(this.getCountry());
@@ -725,6 +732,16 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                this.houseNumber = houseNumber;
        }
 
+       @Override
+       public String getHouseNumberExtension () {
+               return this.houseNumberExtension;
+       }
+
+       @Override
+       public void setHouseNumberExtension (final String houseNumberExtension) {
+               this.houseNumberExtension = houseNumberExtension;
+       }
+
        @Override
        public Integer getPhoneAreaCode () {
                return this.phoneAreaCode;
@@ -958,6 +975,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                this.setFamilyName(null);
                this.setStreet(null);
                this.setHouseNumber(null);
+               this.setHouseNumberExtension(null);
                this.setZipCode(null);
                this.setCity(null);
                this.setCountry(null);
@@ -1004,6 +1022,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                this.setFamilyName(contact.getContactFamilyName());
                this.setStreet(contact.getContactStreet());
                this.setHouseNumber(contact.getContactHouseNumber());
+               this.setHouseNumberExtension(contact.getContactHouseNumberExtension());
                this.setZipCode(contact.getContactZipCode());
                this.setCity(contact.getContactCity());
                this.setCountry(contact.getContactCountry());
index ad0a0e4233a7e7decaaaa10b678546010603325f..cb8a6c2999eaa863952a8c1be80a093960ed5dde 100644 (file)
@@ -345,6 +345,21 @@ public interface JobsContactWebSessionController extends Serializable {
         */
        void setHouseNumber (final Short houseNumber);
 
+       /**
+        * Getter for house number extension, example: 123a 'a' is then the
+        * extension and 123 is the house number.
+        * <p>
+        * @return House number extension
+        */
+       String getHouseNumberExtension ();
+
+       /**
+        * Setter for house number extension
+        * <p>
+        * @param houseNumberExtension House number extension
+        */
+       void setHouseNumberExtension (final String houseNumberExtension);
+
        /**
         * Getter for phone number's area code
         * <p>
index 51eb57e056865df8cdd1630ef737dd39f65b0b77..9b6117fe5f5f17fd6106d848e414f0b93b83087f 100644 (file)
@@ -124,7 +124,7 @@ public class JobsAdminCountryWebRequestBean extends BaseJobsController implement
                country.setCountryAbroadDialPrefix(this.getCountryAbroadDialPrefix());
                country.setCountryCode(this.getCountryCode());
                country.setCountryExternalDialPrefix(this.getCountryExternalDialPrefix());
-               country.setCountryI18nkey(this.getCountryI18nKey());
+               country.setCountryI18nKey(this.getCountryI18nKey());
                country.setCountryIsLocalPrefixRequired(this.getCountryIsLocalPrefixRequired());
                country.setCountryPhoneCode(this.getCountryPhoneCode());
 
@@ -247,7 +247,7 @@ public class JobsAdminCountryWebRequestBean extends BaseJobsController implement
                        Country next = iterator.next();
 
                        // Is country code or i18n the same?
-                       if ((Objects.equals(country.getCountryCode(), next.getCountryCode())) || (Objects.equals(country.getCountryI18nkey(), next.getCountryI18nkey()))) {
+                       if ((Objects.equals(country.getCountryCode(), next.getCountryCode())) || (Objects.equals(country.getCountryI18nKey(), next.getCountryI18nKey()))) {
                                // Yes, then abort search
                                isAdded = true;
                                break;
index 3cf2f5585445d1e320e6d3e5a344eac5b54943be..5c3d16fbea392fad72c1b6aa8f95a9d76ff116e1 100644 (file)
@@ -22,6 +22,7 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
+import org.mxchange.jjobs.beans.phone.JobsAdminContactPhoneWebRequestController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java
new file mode 100644 (file)
index 0000000..917025f
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans.phone;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+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.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
+import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+
+/**
+ * Administrative bean (controller) for phone numbers
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminPhoneController")
+@RequestScoped
+public class JobsAdminContactPhoneWebRequestBean extends BaseJobsController implements JobsAdminContactPhoneWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 184_598_175_371_269_016L;
+
+       /**
+        * Remote EJB for phone number (administrative)
+        */
+       private AdminContactsPhoneSessionBeanRemote adminRemoteBean;
+
+       /**
+        * Cell phone number
+        */
+       private DialableCellphoneNumber cellPhone;
+
+       /**
+        * Instance of linked contact account
+        * <p>
+        * @deprecated This is a generic phone controller, not just for contact data
+        */
+       @Deprecated
+       private Contact contact;
+
+       /**
+        * "Cache" for contact lists, mostly only one is assigned. So this cache
+        * shouldn't grow beyond control.
+        * <p>
+        * @deprecated This is a generic phone controller, not just for contact data
+        */
+       @Deprecated
+       private final Map<Long, List<Contact>> contacts;
+
+       /**
+        * Fax number
+        */
+       private DialableFaxNumber fax;
+
+       /**
+        * Land-line number
+        */
+       private DialableLandLineNumber landLine;
+
+       /**
+        * Default constructor
+        */
+       public JobsAdminContactPhoneWebRequestBean () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup the beans
+                       this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw it again
+                       throw new FaceletException(e);
+               }
+
+               // Init map
+               this.contacts = new HashMap<>(10);
+       }
+
+       @Override
+       @Deprecated
+       public List<Contact> allCellphoneContacts () {
+               // Get id
+               Long phoneId = this.getCellPhone().getPhoneId();
+
+               // Is cache there?
+               if (this.contacts.containsKey(phoneId)) {
+                       // Return cached version
+                       return this.contacts.get(phoneId);
+               } else {
+                       // Ask bean
+                       List<Contact> list = this.adminRemoteBean.allContacts(this.getCellPhone());
+
+                       // Store result in cache
+                       this.contacts.put(phoneId, list);
+
+                       // Return now-cached list
+                       return list;
+               }
+       }
+
+       @Override
+       public DialableCellphoneNumber getCellPhone () {
+               return this.cellPhone;
+       }
+
+       @Override
+       public void setCellPhone (final DialableCellphoneNumber cellPhone) {
+               this.cellPhone = cellPhone;
+       }
+
+       @Override
+       @Deprecated
+       public Contact getContact () {
+               return this.contact;
+       }
+
+       @Override
+       @Deprecated
+       public void setContact (final Contact contact) {
+               this.contact = contact;
+       }
+
+       @Override
+       public DialableFaxNumber getFax () {
+               return this.fax;
+       }
+
+       @Override
+       public void setFax (final DialableFaxNumber fax) {
+               this.fax = fax;
+       }
+
+       @Override
+       public DialableLandLineNumber getLandLine () {
+               return this.landLine;
+       }
+
+       @Override
+       public void setLandLine (final DialableLandLineNumber landLine) {
+               this.landLine = landLine;
+       }
+
+}
diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java
new file mode 100644 (file)
index 0000000..5094b32
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans.phone;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+
+/**
+ * An interface for a request web controller (bean) for administrative phone
+ * number purposes.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface JobsAdminContactPhoneWebRequestController extends Serializable {
+
+       /**
+        * Getter for all contacts having current cellphone instance linked
+        * <p>
+        * @return List of all linked contacts
+        */
+       @Deprecated
+       List<Contact> allCellphoneContacts ();
+
+       /**
+        * Getter for dialable cellphone number instance
+        * <p>
+        * @return Dialable cellphone number instance
+        */
+       DialableCellphoneNumber getCellPhone ();
+
+       /**
+        * Setter for dialable land-line number instance
+        * <p>
+        * @param landLine Dialable land-line number instance
+        */
+       void setLandLine (final DialableLandLineNumber landLine);
+
+       /**
+        * Getter for dialable land-line number instance
+        * <p>
+        * @return Dialable land-line number instance
+        */
+       DialableLandLineNumber getLandLine ();
+
+       /**
+        * Setter for dialable fax number instance
+        * <p>
+        * @param fax Dialable fax number instance
+        */
+       void setFax (final DialableFaxNumber fax);
+
+       /**
+        * Getter for dialable fax number instance
+        * <p>
+        * @return Dialable fax number instance
+        */
+       DialableFaxNumber getFax ();
+
+       /**
+        * Setter for dialable cellphone number instance
+        * <p>
+        * @param cellPhone Dialable cellphone number instance
+        */
+       void setCellPhone (final DialableCellphoneNumber cellPhone);
+
+       /**
+        * Getter for linked contact account
+        * <p>
+        * @return Linked contact account
+        */
+       @Deprecated
+       Contact getContact ();
+
+       /**
+        * Setter for linked contact account
+        * <p>
+        * @param contact Linked contact account
+        */
+       @Deprecated
+       void setContact (final Contact contact);
+
+}
diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java
deleted file mode 100644 (file)
index 80a4269..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jjobs.beans.phone;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-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.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
-import org.mxchange.jjobs.beans.BaseJobsController;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-
-/**
- * Administrative bean (controller) for phone numbers
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("adminPhoneController")
-@RequestScoped
-public class JobsAdminContactPhoneWebSessionBean extends BaseJobsController implements JobsAdminContactPhoneWebSessionController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 184_598_175_371_269_016L;
-
-       /**
-        * Remote EJB for phone number (administrative)
-        */
-       private AdminContactsPhoneSessionBeanRemote adminRemoteBean;
-
-       /**
-        * Cell phone number
-        */
-       private DialableCellphoneNumber cellPhone;
-
-       /**
-        * Instance of linked contact account
-        * <p>
-        * @deprecated This is a generic phone controller, not just for contact data
-        */
-       @Deprecated
-       private Contact contact;
-
-       /**
-        * "Cache" for contact lists, mostly only one is assigned. So this cache
-        * shouldn't grow beyond control.
-        * <p>
-        * @deprecated This is a generic phone controller, not just for contact data
-        */
-       @Deprecated
-       private final Map<Long, List<Contact>> contacts;
-
-       /**
-        * Fax number
-        */
-       private DialableFaxNumber fax;
-
-       /**
-        * Land-line number
-        */
-       private DialableLandLineNumber landLine;
-
-       /**
-        * Default constructor
-        */
-       public JobsAdminContactPhoneWebSessionBean () {
-               // Try it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup the beans
-                       this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
-               } catch (final NamingException e) {
-                       // Throw it again
-                       throw new FaceletException(e);
-               }
-
-               // Init map
-               this.contacts = new HashMap<>(10);
-       }
-
-       @Override
-       @Deprecated
-       public List<Contact> allCellphoneContacts () {
-               // Get id
-               Long phoneId = this.getCellPhone().getPhoneId();
-
-               // Is cache there?
-               if (this.contacts.containsKey(phoneId)) {
-                       // Return cached version
-                       return this.contacts.get(phoneId);
-               } else {
-                       // Ask bean
-                       List<Contact> list = this.adminRemoteBean.allContacts(this.getCellPhone());
-
-                       // Store result in cache
-                       this.contacts.put(phoneId, list);
-
-                       // Return now-cached list
-                       return list;
-               }
-       }
-
-       @Override
-       public DialableCellphoneNumber getCellPhone () {
-               return this.cellPhone;
-       }
-
-       @Override
-       public void setCellPhone (final DialableCellphoneNumber cellPhone) {
-               this.cellPhone = cellPhone;
-       }
-
-       @Override
-       @Deprecated
-       public Contact getContact () {
-               return this.contact;
-       }
-
-       @Override
-       @Deprecated
-       public void setContact (final Contact contact) {
-               this.contact = contact;
-       }
-
-       @Override
-       public DialableFaxNumber getFax () {
-               return this.fax;
-       }
-
-       @Override
-       public void setFax (final DialableFaxNumber fax) {
-               this.fax = fax;
-       }
-
-       @Override
-       public DialableLandLineNumber getLandLine () {
-               return this.landLine;
-       }
-
-       @Override
-       public void setLandLine (final DialableLandLineNumber landLine) {
-               this.landLine = landLine;
-       }
-
-}
diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionController.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionController.java
deleted file mode 100644 (file)
index 989f989..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jjobs.beans.phone;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-
-/**
- * An interface for a request web controller (bean) for administrative phone
- * number purposes.
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface JobsAdminContactPhoneWebSessionController extends Serializable {
-
-       /**
-        * Getter for all contacts having current cellphone instance linked
-        * <p>
-        * @return List of all linked contacts
-        */
-       @Deprecated
-       List<Contact> allCellphoneContacts ();
-
-       /**
-        * Getter for dialable cellphone number instance
-        * <p>
-        * @return Dialable cellphone number instance
-        */
-       DialableCellphoneNumber getCellPhone ();
-
-       /**
-        * Setter for dialable land-line number instance
-        * <p>
-        * @param landLine Dialable land-line number instance
-        */
-       void setLandLine (final DialableLandLineNumber landLine);
-
-       /**
-        * Getter for dialable land-line number instance
-        * <p>
-        * @return Dialable land-line number instance
-        */
-       DialableLandLineNumber getLandLine ();
-
-       /**
-        * Setter for dialable fax number instance
-        * <p>
-        * @param fax Dialable fax number instance
-        */
-       void setFax (final DialableFaxNumber fax);
-
-       /**
-        * Getter for dialable fax number instance
-        * <p>
-        * @return Dialable fax number instance
-        */
-       DialableFaxNumber getFax ();
-
-       /**
-        * Setter for dialable cellphone number instance
-        * <p>
-        * @param cellPhone Dialable cellphone number instance
-        */
-       void setCellPhone (final DialableCellphoneNumber cellPhone);
-
-       /**
-        * Getter for linked contact account
-        * <p>
-        * @return Linked contact account
-        */
-       @Deprecated
-       Contact getContact ();
-
-       /**
-        * Setter for linked contact account
-        * <p>
-        * @param contact Linked contact account
-        */
-       @Deprecated
-       void setContact (final Contact contact);
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeaturesWebApplicationController.java b/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeaturesWebApplicationController.java
deleted file mode 100644 (file)
index 05892d0..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2016 Cho-Time GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.features;
-
-import java.io.Serializable;
-import javax.ejb.Local;
-
-/**
- * An interface for country beans
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-@Local
-public interface PizzaFeaturesWebApplicationController extends Serializable {
-
-       /**
-        * Checks if given feature is enabled.
-        * <p>
-        * @param feature Feature to be checked
-        * <p>
-        * @return Whether given feature is enabled
-        */
-       boolean isFeatureEnabled (final String feature);
-
-}
index 5e29f6f67cf6e545e9f591a704032f67cb07415e..0cf4cfd1eb31ba8e7f4065c23cbaa0fec38429bb 100644 (file)
-<?xml version="1.0" encoding="UTF-8" ?>\r
-<ui:composition\r
-       xmlns="http://www.w3.org/1999/xhtml"\r
-       xmlns:f="http://java.sun.com/jsf/core"\r
-       xmlns:h="http://java.sun.com/jsf/html"\r
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">\r
-\r
-       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.contact}">\r
-               <f:facet name="header">\r
-                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">\r
-                               <f:param value="#{beanHelper.contact.contactId}" />\r
-                       </h:outputFormat>\r
-               </f:facet>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />\r
-\r
-                       <h:outputText id="contactId" styleClass="data_field" value="#{beanHelper.contact.contactId}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />\r
-\r
-                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.contact.contactCreated.time}">\r
-                               <f:convertDateTime for="contactCreated" type="both" />\r
-                       </h:outputText>\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />\r
-\r
-                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.contact.contactUpdated.time}">\r
-                               <f:convertDateTime for="contactUpdated" type="both" />\r
-                       </h:outputText>\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />\r
-\r
-                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.contact.isOwnContact()}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />\r
-\r
-                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.contact.contactGender.messageKey]}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />\r
-\r
-                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.contact.contactTitle}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />\r
-\r
-                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.contact.contactFirstName}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />\r
-\r
-                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.contact.contactFamilyName}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />\r
-\r
-                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.contact.contactStreet}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />\r
-\r
-                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.contact.contactHouseNumber}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />\r
-\r
-                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.contact.contactZipCode}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />\r
-\r
-                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.contact.contactCity}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />\r
-\r
-                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">\r
-                               <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />\r
-                       </h:outputLink>\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />\r
-\r
-                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.contact.contactBirthday.time}">\r
-                               <f:convertDateTime for="contactBirthday" type="date" />\r
-                       </h:outputText>\r
-               </h:column>\r
-       </h:panelGrid>\r
-</ui:composition>\r
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:panelGrid id="show_contact" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.contact}">
+               <f:facet name="header">
+                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">
+                               <f:param value="#{beanHelper.contact.contactId}" />
+                       </h:outputFormat>
+               </f:facet>
+
+               <h:column>
+                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />
+
+                       <h:outputText id="contactId" styleClass="data_field" value="#{beanHelper.contact.contactId}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />
+
+                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.contact.contactCreated.time}">
+                               <f:convertDateTime for="contactCreated" type="both" />
+                       </h:outputText>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />
+
+                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.contact.contactUpdated.time}">
+                               <f:convertDateTime for="contactUpdated" type="both" />
+                       </h:outputText>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
+
+                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.contact.isOwnContact()}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
+
+                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.contact.contactGender.messageKey]}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
+
+                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.contact.contactTitle}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.contact.contactFirstName}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.contact.contactFamilyName}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
+
+                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.contact.contactStreet}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
+
+                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.contact.contactHouseNumber}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactHouseNumberExtension" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER_EXTENSION}" />
+
+                       <h:outputText id="contactHouseNumberExtension" styleClass="data_field" value="#{beanHelper.contact.contactHouseNumberExtension}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
+
+                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.contact.contactZipCode}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
+
+                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.contact.contactCity}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">
+                               <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />
+                       </h:outputLink>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
+
+                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.contact.contactBirthday.time}">
+                               <f:convertDateTime for="contactBirthday" type="date" />
+                       </h:outputText>
+               </h:column>
+       </h:panelGrid>
+</ui:composition>
index 8de921209c7f36efd6ca9fde1c4cf575b2e22f6d..23f196aaf4bd53c5d78ab2ed725cf7f415b173f8 100644 (file)
 
                        <h:message for="houseNumber" errorClass="errors" fatalClass="errors" warnClass="errors" />
 
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="houseNumberExtension" value="#{msg.ADMIN_PERSONAL_DATA_HOUSE_NUMBER_EXTENSION}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:inputText styleClass="input" id="houseNumberExtension" size="2" maxlength="2" value="#{adminContactController.houseNumberExtension}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <h:message for="houseNumberExtension" errorClass="errors" fatalClass="errors" warnClass="errors" />
+
                        <div class="table_row">
                                <div class="table_left_medium">
                                        <h:outputLabel for="zipCode" value="#{msg.ADMIN_PERSONAL_DATA_ZIP_CODE}" />
index 51455c983853f462df85ebfa761acb0fb7d18598..dc990a7b4bdf295dac63c8aa2de5c5f38b2f423a 100644 (file)
                                <h:message for="houseNumberExtension" errorClass="errors" fatalClass="errors" warnClass="errors" />
                        </div>
 
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="houseNumberExtension" value="#{msg.PERSONAL_DATA_HOUSE_NUMBER_EXTENSION}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText styleClass="input" id="houseNumber" size="2" maxlength="2" value="#{contactController.houseNumberExtension}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <h:message for="houseNumberExtension" errorClass="errors" fatalClass="errors" warnClass="errors" />
+
                        <div class="table_row">
                                <div class="table_left">
                                        <h:outputLabel for="zipCode" value="#{msg.PERSONAL_DATA_ZIP_CODE}" />