Package org.xwiki.mail
Interface MailStatusStore
-
@Role public interface MailStatusStore
Save, load and search mail results.- Since:
- 6.4M3
- Version:
- $Id: 0167cfe33ae8963b8e1f54412e871a43b1894ae5 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
count(Map<String,Object> filterMap)
Count the number of message statuses matching the passed filters.void
delete(String uniqueMessageId, Map<String,Object> parameters)
Delete a message.MailStatus
load(String uniqueMessageId)
Load message status for the message matching the given message Id.List<MailStatus>
load(Map<String,Object> filterMap, int offset, int count, String sortField, boolean sortAscending)
Loads all message statuses matching the passed filters.void
save(MailStatus status, Map<String,Object> parameters)
Saves mail status in the store.
-
-
-
Method Detail
-
save
void save(MailStatus status, Map<String,Object> parameters) throws MailStoreException
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
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 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
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 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
-
-