org.apache.james.mailbox
Interface MessageManager.MetaData

Enclosing interface:
MessageManager

public static interface MessageManager.MetaData

Meta data about the current state of the mailbox.


Nested Class Summary
static class MessageManager.MetaData.FetchGroup
          Describes the optional data types.
 
Method Summary
 long countRecent()
          Gets the number of recent messages.
 java.lang.Long getFirstUnseen()
          Gets the UID of the first unseen message.
 long getMessageCount()
          Gets the number of messages that this mailbox contains.
 javax.mail.Flags getPermanentFlags()
          Gets the flags which can be stored by this mailbox.
 java.util.List<java.lang.Long> getRecent()
          Gets the UIDs of recent messages.
 long getUidNext()
          Gets the next UID predicted.
 long getUidValidity()
          Gets the UIDVALIDITY.
 long getUnseenCount()
          Gets the number of unseen messages contained in this mailbox.
 boolean isWriteable()
          Is this mailbox writable?
 

Method Detail

getRecent

java.util.List<java.lang.Long> getRecent()
Gets the UIDs of recent messages.

Returns:
the uids flagged RECENT in this mailbox,

countRecent

long countRecent()
Gets the number of recent messages.

Returns:
the number of messages flagged RECENT in this mailbox

getPermanentFlags

javax.mail.Flags getPermanentFlags()
Gets the flags which can be stored by this mailbox.

Returns:
Flags that can be stored

getUidValidity

long getUidValidity()
Gets the UIDVALIDITY.

Returns:
UIDVALIDITY

getUidNext

long getUidNext()
Gets the next UID predicted.

Parameters:
mailboxSession - not null
Returns:
the uid that will be assigned to the next appended message

getMessageCount

long getMessageCount()
Gets the number of messages that this mailbox contains.

Returns:
number of messages contained

getUnseenCount

long getUnseenCount()
Gets the number of unseen messages contained in this mailbox. This is an optional property.

Returns:
number of unseen messages contained or zero when this optional data has not been requested
See Also:
MessageManager.MetaData.FetchGroup.UNSEEN_COUNT

getFirstUnseen

java.lang.Long getFirstUnseen()
Gets the UID of the first unseen message. This is an optional property.

Returns:
uid of the first unseen message, or null when there are no unseen messages
See Also:
MessageManager.MetaData.FetchGroup.FIRST_UNSEEN

isWriteable

boolean isWriteable()
Is this mailbox writable?

Returns:
true if read-write, false if read only


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.