- EJBs cannot have access to faces context, better handle it over from the WAR project
- renamed method as "AsList" is superflous
@Override
@SuppressWarnings ("unchecked")
- public List<String> allQueuedAddressesAsList () {
+ public List<String> allQueuedAddresses () {
// Trace message
this.getLoggerBeanLocal().logTrace("allQueuedAddressesAsList: CALLED!"); //NOI18N
}
@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) {
}
// 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
}
@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) {
// 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
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) {
// 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