Class DeprecatedMailStorageScriptService

  • All Implemented Interfaces:
    org.xwiki.script.service.ScriptService

    @Component
    @Named("mailstorage")
    @Singleton
    @Deprecated
    public class DeprecatedMailStorageScriptService
    extends AbstractMailScriptService
    Deprecated.
    since 12.4RC1, use MailStorageScriptService instead
    Expose Mail Storage API to scripts.
    Since:
    6.4M3
    Version:
    $Id: 27f04fb703e0f41e4e44cb84d465a5b49bfc154b $
    • Constructor Detail

      • DeprecatedMailStorageScriptService

        public DeprecatedMailStorageScriptService()
        Deprecated.
    • 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 MimeMessage
        uniqueMessageId - 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 MimeMessage
        uniqueMessageId - 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 MailStatus or 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 returned
        sortField - the name of the field used to order returned status
        sortAscending - when true, sort is done in ascending order of sortField, else in descending order
        Returns:
        the loaded MailStatus instances 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 delete
        uniqueMessageId - the unique id of the message to delete
      • getConfiguration

        public MailStorageConfiguration getConfiguration()
        Deprecated.
        Returns:
        the configuration for the Mail Storage