|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
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 *CreateEvents s. |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvent 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 |
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 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 index
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
mail
- public void removeAllMail(Space space)
removeAllMail
in interface MailContentManager
space
- 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 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.
Default implmentation doesn't do anything
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.
Default implmentation doesn't do anything
publishRemoveEvent
in class DefaultContentEntityManager
obj
- the removed content entity object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |