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
// .. 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());
}
}
}
@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
// - 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);
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());
* <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
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
}
// 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());
// 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
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());
}
@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
// - 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);
// - 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)) {
* <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
</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>
</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>