]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 18 Aug 2016 16:05:34 +0000 (18:05 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 21 Aug 2016 19:48:38 +0000 (21:48 +0200)
- fixed phone -> landLine != mobile number

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
web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl
web/WEB-INF/templates/contact/form_contact_data.tpl

index 83e517dcbf78cac02bf6c4e88144dba380c0c8bc..63d9e05361b2520c07d68d3aad2b999aadd6e4fe 100644 (file)
@@ -194,39 +194,39 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
        private boolean isMobileUnlinked;
 
        /**
-        * Land-line id number
+        * Land-line number area code
         */
-       private Long landLineId;
+       private Integer landLineAreaCode;
 
        /**
-        * Mobile number
+        * Country instance for land-line number
         */
-       private Long mobileNumber;
+       private Country landLineCountry;
 
        /**
-        * Mobile id number
+        * Land-line id number
         */
-       private Long mobileNumberId;
+       private Long landLineId;
 
        /**
-        * Mobile provider
+        * Land-line number
         */
-       private MobileProvider mobileProvider;
+       private Long landLineNumber;
 
        /**
-        * Phone number area code
+        * Mobile number
         */
-       private Integer phoneAreaCode;
+       private Long mobileNumber;
 
        /**
-        * Country instance for phone number
+        * Mobile id number
         */
-       private Country phoneCountry;
+       private Long mobileNumberId;
 
        /**
-        * Phone number
+        * Mobile provider
         */
-       private Long phoneNumber;
+       private MobileProvider mobileProvider;
 
        /**
         * Street
@@ -390,9 +390,9 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
                // .. land-line data
                if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
                        this.setLandLineId(contact.getContactLandLineNumber().getPhoneId());
-                       this.setPhoneAreaCode(contact.getContactLandLineNumber().getPhoneAreaCode());
-                       this.setPhoneCountry(contact.getContactLandLineNumber().getPhoneCountry());
-                       this.setPhoneNumber(contact.getContactLandLineNumber().getPhoneNumber());
+                       this.setLandLineAreaCode(contact.getContactLandLineNumber().getPhoneAreaCode());
+                       this.setLandLineCountry(contact.getContactLandLineNumber().getPhoneCountry());
+                       this.setLandLineNumber(contact.getContactLandLineNumber().getPhoneNumber());
                }
        }
 
@@ -669,73 +669,73 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
        }
 
        @Override
-       public Long getLandLineId () {
-               return this.landLineId;
+       public Integer getLandLineAreaCode () {
+               return this.landLineAreaCode;
        }
 
        @Override
-       public void setLandLineId (final Long landLineId) {
-               this.landLineId = landLineId;
+       public void setLandLineAreaCode (final Integer landLineAreaCode) {
+               this.landLineAreaCode = landLineAreaCode;
        }
 
        @Override
-       public Long getMobileNumber () {
-               return this.mobileNumber;
+       public Country getLandLineCountry () {
+               return this.landLineCountry;
        }
 
        @Override
-       public void setMobileNumber (Long mobileNumber) {
-               this.mobileNumber = mobileNumber;
+       public void setLandLineCountry (final Country landLineCountry) {
+               this.landLineCountry = landLineCountry;
        }
 
        @Override
-       public Long getMobileNumberId () {
-               return this.mobileNumberId;
+       public Long getLandLineId () {
+               return this.landLineId;
        }
 
        @Override
-       public void setMobileNumberId (final Long mobileNumberId) {
-               this.mobileNumberId = mobileNumberId;
+       public void setLandLineId (final Long landLineId) {
+               this.landLineId = landLineId;
        }
 
        @Override
-       public MobileProvider getMobileProvider () {
-               return this.mobileProvider;
+       public Long getLandLineNumber () {
+               return this.landLineNumber;
        }
 
        @Override
-       public void setMobileProvider (final MobileProvider mobileProvider) {
-               this.mobileProvider = mobileProvider;
+       public void setLandLineNumber (final Long landLineNumber) {
+               this.landLineNumber = landLineNumber;
        }
 
        @Override
-       public Integer getPhoneAreaCode () {
-               return this.phoneAreaCode;
+       public Long getMobileNumber () {
+               return this.mobileNumber;
        }
 
        @Override
-       public void setPhoneAreaCode (final Integer phoneAreaCode) {
-               this.phoneAreaCode = phoneAreaCode;
+       public void setMobileNumber (Long mobileNumber) {
+               this.mobileNumber = mobileNumber;
        }
 
        @Override
-       public Country getPhoneCountry () {
-               return this.phoneCountry;
+       public Long getMobileNumberId () {
+               return this.mobileNumberId;
        }
 
        @Override
-       public void setPhoneCountry (final Country phoneCountry) {
-               this.phoneCountry = phoneCountry;
+       public void setMobileNumberId (final Long mobileNumberId) {
+               this.mobileNumberId = mobileNumberId;
        }
 
        @Override
-       public Long getPhoneNumber () {
-               return this.phoneNumber;
+       public MobileProvider getMobileProvider () {
+               return this.mobileProvider;
        }
 
        @Override
-       public void setPhoneNumber (final Long phoneNumber) {
-               this.phoneNumber = phoneNumber;
+       public void setMobileProvider (final MobileProvider mobileProvider) {
+               this.mobileProvider = mobileProvider;
        }
 
        @Override
@@ -794,9 +794,9 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
 
                // - contact data
                this.setEmailAddress(null);
-               this.setPhoneCountry(null);
-               this.setPhoneAreaCode(null);
-               this.setPhoneNumber(null);
+               this.setLandLineCountry(null);
+               this.setLandLineAreaCode(null);
+               this.setLandLineNumber(null);
                this.setMobileProvider(null);
                this.setMobileNumber(null);
                this.setFaxCountry(null);
@@ -868,7 +868,7 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
                this.isMobileUnlinked = ContactUtils.updateCellPhoneNumber(contact, this.getMobileProvider(), this.getMobileNumber());
 
                // Update contact's land-line number
-               this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
+               this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
 
                // Update contact's fax number
                this.isFaxUnlinked = ContactUtils.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
index 127f1218455c25a24d94dd67f6d184d1a0fe0c00..388a0487a01078cad072edd3a53aaffee2e17a90 100644 (file)
@@ -350,42 +350,42 @@ public interface JobsAdminContactWebRequestController extends Serializable {
         * <p>
         * @return Phone number's area code
         */
-       Integer getPhoneAreaCode ();
+       Integer getLandLineAreaCode ();
 
        /**
         * Setter for phone number's area code
         * <p>
         * @param phoneAreaCode Phone number's area code
         */
-       void setPhoneAreaCode (final Integer phoneAreaCode);
+       void setLandLineAreaCode (final Integer phoneAreaCode);
 
        /**
         * Getter for phone number's country instance
         * <p>
         * @return Phone number's country instance
         */
-       Country getPhoneCountry ();
+       Country getLandLineCountry ();
 
        /**
         * Setter for phone number's country instance
         * <p>
         * @param phoneCountry Phone number's country instance
         */
-       void setPhoneCountry (final Country phoneCountry);
+       void setLandLineCountry (final Country phoneCountry);
 
        /**
         * Getter for phone number
         * <p>
         * @return Phone number
         */
-       Long getPhoneNumber ();
+       Long getLandLineNumber ();
 
        /**
         * Setter for phone number
         * <p>
         * @param phoneNumber Phone number
         */
-       void setPhoneNumber (final Long phoneNumber);
+       void setLandLineNumber (final Long phoneNumber);
 
        /**
         * Street
index 0fe1152a912a55ac18ea271aaceab9c243d42334..2022b3189b590f991e1b4876bad082e795ea9a83 100644 (file)
@@ -175,29 +175,29 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
        private boolean isMobileUnlinked;
 
        /**
-        * Mobile number
+        * Land-line number area code
         */
-       private Long mobileNumber;
+       private Integer landLineAreaCode;
 
        /**
-        * Mobile provider
+        * Country instance for land-line number
         */
-       private MobileProvider mobileProvider;
+       private Country landLineCountry;
 
        /**
-        * Phone number area code
+        * Land-line number
         */
-       private Integer phoneAreaCode;
+       private Long landLineNumber;
 
        /**
-        * Country instance for phone number
+        * Mobile number
         */
-       private Country phoneCountry;
+       private Long mobileNumber;
 
        /**
-        * Phone number
+        * Mobile provider
         */
-       private Long phoneNumber;
+       private MobileProvider mobileProvider;
 
        /**
         * A list of all selectable contacts
@@ -473,7 +473,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                }
 
                // Generate phone number
-               DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
+               DialableLandLineNumber phone = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
                DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
                DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
 
@@ -492,7 +492,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                // Debug message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("{0}.createContactInstance: this.emailAddress={1}", this.getClass().getSimpleName(), this.getEmailAddress()));
                // Don't set null or wrong references
-               if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneCountry() instanceof Country) && (this.getPhoneAreaCode() != null) && (this.getPhoneNumber() != null) && (this.getPhoneAreaCode() > 0) && (this.getPhoneNumber() > 0)) {
+               if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
                        // Now the number must be given
                        if (phone.getPhoneAreaCode() == null) {
                                // Is null
@@ -592,7 +592,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                this.isMobileUnlinked = ContactUtils.updateCellPhoneNumber(contact, this.getMobileProvider(), this.getMobileNumber());
 
                // Update contact's land-line number
-               this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
+               this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
 
                // Update contact's fax number
                this.isFaxUnlinked = ContactUtils.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
@@ -758,53 +758,53 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
        }
 
        @Override
-       public Long getMobileNumber () {
-               return this.mobileNumber;
+       public Integer getLandLineAreaCode () {
+               return this.landLineAreaCode;
        }
 
        @Override
-       public void setMobileNumber (Long mobileNumber) {
-               this.mobileNumber = mobileNumber;
+       public void setLandLineAreaCode (final Integer landLineAreaCode) {
+               this.landLineAreaCode = landLineAreaCode;
        }
 
        @Override
-       public MobileProvider getMobileProvider () {
-               return this.mobileProvider;
+       public Country getLandLineCountry () {
+               return this.landLineCountry;
        }
 
        @Override
-       public void setMobileProvider (final MobileProvider mobileProvider) {
-               this.mobileProvider = mobileProvider;
+       public void setLandLineCountry (final Country landLineCountry) {
+               this.landLineCountry = landLineCountry;
        }
 
        @Override
-       public Integer getPhoneAreaCode () {
-               return this.phoneAreaCode;
+       public Long getLandLineNumber () {
+               return this.landLineNumber;
        }
 
        @Override
-       public void setPhoneAreaCode (final Integer phoneAreaCode) {
-               this.phoneAreaCode = phoneAreaCode;
+       public void setLandLineNumber (final Long landLineNumber) {
+               this.landLineNumber = landLineNumber;
        }
 
        @Override
-       public Country getPhoneCountry () {
-               return this.phoneCountry;
+       public Long getMobileNumber () {
+               return this.mobileNumber;
        }
 
        @Override
-       public void setPhoneCountry (final Country phoneCountry) {
-               this.phoneCountry = phoneCountry;
+       public void setMobileNumber (Long mobileNumber) {
+               this.mobileNumber = mobileNumber;
        }
 
        @Override
-       public Long getPhoneNumber () {
-               return this.phoneNumber;
+       public MobileProvider getMobileProvider () {
+               return this.mobileProvider;
        }
 
        @Override
-       public void setPhoneNumber (final Long phoneNumber) {
-               this.phoneNumber = phoneNumber;
+       public void setMobileProvider (final MobileProvider mobileProvider) {
+               this.mobileProvider = mobileProvider;
        }
 
        @Override
@@ -1047,9 +1047,9 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                // - contact data
                this.setEmailAddress(null);
                this.setEmailAddressRepeat(null);
-               this.setPhoneAreaCode(null);
-               this.setPhoneCountry(null);
-               this.setPhoneNumber(null);
+               this.setLandLineAreaCode(null);
+               this.setLandLineCountry(null);
+               this.setLandLineNumber(null);
                this.setMobileProvider(null);
                this.setMobileNumber(null);
                this.setFaxAreaCode(null);
@@ -1102,9 +1102,9 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
 
                // - contact data
                if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneAreaCode() > 0)) {
-                       this.setPhoneCountry(phone.getPhoneCountry());
-                       this.setPhoneAreaCode(phone.getPhoneAreaCode());
-                       this.setPhoneNumber(phone.getPhoneNumber());
+                       this.setLandLineCountry(phone.getPhoneCountry());
+                       this.setLandLineAreaCode(phone.getPhoneAreaCode());
+                       this.setLandLineNumber(phone.getPhoneNumber());
                }
 
                if ((mobile instanceof DialableMobileNumber) && (mobile.getMobileProvider() instanceof MobileProvider)) {
index bdc3100810979bbc04bb6da5558a7facbea49ff0..ee3c6a005e16b52ddcc3e9985e9a3f02b28eb31f 100644 (file)
@@ -371,42 +371,42 @@ public interface JobsContactWebSessionController extends Serializable {
         * <p>
         * @return Phone number's area code
         */
-       Integer getPhoneAreaCode ();
+       Integer getLandLineAreaCode ();
 
        /**
         * Setter for phone number's area code
         * <p>
         * @param phoneAreaCode Phone number's area code
         */
-       void setPhoneAreaCode (final Integer phoneAreaCode);
+       void setLandLineAreaCode (final Integer phoneAreaCode);
 
        /**
         * Getter for phone number's country instance
         * <p>
         * @return Phone number's country instance
         */
-       Country getPhoneCountry ();
+       Country getLandLineCountry ();
 
        /**
         * Setter for phone number's country instance
         * <p>
         * @param phoneCountry Phone number's country instance
         */
-       void setPhoneCountry (final Country phoneCountry);
+       void setLandLineCountry (final Country phoneCountry);
 
        /**
         * Getter for phone number
         * <p>
         * @return Phone number
         */
-       Long getPhoneNumber ();
+       Long getLandLineNumber ();
 
        /**
         * Setter for phone number
         * <p>
         * @param phoneNumber Phone number
         */
-       void setPhoneNumber (final Long phoneNumber);
+       void setLandLineNumber (final Long phoneNumber);
 
        /**
         * Street
index f2ed637467eff250bf975700dc1fac4f806dc20e..78bd88913f4e28dc71f64bee168f0c6e327d22d6 100644 (file)
                                </div>
 
                                <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select right_space" id="countryPhoneCode" value="#{adminContactController.phoneCountry}">
+                                       <h:selectOneMenu styleClass="select right_space" id="countryPhoneCode" value="#{adminContactController.landLineCountry}">
                                                <f:converter converterId="CountryConverter" />
                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
                                        </h:selectOneMenu>
 
-                                       <h:inputText styleClass="input right_space" id="landLineAreaCode" size="5" maxlength="10" value="#{adminContactController.phoneAreaCode}">
+                                       <h:inputText styleClass="input right_space" id="landLineAreaCode" size="5" maxlength="10" value="#{adminContactController.landLineAreaCode}">
                                                <f:validator for="phoneAreaCode" validatorId="PhoneNumberValidator" />
                                        </h:inputText>
 
-                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminContactController.phoneNumber}">
+                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminContactController.landLineNumber}">
                                                <f:validator for="phoneNumber" validatorId="PhoneNumberValidator" />
                                        </h:inputText>
                                </div>
index 9b9bcbd4845b34c2e7066bcd52fe7dbb688662db..ab13d0578dd9c17ae65f752be91c52023d06cb27 100644 (file)
                                </div>
 
                                <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select right_space" id="landLineCountry" value="#{contactController.phoneCountry}">
+                                       <h:selectOneMenu styleClass="select right_space" id="landLineCountry" value="#{contactController.landLineCountry}">
                                                <f:converter converterId="CountryConverter" />
                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryAbroadDialPrefix}#{country.countryPhoneCode}" />
                                        </h:selectOneMenu>
 
-                                       <h:inputText styleClass="input right_space" id="landLineAreaCode" size="5" maxlength="10" value="#{contactController.phoneAreaCode}">
+                                       <h:inputText styleClass="input right_space" id="landLineAreaCode" size="5" maxlength="10" value="#{contactController.landLineAreaCode}">
                                                <f:validator validatorId="PhoneNumberValidator" />
                                        </h:inputText>
 
-                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{contactController.phoneNumber}">
+                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{contactController.landLineNumber}">
                                                <f:validator validatorId="PhoneNumberValidator" />
                                        </h:inputText>
                                </div>
                                                <f:selectItems value="#{mobileProviderController.allMobileProvider()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
                                        </h:selectOneMenu>
 
-                                       <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{contactController.phoneNumber}">
+                                       <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{contactController.mobileNumber}">
                                                <f:validator for="mobileNumber" validatorId="PhoneNumberValidator" />
                                        </h:inputText>
                                </div>