|
|||||||||||
| 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
| Field Summary | |
static org.apache.log4j.Category |
log
|
| Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager |
contentEntityObjectDao, eventManager, indexer, 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)
|
Iterator |
getSpaceMailIterator(String spaceKey)
|
Iterator |
getSpaceMailWithAttachmentsIterator(String spaceKey)
|
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEventss. |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvents. |
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 |
void |
setAttachmentManager(AttachmentManager attachmentManager)
|
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,
javax.mail.internet.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 |
| Field Detail |
public static final org.apache.log4j.Category log
| Constructor Detail |
public DefaultMailContentManager()
| Method Detail |
public void setAttachmentManager(AttachmentManager attachmentManager)
public Mail getMailById(long id)
MailContentManager
getMailById in interface MailContentManagerpublic Iterator getSpaceMailIterator(String spaceKey)
getSpaceMailIterator in interface MailContentManagerpublic Iterator getSpaceMailWithAttachmentsIterator(String spaceKey)
getSpaceMailWithAttachmentsIterator in interface MailContentManager
public List getSpaceMail(int firstResult,
int maxResults,
String spaceKey)
getSpaceMail in interface MailContentManagerfirstResult - index of the first record from the resulting resultsetmaxResults - the maximum number of records to retrieve after this index
public int findMailTotal(Space space)
findMailTotal in interface MailContentManager
public List getMail(Space space,
boolean currentOnly)
getMail in interface MailContentManagerpublic Mail getMailByMessageId(String messageId)
getMailByMessageId in interface MailContentManagerpublic List getMailsByMessageId(String messageId)
getMailsByMessageId in interface MailContentManagermessageId - the message id of the mails to retrieve
public Mail storeIncomingMail(Space space,
byte[] rawMessage)
MailContentManagerWe use a byte array because RFC822 messages are streams of bytes - character encoding happens after the header is parsed
storeIncomingMail in interface MailContentManagerspace - 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 MailContentManagerpublic void removeMail(Mail mail)
MailContentManager
removeMail in interface MailContentManagermail - public void removeAllMail(Space space)
removeAllMail in interface MailContentManagerspace - public void removeAttachmentsForMail(Mail mail)
removeAttachmentsForMail in interface MailContentManager
public Mail getMailItemFromSpace(Space space,
String messageId)
space - messageId -
com.atlassian.confluence.Mail which matches messageId, otherwise null.
public Mail storeIncomingMail(Space space,
javax.mail.internet.MimeMessage mimeMessage)
throws ConfluenceException
MailContentManager
storeIncomingMail in interface MailContentManagerspace - the space to attach the message tomimeMessage - the message that has been received
ConfluenceExceptionprotected void publishCreateEvent(ContentEntityObject obj)
DefaultContentEntityManager*CreateEventss.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
publishCreateEvent in class DefaultContentEntityManagerobj - the created content entity objectprotected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager*RemoveEvents.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
publishRemoveEvent in class DefaultContentEntityManagerobj - the removed content entity object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||