From: Roland Häder Date: Wed, 18 May 2016 12:44:19 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=61dd00186bbae11cdd705124193e1812d8120d6f;p=jjobs-ejb.git Continued a bit: - EJBs cannot have access to faces context, better handle it over from the WAR project - renamed method as "AsList" is superflous --- diff --git a/src/java/org/mxchange/jjobs/beans/resendlink/JobsResendLinkSessionBean.java b/src/java/org/mxchange/jjobs/beans/resendlink/JobsResendLinkSessionBean.java index 4a2ebd8..bb016e7 100644 --- a/src/java/org/mxchange/jjobs/beans/resendlink/JobsResendLinkSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/resendlink/JobsResendLinkSessionBean.java @@ -41,9 +41,9 @@ public class JobsResendLinkSessionBean extends BaseJobsDatabaseBean implements R 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) { @@ -81,7 +81,7 @@ public class JobsResendLinkSessionBean extends BaseJobsDatabaseBean implements R // 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 diff --git a/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java index d2451b0..880d952 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java @@ -58,7 +58,7 @@ public class JobsEmailChangeSessionBean extends BaseJobsDatabaseBean implements @Override @SuppressWarnings ("unchecked") - public List allQueuedAddressesAsList () { + public List allQueuedAddresses () { // Trace message this.getLoggerBeanLocal().logTrace("allQueuedAddressesAsList: CALLED!"); //NOI18N @@ -76,9 +76,9 @@ public class JobsEmailChangeSessionBean extends BaseJobsDatabaseBean implements } @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 JobsEmailChangeSessionBean extends BaseJobsDatabaseBean implements } // 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/JobsUserRegistrationSessionBean.java b/src/java/org/mxchange/jusercore/model/register/JobsUserRegistrationSessionBean.java index ef28ce3..84677d9 100644 --- a/src/java/org/mxchange/jusercore/model/register/JobsUserRegistrationSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/register/JobsUserRegistrationSessionBean.java @@ -136,9 +136,9 @@ public class JobsUserRegistrationSessionBean extends BaseJobsDatabaseBean implem } @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 JobsUserRegistrationSessionBean extends BaseJobsDatabaseBean implem // 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