|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.core.DefaultContentEntityManager
com.atlassian.confluence.mail.DefaultMailContentManager
public class DefaultMailContentManager
Field Summary |
---|
Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager |
---|
attachmentManager, contentEntityObjectDao, eventManager, indexer, labelManager, linkManager |
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager |
---|
ITERATE_ALL |
Constructor Summary | |
---|---|
DefaultMailContentManager()
|
Method Summary | |
---|---|
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)
Get a mail by its database id. |
Mail |
getMailByMessageId(String messageId)
Get a mail by its message-id. |
Mail |
getMailItemFromSpace(Space space,
String messageId)
|
List |
getMailsByMessageId(String messageId)
Get all mails with the matching message-id. |
List |
getSpaceMail(int firstResult,
int maxResults,
String spaceKey)
Get a particular subset (page) of mail from a space. |
Iterator |
getSpaceMailIterator(String spaceKey)
|
Iterator |
getSpaceMailWithAttachmentsIterator(String spaceKey)
|
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEvents s. |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvent s. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
This method publishes *UpdateEvent s. |
void |
removeAllMail(Space space)
removes all mail in a space including their attachments |
void |
removeAttachmentsForMail(Mail mail)
|
void |
removeMail(Mail mail)
removes mail and its associated attachments |
boolean |
spaceHasMail(String spaceKey)
|
Mail |
storeIncomingMail(Space space,
byte[] rawMessage)
Create a new mail content object in the given space for the given raw RFC822 message. |
Mail |
storeIncomingMail(Space space,
MimeMessage mimeMessage)
Create a new mail content object in the given space for the given mimeMessage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMailContentManager()
Method Detail |
---|
public Mail getMailById(long id)
MailContentManager
getMailById
in interface MailContentManager
public Iterator getSpaceMailIterator(String spaceKey)
getSpaceMailIterator
in interface MailContentManager
public Iterator getSpaceMailWithAttachmentsIterator(String spaceKey)
getSpaceMailWithAttachmentsIterator
in interface MailContentManager
public List getSpaceMail(int firstResult, int maxResults, String spaceKey)
getSpaceMail
in interface MailContentManager
firstResult
- index of the first record from the resulting resultsetmaxResults
- the maximum number of records to retrieve after this indexspaceKey
- the key for the space from which to remove the mail
public int findMailTotal(Space space)
findMailTotal
in interface MailContentManager
public List getMail(Space space, boolean currentOnly)
getMail
in interface MailContentManager
public Mail getMailByMessageId(String messageId)
getMailByMessageId
in interface MailContentManager
public List getMailsByMessageId(String messageId)
getMailsByMessageId
in interface MailContentManager
messageId
- the message id of the mails to retrieve
public Mail storeIncomingMail(Space space, byte[] rawMessage)
MailContentManager
We use a byte array because RFC822 messages are streams of bytes - character encoding happens after the header is parsed
storeIncomingMail
in interface MailContentManager
space
- the space to attach the message torawMessage
- the message that has been receivedpublic boolean spaceHasMail(String spaceKey)
spaceHasMail
in interface MailContentManager
public Mail getFirstMailAfter(String spaceKey, long mailId)
getFirstMailAfter
in interface MailContentManager
public Mail getFirstMailBefore(String spaceKey, long mailId)
getFirstMailBefore
in interface MailContentManager
public void removeMail(Mail mail)
MailContentManager
removeMail
in interface MailContentManager
public void removeAllMail(Space space)
removeAllMail
in interface MailContentManager
space
- the space from which to remove the mailpublic void removeAttachmentsForMail(Mail mail)
removeAttachmentsForMail
in interface MailContentManager
public Mail getMailItemFromSpace(Space space, String messageId)
com.atlassian.confluence.Mail
which matches messageId, otherwise null.public Mail storeIncomingMail(Space space, MimeMessage mimeMessage) throws ConfluenceException
MailContentManager
storeIncomingMail
in interface MailContentManager
space
- the space to attach the message tomimeMessage
- the message that has been received
ConfluenceException
protected void publishCreateEvent(ContentEntityObject obj)
DefaultContentEntityManager
*CreateEvents
s.
Specific content entity object manager that need to publish those events should override this method.
publishCreateEvent
in class DefaultContentEntityManager
obj
- the created content entity objectprotected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager
*RemoveEvent
s.
Specific content entity object manager that need to publish those events should override this method.
publishRemoveEvent
in class DefaultContentEntityManager
obj
- the removed content entity objectprotected void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
DefaultContentEntityManager
*UpdateEvent
s.
Specific content entity object manager that need to publish those events should override this method.
publishUpdateEvent
in class DefaultContentEntityManager
obj
- the updated content entity objectorigObj
- the old version of the content entity object, for history purposesaveContext
- the associated SaveContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |