public interface

MailDao

implements ContentEntityObjectDao
com.atlassian.confluence.mail.persistence.dao.MailDao
Known Indirect Subclasses

Summary

Public Methods
int findMailTotal(Space space)
Mail getFirstMailAfter(String spaceKey, long mailId)
Mail getFirstMailBefore(String spaceKey, long mailId)
List getMail(Space space, boolean currentOnly)
Mail getMailById(long id)
Retrieve a single mail by its persistent object id.
Mail getMailByMessageId(String messageId)
Retrieve a single mail by its message-id.
List getMailsByMessageId(String messageId)
Retrieve all mails with a particular message id.
Mail getMostRecentMail(String spaceKey)
List getSpaceMail(int firstResult, int maxResults, String spaceKey)
Iterator getSpaceMailIterator(String spaceKey)
Iterator getSpaceMailWithAttachmentsIterator(String spaceKey)
void removeAllMail(Space space)
[Expand]
Inherited Methods
From interface bucket.core.persistence.ObjectDao
From interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
From interface com.atlassian.confluence.core.persistence.VersionedObjectDao

Public Methods

public int findMailTotal (Space space)

public Mail getFirstMailAfter (String spaceKey, long mailId)

public Mail getFirstMailBefore (String spaceKey, long mailId)

public List getMail (Space space, boolean currentOnly)

public Mail getMailById (long id)

Retrieve a single mail by its persistent object id. Returns null if no Mail is found with that id

Parameters
id the id of the mail to retrieve
Returns
  • the appropriate Mail object, or null if no such mail exists

public Mail getMailByMessageId (String messageId)

Retrieve a single mail by its message-id. Since message ids are not guaranteed to be unique (but should be in practice), this method will return null both if no message exists with that ID, or if multiple mails exist with that ID. To determine which is the case, call getMailsByMessageId(String).

Message ids are case sensitive.

Parameters
messageId the Message-Id of the mail to retrieve
Returns
  • the appropriate Mail object, or null if no such mail exists, or if multiple mails exist with that ID

public List getMailsByMessageId (String messageId)

Retrieve all mails with a particular message id. Since message ids are supposed to be unique, you will mostly want to just use getMailByMessageId(String) instead, but this method is useful if you want to cater for the possibility of (unlikely) accidental clashes or (more likely) deliberate forgeries.

Message ids are case sensitive

Parameters
messageId The Message-Id of the mail to retrieve
Returns
  • a list of all mails matching that message-id, or the empty list if no such mails exist.

public Mail getMostRecentMail (String spaceKey)

public List getSpaceMail (int firstResult, int maxResults, String spaceKey)

public Iterator getSpaceMailIterator (String spaceKey)

public Iterator getSpaceMailWithAttachmentsIterator (String spaceKey)

public void removeAllMail (Space space)