Package org.xwiki.mail
Interface MailStatusStore
@Role
public interface MailStatusStore
Save, load and search mail results.
- Since:
- 6.4M3
- Version:
- $Id: 0167cfe33ae8963b8e1f54412e871a43b1894ae5 $
-
Method Summary
Modifier and TypeMethodDescriptionlong
Count the number of message statuses matching the passed filters.void
Delete a message.Load message status for the message matching the given message Id.Loads all message statuses matching the passed filters.void
save
(MailStatus status, Map<String, Object> parameters) Saves mail status in the store.
-
Method Details
-
save
Saves mail status in the store.- Parameters:
status
- the mail status to be savedparameters
- some parameters specifying addition context data (for example the current wiki is stored under thewiki
key)- Throws:
MailStoreException
- when an error occurs saving the data
-
load
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 MailStoreExceptionLoads 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 returnedsortField
- the name of the field used to order returned status or null if not sort should be performedsortAscending
- 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
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
Delete a message.- Parameters:
uniqueMessageId
- the id of the message to deleteparameters
- some parameters specifying addition context data (for example the current wiki is stored under thewiki
key)- Throws:
MailStoreException
- when an error occurs deleting the message
-