com.atlassian.confluence.plugins.dailysummary.components.impl
Class DefaultSummaryEmailService

java.lang.Object
  extended by com.atlassian.confluence.plugins.dailysummary.components.impl.DefaultSummaryEmailService
All Implemented Interfaces:
SummaryEmailService

public class DefaultSummaryEmailService
extends Object
implements SummaryEmailService


Field Summary
protected static String MAIL_QUEUE_NAME
           
 
Constructor Summary
DefaultSummaryEmailService(SummaryEmailTaskFactory taskFactory, com.atlassian.core.task.MultiQueueTaskManager taskManager, SummaryEmailContentGenerator contentGenerator, SummaryEmailNotificationManager notificationManager, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, VelocityHelperService velocityHelper)
           
 
Method Summary
 Map getContext(com.atlassian.user.User user, Date date)
          Exposes the context required to render the daily summary email.
 void sendEmail(com.atlassian.user.User user, Date date)
          Send a summary email to a user with content generate with respect to the given date.
 int sendEmailForDate(Date date)
          Send email to any users that have mail enabled for the specific datetime.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIL_QUEUE_NAME

protected static final String MAIL_QUEUE_NAME
See Also:
Constant Field Values
Constructor Detail

DefaultSummaryEmailService

public DefaultSummaryEmailService(SummaryEmailTaskFactory taskFactory,
                                  com.atlassian.core.task.MultiQueueTaskManager taskManager,
                                  SummaryEmailContentGenerator contentGenerator,
                                  SummaryEmailNotificationManager notificationManager,
                                  com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate,
                                  VelocityHelperService velocityHelper)
Method Detail

sendEmailForDate

public int sendEmailForDate(Date date)
Description copied from interface: SummaryEmailService
Send email to any users that have mail enabled for the specific datetime. Content is generated with respect to the given date and the users preferences for the period of time that they would like to receive the email (weekly or daily)

Specified by:
sendEmailForDate in interface SummaryEmailService
Returns:
the number of emails processed successfully

sendEmail

public void sendEmail(com.atlassian.user.User user,
                      Date date)
Description copied from interface: SummaryEmailService
Send a summary email to a user with content generate with respect to the given date.

Specified by:
sendEmail in interface SummaryEmailService

getContext

public Map getContext(com.atlassian.user.User user,
                      Date date)
Description copied from interface: SummaryEmailService
Exposes the context required to render the daily summary email. This allows the email template to be rendered within confluence.

Specified by:
getContext in interface SummaryEmailService
Returns:


Copyright © 2003-2012 Atlassian. All Rights Reserved.