01: /***
02: * jwma Java WebMail
03: * Copyright (c) 2000-2003 jwma team
04: *
05: * jwma is free software; you can distribute and use this source
06: * under the terms of the BSD-style license received along with
07: * the distribution.
08: ***/package dtw.webmail.model;
09:
10: /**
11: * An interface defining the contract for interaction with
12: * the JwmaInboxInfo model.
13: * <p>
14: * The JwmaInboxInfo allows a view programmer to obtain
15: * information about the inbox; basically if there are new
16: * messages (and their count).
17: *
18: * @author Dieter Wimberger
19: * @version 0.9.7 07/02/2003
20: */
21: public interface JwmaInboxInfo {
22:
23: /**
24: * Returns a <tt>String</tt> representing the name
25: * of the Inbox.
26: *
27: * @return the name of the Inbox as String.
28: */
29: public String getName();
30:
31: /**
32: * Returns a <tt>String</tt> representing the path
33: * of this folder object.
34: *
35: * @return the path of the inbox as String.
36: */
37: public String getPath();
38:
39: /**
40: * Returns an <tt>int</tt> representing the count
41: * of messages in the Inbox.
42: * <p><i><b>Note:</b> method returns -1 if it fails
43: * to retrieve the actual messages count.</i>
44: *
45: * @return the number of messages in this Inbox.
46: */
47: public int getMessageCount();
48:
49: /**
50: * Tests if the Inbox contains new messages.
51: *
52: * @return true if the Inbox contains new messages,
53: * false otherwise.
54: */
55: public boolean hasNewMessages();
56:
57: /**
58: * Returns an <tt>int</tt> representing the count
59: * of <em>new</em> messages in the Inbox.
60: * <p><i><b>Note:</b> method returns -1 if it fails
61: * to retrieve the actual new messages count.</i>
62: *
63: * @return the number of <em>new</em> messages in the Inbox.
64: */
65: public int getNewMessageCount();
66:
67: /**
68: * Tests if the Inbox contains new messages, based on
69: * the flag for read messages.
70: *
71: * @return true if the Inbox contains unread messages,
72: * false otherwise.
73: */
74: public boolean hasUnreadMessages();
75:
76: /**
77: * Returns an <tt>int</tt> representing the count
78: * of <em>unread</em> messages in the Inbox.
79: * <p>
80: * This method is based on the flag for read messages
81: * It returns -1 if it fails to retrieve the actual
82: * message count.
83: *
84: * @return the number of <em>unread</em> messages in the Inbox.
85: */
86: public int getUnreadMessageCount();
87:
88: }//interface JwmaInboxInfo
|