]> git.mxchange.org Git - pizzaservice-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>
Fri, 20 May 2016 21:19:54 +0000 (23:19 +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/jusercore/model/email_address/PizzaEmailChangeSessionBean.java
src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkSessionBean.java

index 35667b02bed4e3c27f24ef78ce214b16509a5ff1..d09c5395f9c9cf6d2eeaacd0716213d3bc291ea1 100644 (file)
@@ -58,7 +58,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
 
        @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 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
index bad0d8ece8bb0836befb4d80a29503f206259e35..3380160e52c1789d83d3da116c53f49787a4aed8 100644 (file)
@@ -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
index 2b958268bf5556246945b507cf1143cd4419c4d5..015d8823ec7cb4c374ac8d628829eb785e3a7424 100644 (file)
@@ -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