X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fjjobs%2Fbeans%2Fphone%2FJobsAdminContactPhoneWebSessionBean.java;h=80a426996e138a32fb1fe465938c1403d31368b0;hb=fe57297eeb81553d228fe9ee795992216479cdd2;hp=e54617fb132e15f19ecd3e86452b3dde01228f6d;hpb=4f8dd938834e909ac5e1317185e6e63f2009a95d;p=jjobs-war.git diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java index e54617fb..80a42699 100644 --- a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java @@ -19,7 +19,7 @@ package org.mxchange.jjobs.beans.phone; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.enterprise.context.SessionScoped; +import javax.enterprise.context.RequestScoped; import javax.faces.view.facelets.FaceletException; import javax.inject.Named; import javax.naming.Context; @@ -27,18 +27,19 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote; +import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; /** - * Administrative bean (controller) for contact's phone numbers + * Administrative bean (controller) for phone numbers *

* @author Roland Haeder */ -@Named ("adminContactPhoneController") -@SessionScoped -public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhoneWebSessionController { +@Named ("adminPhoneController") +@RequestScoped +public class JobsAdminContactPhoneWebSessionBean extends BaseJobsController implements JobsAdminContactPhoneWebSessionController { /** * Serial number @@ -57,13 +58,19 @@ public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhon /** * Instance of linked contact account + *

+ * @deprecated This is a generic phone controller, not just for contact data */ + @Deprecated private Contact contact; /** * "Cache" for contact lists, mostly only one is assigned. So this cache * shouldn't grow beyond control. + *

+ * @deprecated This is a generic phone controller, not just for contact data */ + @Deprecated private final Map> contacts; /** @@ -86,7 +93,7 @@ public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhon Context context = new InitialContext(); // Try to lookup the beans - this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/PizzaService-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N + this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw it again throw new FaceletException(e); @@ -97,6 +104,7 @@ public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhon } @Override + @Deprecated public List allCellphoneContacts () { // Get id Long phoneId = this.getCellPhone().getPhoneId(); @@ -128,11 +136,13 @@ public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhon } @Override + @Deprecated public Contact getContact () { return this.contact; } @Override + @Deprecated public void setContact (final Contact contact) { this.contact = contact; } @@ -157,15 +167,4 @@ public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhon this.landLine = landLine; } - /** - * Clears this bean - */ - private void clear () { - // Clear all instances - this.setCellPhone(null); - this.setFax(null); - this.setLandLine(null); - this.setContact(null); - } - }