Package com.avoka.fc.core.service.impl
Class EmailQueueServiceImpl
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.impl.EmailQueueServiceImpl
- All Implemented Interfaces:
IEmailQueueService
Provides an email queue service implementation.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncloneEmailQueue
(Long emailQueueId) Clone an email queue item.boolean
process
(EmailQueue emailQueueItem) Create an email and attempts to send the email.void
validateEmailQueueList
(List<EmailQueue> emailList) Validates that the emails do not reach the threshold (i.e.Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Constructor Details
-
EmailQueueServiceImpl
public EmailQueueServiceImpl()
-
-
Method Details
-
process
Create an email and attempts to send the email. Note that this method contains database transactions. The method change the email queue status for the EmailQueue item to COMPLETE state after sent the email.- Specified by:
process
in interfaceIEmailQueueService
- Parameters:
emailQueueItem
- the email queue item to send- Returns:
- true if the email is sent successfully
- See Also:
-
cloneEmailQueue
Clone an email queue item. This item status will be set to be Cloned.- Specified by:
cloneEmailQueue
in interfaceIEmailQueueService
- Parameters:
emailQueueId
- the email queue id- Returns:
- the cloned email queue
-
validateEmailQueueList
Validates that the emails do not reach the threshold (i.e. flooding an address) where the to, from & subject are the same. This validation will be done on the email queue items that need to be sent in the one call of Email Queue job processing.- Specified by:
validateEmailQueueList
in interfaceIEmailQueueService
- Parameters:
emailList
- of email queue items to validate
-