import org.mxchange.jcountry.data.Country;
import org.mxchange.jphone.phonenumbers.DialableNumber;
import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
this.setZipCode(contact.getContactZipCode());
// Is the cell phone set?
- if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) {
+ if (contact.getContactMobileNumber() instanceof DialableMobileNumber) {
// ... cellphone data
- this.setCellphoneId(contact.getContactCellphoneNumber().getPhoneId());
- this.setCellphoneCarrier(contact.getContactCellphoneNumber().getCellphoneProvider());
- this.setCellphoneNumber(contact.getContactCellphoneNumber().getPhoneNumber());
+ this.setCellphoneId(contact.getContactMobileNumber().getPhoneId());
+ this.setCellphoneCarrier(contact.getContactMobileNumber().getCellphoneProvider());
+ this.setCellphoneNumber(contact.getContactMobileNumber().getPhoneNumber());
}
// Is the fax set?
// Generate phone number
DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
- DialableCellphoneNumber cellphone = new CellphoneNumber(this.getCellphoneCarrier(), this.getCellphoneNumber());
+ DialableMobileNumber cellphone = new CellphoneNumber(this.getCellphoneCarrier(), this.getCellphoneNumber());
DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Create new instance
}
// Is the provider set?
- if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof MobileProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) {
+ if ((cellphone instanceof DialableMobileNumber) && (this.getCellphoneCarrier() instanceof MobileProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) {
// Is the number set?
if (cellphone.getPhoneNumber() == null) {
// Is null
}
@Override
- public String generateCellphoneNumber (final DialableCellphoneNumber cellphoneNumber) {
+ public String generateCellphoneNumber (final DialableMobileNumber cellphoneNumber) {
// Is it null?
if (null == cellphoneNumber) {
// Return null
import org.mxchange.jcontacts.contact.gender.Gender;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jphone.phonenumbers.DialableNumber;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
/**
void copyContactToController (final Contact contact);
/**
- * Edits cuirrently loaded contact's data in database.
+ * Edits currently loaded contact's data in database.
* <p>
* @return Redirect outcome
*/
* <p>
* @return Text respresentation or null
*/
- String generateCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
+ String generateCellphoneNumber (final DialableMobileNumber cellphoneNumber);
/**
* Checks/returns whether the gender/salutation is required for this
import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
// Generate phone number
DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
- DialableCellphoneNumber cellphone = new CellphoneNumber(this.getCellphoneCarrier(), this.getCellphoneNumber());
+ DialableMobileNumber cellphone = new CellphoneNumber(this.getCellphoneCarrier(), this.getCellphoneNumber());
DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Create new contact
}
// Is the provider set?
- if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof MobileProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) {
+ if ((cellphone instanceof DialableMobileNumber) && (this.getCellphoneCarrier() instanceof MobileProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) {
// Is the number set?
if (cellphone.getPhoneNumber() == null) {
// Is null
this.setComment(contact.getContactComment());
// Get cellphone, phone and fax instance
- DialableCellphoneNumber cellphone = contact.getContactCellphoneNumber();
+ DialableMobileNumber cellphone = contact.getContactMobileNumber();
DialableFaxNumber fax = contact.getContactFaxNumber();
DialableLandLineNumber phone = contact.getContactLandLineNumber();
this.setPhoneNumber(phone.getPhoneNumber());
}
- if ((cellphone instanceof DialableCellphoneNumber) && (cellphone.getCellphoneProvider() instanceof MobileProvider)) {
+ if ((cellphone instanceof DialableMobileNumber) && (cellphone.getCellphoneProvider() instanceof MobileProvider)) {
this.setCellphoneCarrier(cellphone.getCellphoneProvider());
this.setCellphoneNumber(cellphone.getPhoneNumber());
}
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote;
import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
/**
* All cell phone numbers
*/
- private final List<DialableCellphoneNumber> cellphoneNumbers;
+ private final List<DialableMobileNumber> cellphoneNumbers;
/**
* General contact controller
Contact contact = event.getAddedContact();
// Is cellphone set?
- if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) {
+ if (contact.getContactMobileNumber() instanceof DialableMobileNumber) {
// Unique-add it
- this.uniqueAddCellphoneNumber(contact.getContactCellphoneNumber());
+ this.uniqueAddCellphoneNumber(contact.getContactMobileNumber());
}
// Clear this bean
}
@Override
- public List<Contact> allCellphoneContacts () {
+ public List<Contact> allMobileContacts () {
// Get id
- Long phoneId = this.adminPhoneController.getCellPhone().getPhoneId();
+ Long phoneId = this.adminPhoneController.getCellphone().getPhoneId();
// Is cache there?
if (this.contacts.containsKey(phoneId)) {
// "Walk" through all contacts
for (final Contact contact : this.contactController.allContacts()) {
// Is cellphone instance the same?
- if (Objects.equals(contact.getContactCellphoneNumber(), this.adminPhoneController.getCellPhone())) {
+ if (Objects.equals(contact.getContactMobileNumber(), this.adminPhoneController.getCellphone())) {
// Found one
list.add(contact);
}
* <p>
* @return List of all linked contacts
*/
- List<Contact> allCellphoneContacts ();
+ List<Contact> allMobileContacts ();
/**
* Event observer for newly added users by adminstrator
import javax.inject.Named;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcustomercore.model.customer.Customer;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jusercore.model.user.User;
}
// Is cellphone set?
- if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) {
+ if (contact.getContactMobileNumber() instanceof DialableMobileNumber) {
// Yes, then set it in admin controller
- this.adminPhoneController.setCellPhone(contact.getContactCellphoneNumber());
+ this.adminPhoneController.setMobileNumber(contact.getContactMobileNumber());
}
// Is land-line set?
if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
// Yes, then set it in admin controller
- this.adminPhoneController.setLandLine(contact.getContactLandLineNumber());
+ this.adminPhoneController.setLandLineNumber(contact.getContactLandLineNumber());
}
// Is fax set?
if (contact.getContactFaxNumber() instanceof DialableFaxNumber) {
// Yes, then set it in admin controller
- this.adminPhoneController.setFax(contact.getContactFaxNumber());
+ this.adminPhoneController.setFaxNumber(contact.getContactFaxNumber());
}
}
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
/**
* Cell phone number
*/
- private DialableCellphoneNumber cellPhone;
+ private DialableMobileNumber cellPhone;
/**
* Fax number
}
@Override
- public DialableCellphoneNumber getCellPhone () {
+ public DialableMobileNumber getMobileNumber () {
return this.cellPhone;
}
@Override
- public void setCellPhone (final DialableCellphoneNumber cellPhone) {
+ public void setMobileNumber (final DialableMobileNumber cellPhone) {
this.cellPhone = cellPhone;
}
@Override
- public DialableFaxNumber getFax () {
+ public DialableFaxNumber getFaxNumber () {
return this.fax;
}
@Override
- public void setFax (final DialableFaxNumber fax) {
+ public void setFaxNumber (final DialableFaxNumber fax) {
this.fax = fax;
}
@Override
- public DialableLandLineNumber getLandLine () {
+ public DialableLandLineNumber getLandLineNumber () {
return this.landLine;
}
@Override
- public void setLandLine (final DialableLandLineNumber landLine) {
+ public void setLandLineNumber (final DialableLandLineNumber landLine) {
this.landLine = landLine;
}
import java.io.Serializable;
import javax.ejb.Local;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
/**
* An interface for a request web controller (bean) for administrative phone
public interface PizzaAdminPhoneWebRequestController extends Serializable {
/**
- * Getter for dialable cellphone number instance
+ * Getter for dialable mobile number instance
* <p>
- * @return Dialable cellphone number instance
+ * @return Dialable mobile number instance
*/
- DialableCellphoneNumber getCellPhone ();
+ DialableMobileNumber getMobileNumber ();
/**
* Setter for dialable land-line number instance
* <p>
* @param landLine Dialable land-line number instance
*/
- void setLandLine (final DialableLandLineNumber landLine);
+ void setLandLineNumber (final DialableLandLineNumber landLine);
/**
* Getter for dialable land-line number instance
* <p>
* @return Dialable land-line number instance
*/
- DialableLandLineNumber getLandLine ();
+ DialableLandLineNumber getLandLineNumber ();
/**
* Setter for dialable fax number instance
* <p>
* @param fax Dialable fax number instance
*/
- void setFax (final DialableFaxNumber fax);
+ void setFaxNumber (final DialableFaxNumber fax);
/**
* Getter for dialable fax number instance
* <p>
* @return Dialable fax number instance
*/
- DialableFaxNumber getFax ();
+ DialableFaxNumber getFaxNumber ();
/**
- * Setter for dialable cellphone number instance
+ * Setter for dialable mobile number instance
* <p>
- * @param cellPhone Dialable cellphone number instance
+ * @param mobileNumber Dialable mobile number instance
*/
- void setCellPhone (final DialableCellphoneNumber cellPhone);
+ void setMobileNumber (final DialableMobileNumber mobileNumber);
}
String addUser ();
/**
- * Edits cuirrently loaded user's data in database.
+ * Edits currently loaded user's data in database.
* <p>
* @return Redirect outcome
*/
import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
import org.mxchange.jphone.phonenumbers.DialableNumber;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
/**
}
// Init instance
- DialableCellphoneNumber cellphone = null;
+ DialableMobileNumber cellphone = null;
try {
// Try to parse the value as long
<ui:param name="isShowPage" value="#{true}" />
</ui:include>
- <h:dataTable id="contact_cellphone_link" var="contact" value="#{contactPhoneController.allCellphoneContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE_LINKS}" headerClass="table_header_column" styleClass="table_medium">
+ <h:dataTable id="contact_cellphone_link" var="contact" value="#{contactPhoneController.allMobileContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE_LINKS}" headerClass="table_header_column" styleClass="table_medium">
<f:facet name="header">
<h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_LINKS}">
<f:param value="#{adminPhoneController.cellPhone.phoneId}" />