import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;
-import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
import org.mxchange.jcontacts.events.fax.linked.ObservableAdminLinkedFaxNumberEvent;
import org.mxchange.jcontacts.events.landline.linked.ObservableAdminLinkedLandLineNumberEvent;
import org.mxchange.jcontacts.events.mobile.linked.ObservableAdminLinkedMobileNumberEvent;
-import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jjobs.beans.BaseJobsBean;
import org.mxchange.jphone.events.fax.deleted.AdminDeletedFaxNumberEvent;
import org.mxchange.jphone.events.fax.updated.AdminUpdatedFaxNumberEvent;
import org.mxchange.jphone.events.landline.deleted.AdminDeletedLandLineNumberEvent;
import org.mxchange.jphone.events.mobile.updated.AdminUpdatedMobileNumberEvent;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.model.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.model.phonenumbers.phone.PhoneSessionBeanRemote;
import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
*/
@Named ("phoneController")
@RequestScoped
-public class JobsPhoneWebRequestBean extends BaseJobsController implements JobsPhoneWebRequestController {
+public class JobsPhoneWebRequestBean extends BaseJobsBean implements JobsPhoneWebRequestController {
/**
* Serial number
/**
* General EJB for phone numbers
*/
- @EJB (lookup = "java:global/jjobs-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote")
+ @EJB (lookup = "java:global/jjobs-ejb/phone!org.mxchange.jphone.model.phonenumbers.phone.PhoneSessionBeanRemote")
private PhoneSessionBeanRemote phoneBean;
/**
// Is cache there?
if (!this.faxNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableFaxNumber> list = this.phoneBean.allFaxNumbers();
+ final List<DialableFaxNumber> faxNumbers = this.phoneBean.allFaxNumbers();
// Add all
- for (final Iterator<DialableFaxNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableFaxNumber next = iterator.next();
-
+ for (final DialableFaxNumber faxNumber : faxNumbers) {
// Add it to cache
- this.faxNumberCache.put(next.getPhoneId(), next);
+ this.faxNumberCache.put(faxNumber.getPhoneId(), faxNumber);
}
}
// Is cache there?
if (!this.landLineNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableLandLineNumber> list = this.phoneBean.allLandLineNumbers();
+ final List<DialableLandLineNumber> lineNumbers = this.phoneBean.allLandLineNumbers();
// Add all
- for (final Iterator<DialableLandLineNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableLandLineNumber next = iterator.next();
-
+ for (final DialableLandLineNumber lineNumber : lineNumbers) {
// Add it to cache
- this.landLineNumberCache.put(next.getPhoneId(), next);
+ this.landLineNumberCache.put(lineNumber.getPhoneId(), lineNumber);
}
}
// Is cache there?
if (!this.mobileNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableMobileNumber> list = this.phoneBean.allMobileNumbers();
+ final List<DialableMobileNumber> mobileNumbers = this.phoneBean.allMobileNumbers();
// Add all
- for (final Iterator<DialableMobileNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableMobileNumber next = iterator.next();
-
+ for (final DialableMobileNumber mobileNumber : mobileNumbers) {
// Add it to cache
- this.mobileNumberCache.put(next.getPhoneId(), next);
+ this.mobileNumberCache.put(mobileNumber.getPhoneId(), mobileNumber);
}
}
}