Interface MailStatusStore


@Role public interface MailStatusStore
Save, load and search mail results.
Since:
6.4M3
Version:
$Id: 0167cfe33ae8963b8e1f54412e871a43b1894ae5 $
  • Method Details

    • save

      void save(MailStatus status, Map<String,Object> parameters) throws MailStoreException
      Saves mail status in the store.
      Parameters:
      status - the mail status to be saved
      parameters - some parameters specifying addition context data (for example the current wiki is stored under the wiki key)
      Throws:
      MailStoreException - when an error occurs saving the data
    • load

      MailStatus load(String uniqueMessageId) throws MailStoreException
      Load message status for the message matching the given message Id.
      Parameters:
      uniqueMessageId - the unique identifier of the message.
      Returns:
      the status of the message, or null if no status was found.
      Throws:
      MailStoreException - when an error occurs while loading the data
      Since:
      7.1M2
    • load

      List<MailStatus> load(Map<String,Object> filterMap, int offset, int count, String sortField, boolean sortAscending) throws MailStoreException
      Loads all message statuses matching the passed filters.
      Parameters:
      filterMap - the map of Mail Status parameters to match (e.g. "state", "wiki", "batchId", etc)
      offset - the number of rows to skip (0 means don't skip any row)
      count - the number of rows to return. If 0 then all rows are returned
      sortField - the name of the field used to order returned status or null if not sort should be performed
      sortAscending - when true, sort is done in ascending order of sortField, else in descending order
      Returns:
      the loaded MailStatus instances
      Throws:
      MailStoreException - when an error occurs while loading the data
      Since:
      7.1M2
    • count

      long count(Map<String,Object> filterMap) throws MailStoreException
      Count the number of message statuses matching the passed filters.
      Parameters:
      filterMap - the map of Mail Status parameters to match (e.g. "state", "wiki", "batchId", etc)
      Returns:
      the number of emails matching the passed filters
      Throws:
      MailStoreException - when an error occurs when loading the data
    • delete

      void delete(String uniqueMessageId, Map<String,Object> parameters) throws MailStoreException
      Delete a message.
      Parameters:
      uniqueMessageId - the id of the message to delete
      parameters - some parameters specifying addition context data (for example the current wiki is stored under the wiki key)
      Throws:
      MailStoreException - when an error occurs deleting the message