From: Roland Häder Date: Tue, 25 Apr 2017 11:59:38 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=56bd37d332d9c061f2d49304e0b91254b8ddcfc2;p=jfinancials-war.git Please cherry-pick: - renamed cellphone -> mobile - renamed carrier -> provider - renamed phone* -> landLine* - all more common over all (other) projects Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java index 1377ef26..9f91863e 100644 --- a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java @@ -182,44 +182,44 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll private boolean isLandLineUnlinked; /** - * Whether a mobile entry has been unlinked + * Whether a cellphone entry has been unlinked */ - private boolean isMobileUnlinked; + private boolean isMobileNumberUnlinked; /** - * Land-line id number + * Phone number area code */ - private Long landLineId; + private Integer landLineAreaCode; /** - * Mobile number's carrier + * Country instance for phone number */ - private MobileProvider mobileCarrier; + private Country landLineCountry; /** - * Mobile id number + * Land-line id number */ - private Long mobileId; + private Long landLineId; /** - * Mobile number + * Phone number */ - private Long mobileNumber; + private Long landLineNumber; /** - * Phone number area code + * Mobile id number */ - private Integer phoneAreaCode; + private Long mobileId; /** - * Country instance for phone number + * Mobile number */ - private Country phoneCountry; + private Long mobileNumber; /** - * Phone number + * Mobile number's provider */ - private Long phoneNumber; + private MobileProvider mobileProvider; /** * Street @@ -304,6 +304,9 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll @Override public void copyContactToController (final Contact contact) { + // Log message + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminContactController::copyContactToController(): contact={0} - CALLED!", contact)); //NOI18N + // The contact instance must be valid if (null == contact) { // Throw NPE again @@ -332,63 +335,134 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll this.setStreet(contact.getContactStreet()); this.setZipCode(contact.getContactZipCode()); - // ... mobile data + // Is the cell phone set? if (contact.getContactMobileNumber() instanceof DialableMobileNumber) { + // ... cellphone data this.setMobileId(contact.getContactMobileNumber().getPhoneId()); - this.setMobileCarrier(contact.getContactMobileNumber().getMobileProvider()); + this.setMobileProvider(contact.getContactMobileNumber().getMobileProvider()); this.setMobileNumber(contact.getContactMobileNumber().getPhoneNumber()); } - // ... fax data + // Is the fax set? if (contact.getContactFaxNumber() instanceof DialableFaxNumber) { + // ... fax data this.setFaxId(contact.getContactFaxNumber().getPhoneId()); this.setFaxAreaCode(contact.getContactFaxNumber().getPhoneAreaCode()); this.setFaxCountry(contact.getContactFaxNumber().getPhoneCountry()); this.setFaxNumber(contact.getContactFaxNumber().getPhoneNumber()); } - // .. land-line data + // Is the land-line number set? if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) { + // .. land-line data 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()); } + + // Log message + //* NOISY-DEBUG: */ System.out.println("AdminContactController::copyContactToController(): EXIT!"); //NOI18N } @Override public Contact createContactInstance () { + // Are all minimum fields set? + if (this.getGender() == null) { + // Throw NPE + throw new NullPointerException("gender is null"); //NOI18N + } else if (this.getFirstName() == null) { + // Throw NPE + throw new NullPointerException("firstName is null"); //NOI18N + } else if (this.getFirstName().isEmpty()) { + // Empty string + throw new IllegalStateException("firstName is empty"); //NOI18N + } else if (this.getFamilyName() == null) { + // Throw NPE + throw new NullPointerException("familyName is null"); //NOI18N + } else if (this.getFamilyName().isEmpty()) { + // Empty string + throw new IllegalStateException("familyName is empty"); //NOI18N + } + // Generate phone number - DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber()); - DialableMobileNumber mobile = new MobileNumber(this.getMobileCarrier(), this.getMobileNumber()); + DialableLandLineNumber landLine = 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()); // Create new instance Contact contact = new UserContact(this.getGender(), this.getFirstName(), this.getFamilyName()); - // Check if contact instance is in helper and valid - if (null == contact) { - // Throw NPE - throw new NullPointerException("beanHelper.contact is null"); //NOI18N - } else if (contact.getContactId() == null) { - // Throw NPE again - throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N - } else if (contact.getContactId() < 1) { - // Invalid id - throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N + // Add all others + contact.setContactBirthday(this.getBirthday()); + contact.setContactStreet(this.getStreet()); + contact.setContactHouseNumber(this.getHouseNumber()); + contact.setContactZipCode(this.getZipCode()); + contact.setContactCity(this.getCity()); + contact.setContactCountry(this.getCountry()); + contact.setContactEmailAddress(this.getEmailAddress()); + contact.setContactBirthday(this.getBirthday()); + contact.setContactComment(this.getComment()); + + // Set ownContact + contact.setContactOwnContact(Boolean.TRUE); + + // Don't set null or wrong references + if ((landLine instanceof DialableLandLineNumber) && (landLine.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) { + // Now the number must be given + if (landLine.getPhoneAreaCode() == null) { + // Is null + throw new NullPointerException("phone.phoneAreaCode is null"); //NOI18N + } else if (landLine.getPhoneAreaCode() < 1) { + // Abort here + throw new IllegalArgumentException("phone.phoneAreaCode is zero or below."); //NOI18N + } else if (landLine.getPhoneNumber() == null) { + // Is null + throw new NullPointerException("phone.phoneNumber is null"); //NOI18N + } else if (landLine.getPhoneNumber() < 1) { + // Abort here + throw new IllegalArgumentException("phone.phoneNumber is zero or below."); //NOI18N + } + + // Set phone number + contact.setContactLandLineNumber(landLine); } - // Update all data in contact - this.updateContactData(contact); + // Don't set null or wrong references + if ((fax instanceof DialableFaxNumber) && (fax.getPhoneCountry() instanceof Country) && (this.getFaxAreaCode() != null) && (this.getFaxNumber() != null) && (this.getFaxAreaCode() > 0) && (this.getFaxNumber() > 0)) { + // Now the number must be given + if (fax.getPhoneAreaCode() == null) { + // Is null + throw new NullPointerException("fax.phoneAreaCode is null"); //NOI18N + } else if (fax.getPhoneAreaCode() < 1) { + // Abort here + throw new IllegalArgumentException("fax.phoneAreaCode is zero or below."); //NOI18N + } else if (fax.getPhoneNumber() == null) { + // Is null + throw new NullPointerException("fax.phoneNumber is null"); //NOI18N + } else if (fax.getPhoneNumber() < 1) { + // Abort here + throw new IllegalArgumentException("fax.phoneNumber is zero or below."); //NOI18N + } - // Call EJB for updating contact data - Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked); + // Set fax number + contact.setContactFaxNumber(fax); + } - // Fire event - this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact)); + // Is the provider set? + if ((mobile instanceof DialableMobileNumber) && (this.getMobileProvider() instanceof MobileProvider) && (this.getMobileNumber() != null) && (this.getMobileNumber() > 0)) { + // Is the number set? + if (mobile.getPhoneNumber() == null) { + // Is null + throw new NullPointerException("cellphone.phoneNumber is null"); //NOI18N + } else if (mobile.getPhoneNumber() < 1) { + // Abort here + throw new IllegalArgumentException("cellphone.phoneNumber is zero or below."); //NOI18N + } - // Clear bean - this.clear(); + // Set cellphone number + contact.setContactMobileNumber(mobile); + } // Return it return contact; @@ -415,7 +489,7 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll this.updateContactData(contact); // Call EJB for updating contact data - Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked); + Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked); // Fire event this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact)); @@ -509,6 +583,17 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll this.contactId = contactId; } + @Override + public String getControllerType () { + return "admin"; //NOI18N + } + + @Override + @Deprecated + public void setControllerType (final String controllerType) { + throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N + } + @Override public Country getCountry () { return this.country; @@ -620,73 +705,73 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll } @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 MobileProvider getMobileCarrier () { - return this.mobileCarrier; + public Country getLandLineCountry () { + return this.landLineCountry; } @Override - public void setMobileCarrier (final MobileProvider mobileCarrier) { - this.mobileCarrier = mobileCarrier; + public void setLandLineCountry (final Country landLineCountry) { + this.landLineCountry = landLineCountry; } @Override - public Long getMobileId () { - return this.mobileId; + public Long getLandLineId () { + return this.landLineId; } @Override - public void setMobileId (final Long mobileId) { - this.mobileId = mobileId; + public void setLandLineId (final Long landLineId) { + this.landLineId = landLineId; } @Override - public Long getMobileNumber () { - return this.mobileNumber; + public Long getLandLineNumber () { + return this.landLineNumber; } @Override - public void setMobileNumber (Long mobileNumber) { - this.mobileNumber = mobileNumber; + public void setLandLineNumber (final Long landLineNumber) { + this.landLineNumber = landLineNumber; } @Override - public Integer getPhoneAreaCode () { - return this.phoneAreaCode; + public Long getMobileId () { + return this.mobileId; } @Override - public void setPhoneAreaCode (final Integer phoneAreaCode) { - this.phoneAreaCode = phoneAreaCode; + public void setMobileId (final Long mobileId) { + this.mobileId = mobileId; } @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 @@ -730,7 +815,10 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll Context context = new InitialContext(); // Try to lookup - this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N + this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N + + // Try to lookup (administative) + this.adminContactBean = (AdminContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/adminContact!org.mxchange.jcontacts.contact.AdminContactSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); @@ -755,7 +843,6 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll private void clear () { // Clear all data // - personal data - this.setGender(null); this.setTitle(null); this.setFirstName(null); this.setFamilyName(null); @@ -768,10 +855,10 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll // - contact data this.setEmailAddress(null); - this.setPhoneCountry(null); - this.setPhoneAreaCode(null); - this.setPhoneNumber(null); - this.setMobileCarrier(null); + this.setLandLineCountry(null); + this.setLandLineAreaCode(null); + this.setLandLineNumber(null); + this.setMobileProvider(null); this.setMobileNumber(null); this.setFaxCountry(null); this.setFaxAreaCode(null); @@ -843,11 +930,11 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsControll contact.setContactCity(this.getCity()); contact.setContactCountry(this.getCountry()); - // Update contact's mobile number - this.isMobileUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileCarrier(), this.getMobileNumber()); + // Update contact's cellphone number + this.isMobileNumberUnlinked = ContactUtils.updateMobileNumber(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()); diff --git a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestController.java index f9c7e8b0..25c7153d 100644 --- a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestController.java +++ b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestController.java @@ -62,18 +62,18 @@ public interface FinancialsAdminContactWebRequestController extends Serializable String editContactData (); /** - * Getter for mobile id + * Getter for cellphone id *

* @return Mobile id */ Long getMobileId (); /** - * Setter for mobile id + * Setter for cellphone id *

- * @param mobileId Mobile id + * @param cellphoneId Mobile id */ - void setMobileId (final Long mobileId); + void setMobileId (final Long cellphoneId); /** * Getter for fax id @@ -118,28 +118,28 @@ public interface FinancialsAdminContactWebRequestController extends Serializable void setBirthday (final Date birthday); /** - * Getter for mobile number's carrier + * Getter for ellphone number's carrier *

* @return Mobile number's carrier */ - MobileProvider getMobileCarrier (); + MobileProvider getMobileProvider (); /** - * Setter for mobile number's carrier prefix + * Setter for cellphone number's carrier prefix *

- * @param mobileCarrier Mobile number's carrier prefix + * @param cellphoneCarrier Mobile number's carrier prefix */ - void setMobileCarrier (final MobileProvider mobileCarrier); + void setMobileProvider (final MobileProvider cellphoneCarrier); /** - * Getter for mobile number + * Getter for ellphone number *

* @return Mobile number */ Long getMobileNumber (); /** - * Setter for mobile number + * Setter for ellphone number *

* @param mobileNumber Mobile number */ @@ -333,42 +333,42 @@ public interface FinancialsAdminContactWebRequestController extends Serializable *

* @return Phone number's area code */ - Integer getPhoneAreaCode (); + Integer getLandLineAreaCode (); /** * Setter for phone number's area code *

* @param phoneAreaCode Phone number's area code */ - void setPhoneAreaCode (final Integer phoneAreaCode); + void setLandLineAreaCode (final Integer phoneAreaCode); /** * Getter for phone number's country instance *

* @return Phone number's country instance */ - Country getPhoneCountry (); + Country getLandLineCountry (); /** * Setter for phone number's country instance *

* @param phoneCountry Phone number's country instance */ - void setPhoneCountry (final Country phoneCountry); + void setLandLineCountry (final Country phoneCountry); /** * Getter for phone number *

* @return Phone number */ - Long getPhoneNumber (); + Long getLandLineNumber (); /** * Setter for phone number *

* @param phoneNumber Phone number */ - void setPhoneNumber (final Long phoneNumber); + void setLandLineNumber (final Long phoneNumber); /** * Street @@ -412,6 +412,23 @@ public interface FinancialsAdminContactWebRequestController extends Serializable */ void setZipCode (final Integer zipCode); + /** + * Getter for controller type + *

+ * @return controller type + */ + String getControllerType (); + + /** + * Setter for controller type + *

+ * @param controllerType Controller type + *

+ * @deprecated Don't use this method + */ + @Deprecated + void setControllerType (final String controllerType); + /** * Returns a text respresentation of given phone number or null if not set. *

@@ -422,7 +439,7 @@ public interface FinancialsAdminContactWebRequestController extends Serializable String generatePhoneNumber (final DialableNumber phoneNumber); /** - * Returns a text representation of given mobile number or null if not + * Returns a text representation of given cellphone number or null if not * set. *

* @param mobileNumber Mobile number diff --git a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionBean.java b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionBean.java index 1f12d8e7..66d1fbab 100644 --- a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionBean.java +++ b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionBean.java @@ -174,29 +174,29 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im private boolean isMobileUnlinked; /** - * Mobile number's carrier + * Phone number area code */ - private MobileProvider mobileCarrier; + private Integer landLineAreaCode; /** - * Mobile number + * Country instance for phone number */ - private Long mobileNumber; + private Country landLineCountry; /** - * Phone number area code + * Phone number */ - private Integer phoneAreaCode; + private Long landLineNumber; /** - * Country instance for phone number + * Mobile number */ - private Country phoneCountry; + private Long mobileNumber; /** - * Phone number + * Mobile number's carrier */ - private Long phoneNumber; + private MobileProvider mobileProvider; /** * A list of all selectable contacts @@ -465,8 +465,8 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im assert (this.isRequiredPersonalDataSet()) : "not all personal data is set"; //NOI18N // Generate phone number - DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber()); - DialableMobileNumber mobile = new MobileNumber(this.getMobileCarrier(), this.getMobileNumber()); + 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()); // Create new contact @@ -482,7 +482,7 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im contact.setContactComment(this.getComment()); // 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 @@ -524,7 +524,7 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im } // Is the provider set? - if ((mobile instanceof DialableMobileNumber) && (this.getMobileCarrier() instanceof MobileProvider) && (this.getMobileNumber() != null) && (this.getMobileNumber() > 0)) { + if ((mobile instanceof DialableMobileNumber) && (this.getMobileProvider() instanceof MobileProvider) && (this.getMobileNumber() != null) && (this.getMobileNumber() > 0)) { // Is the number set? if (mobile.getPhoneNumber() == null) { // Is null @@ -577,10 +577,10 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im contact.setContactCountry(this.getCountry()); // Update contact's mobile number - this.isMobileUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileCarrier(), this.getMobileNumber()); + this.isMobileUnlinked = ContactUtils.updateMobileNumber(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()); @@ -746,53 +746,53 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im } @Override - public MobileProvider getMobileCarrier () { - return this.mobileCarrier; + public Integer getLandLineAreaCode () { + return this.landLineAreaCode; } @Override - public void setMobileCarrier (final MobileProvider mobileCarrier) { - this.mobileCarrier = mobileCarrier; + 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 (final Long mobileNumber) { - this.mobileNumber = mobileNumber; + 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 (final 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 @@ -1023,10 +1023,10 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im // - contact data this.setEmailAddress(null); this.setEmailAddressRepeat(null); - this.setPhoneAreaCode(null); - this.setPhoneCountry(null); - this.setPhoneNumber(null); - this.setMobileCarrier(null); + this.setLandLineAreaCode(null); + this.setLandLineCountry(null); + this.setLandLineNumber(null); + this.setMobileProvider(null); this.setMobileNumber(null); this.setFaxAreaCode(null); this.setFaxCountry(null); @@ -1078,13 +1078,13 @@ public class FinancialsContactWebSessionBean extends BaseFinancialsController im // - 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)) { - this.setMobileCarrier(mobile.getMobileProvider()); + this.setMobileProvider(mobile.getMobileProvider()); this.setMobileNumber(mobile.getPhoneNumber()); } diff --git a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionController.java b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionController.java index b0b8b8ac..281138ac 100644 --- a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionController.java +++ b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionController.java @@ -91,14 +91,14 @@ public interface FinancialsContactWebSessionController extends Serializable { *

* @return Mobile number's carrier */ - MobileProvider getMobileCarrier (); + MobileProvider getMobileProvider (); /** * Setter for mobile number's carrier prefix *

* @param mobileCarrier Mobile number's carrier prefix */ - void setMobileCarrier (final MobileProvider mobileCarrier); + void setMobileProvider (final MobileProvider mobileCarrier); /** * Getter for mobile number @@ -302,42 +302,42 @@ public interface FinancialsContactWebSessionController extends Serializable { *

* @return Phone number's area code */ - Integer getPhoneAreaCode (); + Integer getLandLineAreaCode (); /** * Setter for phone number's area code *

* @param phoneAreaCode Phone number's area code */ - void setPhoneAreaCode (final Integer phoneAreaCode); + void setLandLineAreaCode (final Integer phoneAreaCode); /** * Getter for phone number's country instance *

* @return Phone number's country instance */ - Country getPhoneCountry (); + Country getLandLineCountry (); /** * Setter for phone number's country instance *

* @param phoneCountry Phone number's country instance */ - void setPhoneCountry (final Country phoneCountry); + void setLandLineCountry (final Country phoneCountry); /** * Getter for phone number *

* @return Phone number */ - Long getPhoneNumber (); + Long getLandLineNumber (); /** * Setter for phone number *

* @param phoneNumber Phone number */ - void setPhoneNumber (final Long phoneNumber); + void setLandLineNumber (final Long phoneNumber); /** * Street