KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > james > imapserver > store > ImapMailbox


1 /***********************************************************************
2  * Copyright (c) 2000-2004 The Apache Software Foundation. *
3  * All rights reserved. *
4  * ------------------------------------------------------------------- *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you *
6  * may not use this file except in compliance with the License. You *
7  * may obtain a copy of the License at: *
8  * *
9  * http://www.apache.org/licenses/LICENSE-2.0 *
10  * *
11  * Unless required by applicable law or agreed to in writing, software *
12  * distributed under the License is distributed on an "AS IS" BASIS, *
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or *
14  * implied. See the License for the specific language governing *
15  * permissions and limitations under the License. *
16  ***********************************************************************/

17
18 package org.apache.james.imapserver.store;
19
20 import org.apache.james.services.MailRepository;
21 import org.apache.james.core.MailImpl;
22
23 import javax.mail.internet.MimeMessage JavaDoc;
24 import javax.mail.search.SearchTerm JavaDoc;
25 import java.util.Date JavaDoc;
26 import java.util.Collection JavaDoc;
27
28 /**
29  * Represents a mailbox within an {@link org.apache.james.imapserver.store.ImapStore}.
30  * May provide storage for MailImpl objects, or be a non-selectable placeholder in the
31  * Mailbox hierarchy.
32  * TODO this is a "grown" interface, which needs some more design and thought re:
33  * how it will fit in with the other mail storage in James.
34  *
35  *
36  * @version $Revision: 1.4.2.3 $
37  */

38 public interface ImapMailbox
39 {
40     String JavaDoc getName();
41
42     String JavaDoc getFullName();
43
44     MessageFlags getAllowedFlags();
45
46     int getMessageCount();
47
48     int getRecentCount();
49
50     long getUidValidity();
51
52     int getFirstUnseen();
53
54     int getMsn( long uid ) throws MailboxException;
55
56     boolean isSelectable();
57
58     long getUidNext();
59
60     int getUnseenCount();
61
62     SimpleImapMessage createMessage( MimeMessage JavaDoc message, MessageFlags flags, Date JavaDoc internalDate );
63
64     void updateMessage( SimpleImapMessage message ) throws MailboxException;
65
66     void store( MailImpl mail) throws Exception JavaDoc;
67
68     SimpleImapMessage getMessage( long uid );
69
70     long[] getMessageUids();
71
72     void deleteMessage( long uid );
73 }
74
Popular Tags