com.atlassian.confluence.plugins.emailgateway.service
Class DefaultEmailThreadConverterService

java.lang.Object
  extended by com.atlassian.confluence.plugins.emailgateway.service.DefaultEmailThreadConverterService
All Implemented Interfaces:
EmailStagingService, StagedEmailThreadAdminService

public class DefaultEmailThreadConverterService
extends Object
implements StagedEmailThreadAdminService, EmailStagingService


Constructor Summary
DefaultEmailThreadConverterService(StagedEmailThreadManager stagedEmailThreadManager, UsersByEmailService usersByEmailService, EmailToPageConverter emailToPageConverter, com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator, EmailToPageConfirmationEmailSender confirmationEmailSender, com.atlassian.event.api.EventPublisher eventPublisher, Blacklist blacklist)
           
 
Method Summary
 int clearExpiredEmailThreads(org.joda.time.DateTime expiry)
          Deletes old email threads from the staging area.
 AbstractPage convertAndPublishStagedEmailThread(StagedEmailThreadKey key, MessageHolder messageHolder)
          Converts an existing StagedEmailThread into a Confluence Page and publishes it.
 void deleteStagedEmailThread(StagedEmailThreadKey key)
          Delete an existing StagedEmailThread from the store.
 StagedEmailThreadKey stageEmailThread(ReceivedEmail receivedEmail)
          Stage the given received email.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEmailThreadConverterService

public DefaultEmailThreadConverterService(StagedEmailThreadManager stagedEmailThreadManager,
                                          UsersByEmailService usersByEmailService,
                                          EmailToPageConverter emailToPageConverter,
                                          com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator,
                                          EmailToPageConfirmationEmailSender confirmationEmailSender,
                                          com.atlassian.event.api.EventPublisher eventPublisher,
                                          Blacklist blacklist)
Method Detail

stageEmailThread

public StagedEmailThreadKey stageEmailThread(ReceivedEmail receivedEmail)
                                      throws EmailStagingException
Description copied from interface: EmailStagingService
Stage the given received email.

Specified by:
stageEmailThread in interface EmailStagingService
Parameters:
receivedEmail - The received email to be staged.
Returns:
The StagedEmailThreadKey representing the staged email.
Throws:
EmailStagingException - If the received email cannot be staged.

clearExpiredEmailThreads

public int clearExpiredEmailThreads(org.joda.time.DateTime expiry)
Description copied from interface: StagedEmailThreadAdminService
Deletes old email threads from the staging area.

Specified by:
clearExpiredEmailThreads in interface StagedEmailThreadAdminService
Parameters:
expiry - the cut-off date for which any threads older will be deleted
Returns:
the number of threads removed

convertAndPublishStagedEmailThread

public AbstractPage convertAndPublishStagedEmailThread(StagedEmailThreadKey key,
                                                       MessageHolder messageHolder)
Description copied from interface: StagedEmailThreadAdminService
Converts an existing StagedEmailThread into a Confluence Page and publishes it.

Specified by:
convertAndPublishStagedEmailThread in interface StagedEmailThreadAdminService
Parameters:
key - The key used to locate the StagedEmailThread
Returns:
A representation of the newly published page

deleteStagedEmailThread

public void deleteStagedEmailThread(StagedEmailThreadKey key)
Description copied from interface: StagedEmailThreadAdminService
Delete an existing StagedEmailThread from the store.

Specified by:
deleteStagedEmailThread in interface StagedEmailThreadAdminService
Parameters:
key - The key used to locate the StagedEmailThread


Copyright © 2003-2013 Atlassian. All Rights Reserved.