org.apache.myfaces.trinidaddemo.email
Class FolderData

java.lang.Object
  extended by org.apache.myfaces.trinidaddemo.email.FolderData

public class FolderData
extends Object

Reflects the folder information provided by javaMail folder

Version:
1.0

Constructor Summary
FolderData(AccountData data, javax.mail.Folder folder)
           
 
Method Summary
 void flush()
           
 javax.mail.Folder getFolder()
          Get the underlying Folder object.
 String getFullName()
          gets the full name of this folder.
 int getMessageCount()
           
 Object getMessageListModel()
          Get the model for the messages in this folder.
 String getName()
          gets the name of this folder
 int getStartIndex()
           
 List<Object> getSubFolders()
          gets this folder's subfolders
 int getUnreadMessageCount()
           
 boolean isHoldsMessages()
          Returns true if the folder can hold messages.
 void setStartIndex(int startIndex)
          Store the index into the list of messages.
static FolderData[] toFolderData(AccountData data, javax.mail.Folder[] folders)
          converts Folders to FolderDatas.
 String viewMessages()
          Action for viewing the messages in this folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderData

public FolderData(AccountData data,
                  javax.mail.Folder folder)
           throws javax.mail.MessagingException
Parameters:
data - the user who owns this folder
folder - the folder being reflected
Throws:
javax.mail.MessagingException
Method Detail

flush

public void flush()

isHoldsMessages

public boolean isHoldsMessages()
Returns true if the folder can hold messages.


getMessageCount

public int getMessageCount()
                    throws javax.mail.MessagingException
Returns:
the number of messages in this folder
Throws:
javax.mail.MessagingException

getUnreadMessageCount

public int getUnreadMessageCount()
                          throws javax.mail.MessagingException
Returns:
the number of unread messages in this folder
Throws:
javax.mail.MessagingException

getStartIndex

public int getStartIndex()
Returns:
the index into the list of messages that was last used by the messages table. Stored here to keep it scoped to the folder, instead of the session.

setStartIndex

public void setStartIndex(int startIndex)
Store the index into the list of messages.


getName

public String getName()
gets the name of this folder


getFullName

public String getFullName()
gets the full name of this folder. This reflects the hierarchy of this folder.


getSubFolders

public List<Object> getSubFolders()
                           throws javax.mail.MessagingException
gets this folder's subfolders

Throws:
javax.mail.MessagingException

getMessageListModel

public Object getMessageListModel()
Get the model for the messages in this folder.


toFolderData

public static FolderData[] toFolderData(AccountData data,
                                        javax.mail.Folder[] folders)
                                 throws javax.mail.MessagingException
converts Folders to FolderDatas.

Throws:
javax.mail.MessagingException

getFolder

public javax.mail.Folder getFolder()
Get the underlying Folder object.


viewMessages

public String viewMessages()
Action for viewing the messages in this folder.



Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.