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