1 17 18 package org.apache.james.imapserver; 19 20 import org.apache.james.services.User; 21 import org.apache.james.imapserver.store.ImapMailbox; 22 import org.apache.james.imapserver.store.MailboxException; 23 24 import javax.mail.search.SearchTerm ; 25 import java.util.Collection ; 26 27 40 public interface ImapHost 41 { 42 43 String ROLE = "org.apache.james.imapserver.ImapHost"; 44 45 String IMAP_HOST = "IMAP_HOST"; 46 47 51 char getHierarchyDelimiter(); 52 53 64 ImapMailbox getMailbox( User user, String mailboxName ); 65 66 79 ImapMailbox getMailbox( User user, String mailboxName, boolean mustExist ) 80 throws MailboxException; 81 82 89 ImapMailbox getInbox( User user ) throws MailboxException; 90 91 97 void createPrivateMailAccount( User user ) throws MailboxException; 98 99 117 ImapMailbox createMailbox( User user, String mailboxName ) 118 throws AuthorizationException, MailboxException; 119 120 121 134 void deleteMailbox( User user, String mailboxName ) 135 throws MailboxException, AuthorizationException; 136 137 138 158 void renameMailbox( User user, 159 String oldMailboxName, 160 String newMailboxName ) 161 throws MailboxException, AuthorizationException; 162 163 194 Collection listMailboxes( User user, 195 String mailboxPattern ) 196 throws MailboxException; 197 198 232 Collection listSubscribedMailboxes( User user, 233 String mailboxPattern) 234 throws MailboxException; 235 236 244 void subscribe( User user, String mailbox ) 245 throws MailboxException; 246 247 253 void unsubscribe( User user, String mailbox ) 254 throws MailboxException; 255 256 int[] expunge( ImapMailbox mailbox ) throws MailboxException; 257 258 long[] search( SearchTerm searchTerm, ImapMailbox mailbox ); 259 260 void copyMessage( long uid, ImapMailbox currentMailbox, ImapMailbox toMailbox ) 261 throws MailboxException; 262 263 264 } 265 266 | Popular Tags |