KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Date JavaDoc;
21
22 /**
23  * Interface for objects holding IMAP4rev1 Message Attributes. Message
24  * Attributes should be set when a message enters a mailbox. Implementations
25  * are encouraged to implement and store MessageAttributes apart from the
26  * underlying message. This allows the Mailbox to respond to questions about
27  * very large message without needing to access them directly.
28  * <p> Note that the message in a mailbox have the same order using either
29  * Message Sequence Numbers or UIDs.
30  *
31  * Reference: RFC 2060 - para 2.3
32  * @version 0.1 on 14 Dec 2000
33  */

34 public interface ImapMessageAttributes {
35
36     /**
37      * Provides the date and time at which the message was received. In the
38      * case of delivery by SMTP, this SHOULD be the date and time of final
39      * delivery as defined for SMTP. In the case of messages copied from
40      * another mailbox, it shuld be the internalDate of the source message. In
41      * the case of messages Appended to the mailbox, example drafts, the
42      * internalDate is either specified in the Append command or is the
43      * current dat and time at the time of the Append.
44      *
45      * @return Date imap internal date
46      */

47     Date JavaDoc getInternalDate();
48
49     /**
50      * Returns IMAP formatted String representation of Date
51      */

52     String JavaDoc getInternalDateAsString();
53
54     /**
55      * Provides the sizeof the message in octets.
56      *
57      * @return int number of octets in message.
58      */

59     int getSize();
60
61     /**
62      * Provides the Envelope structure information for this message.
63      * This is a parsed representation of the rfc-822 envelope information.
64      * This is not to be confused with the SMTP envelope!
65      *
66      * @return String satisfying envelope syntax in rfc 2060.
67      */

68     String JavaDoc getEnvelope();
69
70     /**
71      * Provides the Body Structure information for this message.
72      * This is a parsed representtion of the MIME structure of the message.
73      *
74      * @return String satisfying body syntax in rfc 2060.
75      */

76     String JavaDoc getBodyStructure( boolean includeExtensions );
77 }
78
79
80
Popular Tags