import java.util.List;
import java.util.Objects;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;
-import org.mxchange.jcontacts.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.jcontacts.model.contact.Contact;
import org.mxchange.jjobs.beans.BaseJobsController;
import org.mxchange.jphone.events.fax.deleted.AdminDeletedFaxNumberEvent;
import org.mxchange.jphone.events.fax.updated.AdminUpdatedFaxNumberEvent;
import org.mxchange.jphone.events.landline.updated.AdminUpdatedLandLineNumberEvent;
import org.mxchange.jphone.events.mobile.deleted.AdminDeletedMobileNumberEvent;
import org.mxchange.jphone.events.mobile.updated.AdminUpdatedMobileNumberEvent;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
-import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.phone.PhoneSessionBeanRemote;
import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
/**
@SuppressWarnings ("ReturnOfCollectionOrArrayField")
public List<DialableFaxNumber> allFaxNumbers () {
// Init list
- List<DialableFaxNumber> list = new LinkedList<>();
+ final List<DialableFaxNumber> list = new LinkedList<>();
// Get iterator
- Iterator<Cache.Entry<Long, DialableFaxNumber>> iterator = this.faxNumberCache.iterator();
+ final Iterator<Cache.Entry<Long, DialableFaxNumber>> iterator = this.faxNumberCache.iterator();
// Loop over all
while (iterator.hasNext()) {
@SuppressWarnings ("ReturnOfCollectionOrArrayField")
public List<DialableLandLineNumber> allLandLineNumbers () {
// Init list
- List<DialableLandLineNumber> list = new LinkedList<>();
+ final List<DialableLandLineNumber> list = new LinkedList<>();
// Get iterator
- Iterator<Cache.Entry<Long, DialableLandLineNumber>> iterator = this.landLineNumberCache.iterator();
+ final Iterator<Cache.Entry<Long, DialableLandLineNumber>> iterator = this.landLineNumberCache.iterator();
// Loop over all
while (iterator.hasNext()) {
@SuppressWarnings ("ReturnOfCollectionOrArrayField")
public List<DialableMobileNumber> allMobileNumbers () {
// Init list
- List<DialableMobileNumber> list = new LinkedList<>();
+ final List<DialableMobileNumber> list = new LinkedList<>();
// Get iterator
- Iterator<Cache.Entry<Long, DialableMobileNumber>> iterator = this.mobileNumberCache.iterator();
+ final Iterator<Cache.Entry<Long, DialableMobileNumber>> iterator = this.mobileNumberCache.iterator();
// Loop over all
while (iterator.hasNext()) {
// Is cache there?
if (!this.faxNumberCache.iterator().hasNext()) {
// Get whole list
- List<DialableFaxNumber> list = this.phoneBean.allFaxNumbers();
+ final List<DialableFaxNumber> list = this.phoneBean.allFaxNumbers();
// Add all
for (final Iterator<DialableFaxNumber> iterator = list.iterator(); iterator.hasNext();) {
// Is cache there?
if (!this.landLineNumberCache.iterator().hasNext()) {
// Get whole list
- List<DialableLandLineNumber> list = this.phoneBean.allLandLineNumbers();
+ final List<DialableLandLineNumber> list = this.phoneBean.allLandLineNumbers();
// Add all
for (final Iterator<DialableLandLineNumber> iterator = list.iterator(); iterator.hasNext();) {
// Is cache there?
if (!this.mobileNumberCache.iterator().hasNext()) {
// Get whole list
- List<DialableMobileNumber> list = this.phoneBean.allMobileNumbers();
+ final List<DialableMobileNumber> list = this.phoneBean.allMobileNumbers();
// Add all
for (final Iterator<DialableMobileNumber> iterator = list.iterator(); iterator.hasNext();) {