2 * Copyright (C) 2016 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jjobs.beans.resendlink;
19 import javax.enterprise.context.SessionScoped;
20 import javax.faces.view.facelets.FaceletException;
21 import javax.inject.Named;
22 import javax.naming.Context;
23 import javax.naming.InitialContext;
24 import javax.naming.NamingException;
25 import org.mxchange.jjobs.beans.BaseJobsController;
28 * A web session bean for resending confirmation link
30 * @author Roland Haeder<roland@mxchange.org>
32 @Named ("resendController")
34 public class JobsResendLinkWebSessionBean extends BaseJobsController implements JobsResendLinkWebSessionController {
39 private static final long serialVersionUID = 186_078_724_659_153L;
42 * Email address 1 (changing)
44 private String emailAddress;
47 * EJB for resending confirmation link
49 private ResendLinkSessionBeanRemote emailBean;
54 public JobsResendLinkWebSessionBean () {
57 // Get initial context
58 Context context = new InitialContext();
61 this.emailBean = (ResendLinkSessionBeanRemote) context.lookup("java:global/PizzaService-ejb/resendLink!org.mxchange.pizzaapplication.beans.resendlink.ResendLinkSessionBeanRemote"); //NOI18N
62 } catch (final NamingException e) {
64 throw new FaceletException(e);
69 public String doResendLink () {
70 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
74 public String getEmailAddress () {
75 return this.emailAddress;
79 public void setEmailAddress (final String emailAddress) {
80 this.emailAddress = emailAddress;
84 * Clears email address fields so the user has to re-enter them
86 private void clear () {
88 this.setEmailAddress(null);