Package org.xwiki.mail.script
Class DeprecatedMailStorageScriptService
- java.lang.Object
-
- org.xwiki.mail.script.AbstractMailScriptService
-
- org.xwiki.mail.script.DeprecatedMailStorageScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("mailstorage") @Singleton @Deprecated public class DeprecatedMailStorageScriptService extends AbstractMailScriptServiceDeprecated.since 12.4RC1, useMailStorageScriptServiceinsteadExpose Mail Storage API to scripts.- Since:
- 6.4M3
- Version:
- $Id: 27f04fb703e0f41e4e44cb84d465a5b49bfc154b $
-
-
Field Summary
-
Fields inherited from class org.xwiki.mail.script.AbstractMailScriptService
componentManagerProvider, execution, mailSender, senderConfiguration, sessionFactory
-
-
Constructor Summary
Constructors Constructor Description DeprecatedMailStorageScriptService()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longcount(Map<String,Object> filterMap)Deprecated.Count the number of message statuses matching the passed filters.voiddelete(String batchId)Deprecated.Delete all messages from a batch (both the statuses in the database and the serialized messages on the file system).voiddelete(String batchId, String uniqueMessageId)Deprecated.Delete a message (both the status in the database and the serialized messages on the file system).voiddeleteAll()Deprecated.Delete all messages having a status in the database and their serialized messages on the file system.MailStorageConfigurationgetConfiguration()Deprecated.protected StringgetErrorKey()Deprecated.MailStatusload(String uniqueMessageId)Deprecated.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)Deprecated.Loads all message statuses matching the passed filters.ScriptMailResultresend(String batchId, String uniqueMessageId)Deprecated.Resend the serialized MimeMessage synchronously.ScriptMailResultresendAsynchronously(String batchId, String uniqueMessageId)Deprecated.Resend the serialized MimeMessage asynchronously.List<ScriptMailResult>resendAsynchronously(Map<String,Object> filterMap, int offset, int count)Deprecated.Resends all mails matching the passed filter map.-
Methods inherited from class org.xwiki.mail.script.AbstractMailScriptService
getLastError, sendAsynchronously, setError
-
-
-
-
Method Detail
-
resend
public ScriptMailResult resend(String batchId, String uniqueMessageId)
Deprecated.Resend the serialized MimeMessage synchronously.- Parameters:
batchId- the name of the directory that contains serialized MimeMessageuniqueMessageId- the unique id of the serialized MimeMessage- Returns:
- the result and status of the send batch; null if an error occurred when getting the message from the store
-
resendAsynchronously
public ScriptMailResult resendAsynchronously(String batchId, String uniqueMessageId)
Deprecated.Resend the serialized MimeMessage asynchronously.- Parameters:
batchId- the name of the directory that contains serialized MimeMessageuniqueMessageId- the unique id of the serialized MimeMessage- Returns:
- the result and status of the send batch; null if an error occurred when getting the message from the store
- Since:
- 9.3RC1
-
resendAsynchronously
public List<ScriptMailResult> resendAsynchronously(Map<String,Object> filterMap, int offset, int count)
Deprecated.Resends all mails matching the passed filter map.- 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- Returns:
- the mail results for the resent mails and null if an error occurred while loading the mail statuses from the store
- Since:
- 9.3RC1
-
load
public MailStatus load(String uniqueMessageId)
Deprecated.Load message status for the message matching the given message Id.- Parameters:
uniqueMessageId- the unique identifier of the message.- Returns:
- the loaded
MailStatusor null if not allowed or an error happens - Since:
- 7.1M2
-
load
public List<MailStatus> load(Map<String,Object> filterMap, int offset, int count, String sortField, boolean sortAscending)
Deprecated.Loads all message statuses matching the passed filters.- Parameters:
filterMap- the map of Mail Status parameters to match (e.g. "status", "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 statussortAscending- when true, sort is done in ascending order of sortField, else in descending order- Returns:
- the loaded
MailStatusinstances or null if not allowed or an error happens - Since:
- 7.1M2
-
count
public long count(Map<String,Object> filterMap)
Deprecated.Count the number of message statuses matching the passed filters.- Parameters:
filterMap- the map of Mail Status parameters to match (e.g. "status", "wiki", "batchId", etc)- Returns:
- the number of mail statuses or 0 if not allowed or an error happens
-
delete
public void delete(String batchId)
Deprecated.Delete all messages from a batch (both the statuses in the database and the serialized messages on the file system).- Parameters:
batchId- the id of the batch for which to delete all messages
-
deleteAll
public void deleteAll()
Deprecated.Delete all messages having a status in the database and their serialized messages on the file system.- Since:
- 9.4RC1
-
delete
public void delete(String batchId, String uniqueMessageId)
Deprecated.Delete a message (both the status in the database and the serialized messages on the file system).- Parameters:
batchId- the id of the batch for the message to deleteuniqueMessageId- the unique id of the message to delete
-
getConfiguration
public MailStorageConfiguration getConfiguration()
Deprecated.- Returns:
- the configuration for the Mail Storage
-
getErrorKey
protected String getErrorKey()
Deprecated.- Specified by:
getErrorKeyin classAbstractMailScriptService
-
-