KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > communication > message > MessageService


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.communication.message;
6
7 import java.util.* ;
8 import org.exoplatform.commons.utils.PageList;
9 /**
10  * Created by The eXo Platform SARL .
11  * Author : Tuan Nguyen
12  * tuan08@users.sourceforge.net
13  * Date: Jun 14, 2003
14  * Time: 1:12:22 PM
15  */

16 public interface MessageService {
17   public static String JavaDoc INBOX_FOLDER = "Inbox" ;
18   public static String JavaDoc SENT_FOLDER = "Sent" ;
19   public static String JavaDoc TRASH_FOLDER = "Trash" ;
20   public static String JavaDoc ARCHIVED_FOLDER = "archived" ;
21   
22   public static String JavaDoc IMAP_PROTOCOL = "imap" ;
23   public static String JavaDoc POP3_PROTOCOL = "pop3" ;
24   public static String JavaDoc STANDALONE_PROTOCOL = "standalone" ;
25   
26   public Account createAccountInstance() ;
27   public Account getAccount(String JavaDoc userName , String JavaDoc accountName) throws Exception JavaDoc ;
28   public List getAccounts(String JavaDoc userName) throws Exception JavaDoc;
29   public Account removeAccount(Account account) throws Exception JavaDoc;
30   public void createAccount(Account account) throws Exception JavaDoc;
31   public void updateAccount(Account account) throws Exception JavaDoc;
32   public int countNewMessages(Account account) throws Exception JavaDoc ;
33   
34   public Folder createFolderInstance() ;
35   public Folder getFolder(Account account, String JavaDoc folderName) throws Exception JavaDoc ;
36   public List getFolders(String JavaDoc accountId) throws Exception JavaDoc;
37   public Folder removeFolder(Folder folder) throws Exception JavaDoc;
38   public void createFolder(Account account, Folder folder) throws Exception JavaDoc;
39   public void updateFolder(Folder folder) throws Exception JavaDoc;
40   
41   public Message createMessageInstance() ;
42   public PageList getMessages(Folder folder) throws Exception JavaDoc;
43   public List searchMessages(Folder folder, SearchTerm term) ;
44   public Message getMessage(String JavaDoc messageId) throws Exception JavaDoc;
45   public Message removeMessage(Message message) throws Exception JavaDoc;
46   public void moveMessage(Account account, Folder folder, Message message) throws Exception JavaDoc ;
47   public void createMessage(Account account, Folder folder, Message message) throws Exception JavaDoc;
48   public void updateMessage(Message message) throws Exception JavaDoc;
49   public void sendMessage(Account account, Message message) throws Exception JavaDoc ;
50
51   public Attachment createAttachment();
52   public List getAttachments(Message message) throws Exception JavaDoc;
53
54   public void synchronizeAccount(Account account) throws Exception JavaDoc ;
55   public void addMessageProtocolPlugin(MessageProtocolPlugin plugin) ;
56   public Collection getMessageProtocolPlugins() ;
57   
58   public String JavaDoc[] getSupportedFlags() ;
59 }
Popular Tags