From 2ff8205adca77061d12b6f3c58a2840fd87df884 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 18 May 2016 14:44:19 +0200 Subject: [PATCH] Continued a bit: - EJBs cannot have access to faces context, better handle it over from the WAR project - renamed method as "AsList" is superflous --- .../model/email_address/PizzaEmailChangeSessionBean.java | 8 ++++---- .../model/register/PizzaUserRegistrationSessionBean.java | 6 +++--- .../beans/resendlink/PizzaResendLinkSessionBean.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java index 35667b0..d09c539 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java @@ -58,7 +58,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement @Override @SuppressWarnings ("unchecked") - public List allQueuedAddressesAsList () { + public List allQueuedAddresses () { // Trace message this.getLoggerBeanLocal().logTrace("allQueuedAddressesAsList: CALLED!"); //NOI18N @@ -76,9 +76,9 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement } @Override - public void enqueueEmailAddressForChange (final ChangeableEmailAddress emailChange) { + public void enqueueEmailAddressForChange (final ChangeableEmailAddress emailChange, final String baseUrl) { // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("enqueueEmailAddressForChange: emailChange={0} - CALLED!", emailChange)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("enqueueEmailAddressForChange: emailChange={0},baseUrl={1} - CALLED!", emailChange, baseUrl)); //NOI18N // Email address change should be valid if (null == emailChange) { @@ -123,7 +123,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement } // Send email - this.sendEmail("Email change", "email_change", emailAddress, emailChange.getEmailChangeUser()); //NOI18N + this.sendEmail("Email change", "email_change", emailAddress, emailChange.getEmailChangeUser(), baseUrl); //NOI18N // Trace message this.getLoggerBeanLocal().logTrace("enqueueEmailAddressForChange - EXIT!"); //NOI18N diff --git a/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java b/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java index bad0d8e..3380160 100644 --- a/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java @@ -136,9 +136,9 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl } @Override - public User registerUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException { + public User registerUser (final User user, final String baseUrl) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException { // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("registerUser: user={0} - CALLED!", user)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("registerUser: user={0},baseUrl={1} - CALLED!", user, baseUrl)); //NOI18N // user should not be null if (null == user) { @@ -180,7 +180,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl // Send email // TODO: Internationlize the subject line somehow - this.sendEmail("Registration", "registration", emailAddress, addedUser); //NOI18N + this.sendEmail("Registration", "registration", emailAddress, addedUser, baseUrl); //NOI18N // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("registerUser: addedUser={0},addedUser.userId={1} - EXIT!", addedUser, addedUser.getUserId())); //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkSessionBean.java index 2b95826..015d882 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkSessionBean.java @@ -42,9 +42,9 @@ public class PizzaResendLinkSessionBean extends BasePizzaDatabaseBean implements private static final long serialVersionUID = 71_546_726_857_195_360L; @Override - public String resendConfirmationLink (final User user, final Locale locale) { + public String resendConfirmationLink (final User user, final Locale locale, final String baseUrl) { // Log trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("resendConfirmationLink: user={0},locale={1} - CALLED!", user, locale)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("resendConfirmationLink: user={0},locale={1},baseUrl={2} - CALLED!", user, locale, baseUrl)); //NOI18N // The user instance should be valid if (null == user) { @@ -82,7 +82,7 @@ public class PizzaResendLinkSessionBean extends BasePizzaDatabaseBean implements // Send email // TODO: Internationlize the subject line somehow - this.sendEmail("Resend confirmation link", "resend_confirmation_link", emailAddress, user); //NOI18N + this.sendEmail("Resend confirmation link", "resend_confirmation_link", emailAddress, user, baseUrl); //NOI18N // Log trace message this.getLoggerBeanLocal().logTrace("resendConfirmationLink: CALLED!"); //NOI18N -- 2.39.5