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
public class EmailQueueServiceImpl extends CayenneService implements IEmailQueueService
Provides an email queue service implementation.- See Also:
EmailQueue
-
-
Constructor Summary
Constructors Constructor Description EmailQueueServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmailQueue
cloneEmailQueue(Long emailQueueId)
Clone an email queue item.boolean
process(EmailQueue emailQueueItem)
Create an email and attempts to send the email.-
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
-
-
-
-
Method Detail
-
process
public boolean process(EmailQueue emailQueueItem)
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:
IEmailQueueService.process(com.avoka.fc.core.entity.EmailQueue)
-
cloneEmailQueue
public EmailQueue cloneEmailQueue(Long emailQueueId)
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
-
-