EmailAuditService

public interface EmailAuditService

The EmailAuditService interface provides methods for logging email activity, as well as searching and deleting the email logs.

Methods

countEmailRecords

long countEmailRecords(EmailRecordSearchCriteria criteria)

Returns the count of EmailRecord entries matching the specified search criteria.

Returns:the count of email records matching the provided criteria

delete

void delete(EmailRecord emailRecord)

Deletes the specified EmailRecord entry from the email log.

findAllEmailRecords

List<EmailRecord> findAllEmailRecords()

Finds and returns all EmailRecord entries in the email log.

Returns:all email records in the email log

findById

EmailRecord findById(long id)

Finds an EmailRecord in the log by ID.

Parameters:
  • id – the identifier of the record to find
Returns:

the email record that matches the provided identifier, or null if no matching record exists

findEmailRecords

List<EmailRecord> findEmailRecords(EmailRecordSearchCriteria criteria)

Finds and returns all EmailRecord entries matching the specified search criteria.

Returns:all email records matching the provided criteria

log

void log(EmailRecord mailRecord)

Adds the provided EmailRecord to the email log.

Parameters:
  • mailRecord – the record to add to the email log