]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Wed, 18 May 2016 12:44:19 +0000 (14:44 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 26 May 2016 13:16:38 +0000 (15:16 +0200)
- EJBs cannot have access to faces context, better handle it over from the WAR project
- renamed method as "AsList" is superflous

src/java/org/mxchange/jjobs/beans/resendlink/JobsResendLinkSessionBean.java
src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java
src/java/org/mxchange/jusercore/model/register/JobsUserRegistrationSessionBean.java

index 4a2ebd8a9eb1a4c41cbd0de3621a75c8caf87725..bb016e79348a889065fd95996b9b770053c77774 100644 (file)
@@ -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
index d2451b0f698d23fbee6679de37ae3c9d1b8a7411..880d952e131f164a0e4b8c75478c186f55f60664 100644 (file)
@@ -58,7 +58,7 @@ public class JobsEmailChangeSessionBean extends BaseJobsDatabaseBean implements
 
        @Override
        @SuppressWarnings ("unchecked")
-       public List<String> allQueuedAddressesAsList () {
+       public List<String> 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
index ef28ce3412aad8b6b2a10badfad46a3ff241f66b..84677d9b4f16ae4894caacff1aa2fd4020d902f3 100644 (file)
@@ -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