javax.mail
Class Folder

java.lang.Object
  extended byjavax.mail.Folder

public abstract class Folder
extends Object

Version:
$Revision: 1.3 $ $Date: 2004/03/10 10:00:27 $

Field Summary
static int HOLDS_FOLDERS
           
static int HOLDS_MESSAGES
           
protected  int mode
           
static int READ_ONLY
           
static int READ_WRITE
           
protected  Store store
           
 
Constructor Summary
protected Folder(Store store)
           
 
Method Summary
 void addConnectionListener(ConnectionListener listener)
           
 void addFolderListener(FolderListener listener)
           
 void addMessageChangedListener(MessageChangedListener listener)
           
 void addMessageCountListener(MessageCountListener listener)
           
abstract  void appendMessages(Message[] messages)
           
abstract  void close(boolean expunge)
           
 void copyMessages(Message[] messages, Folder folder)
           
abstract  boolean create(int type)
           
abstract  boolean delete(boolean recurse)
           
abstract  boolean exists()
           
abstract  Message[] expunge()
           
 void fetch(Message[] messages, FetchProfile profile)
           
protected  void finalize()
           
 int getDeletedMessageCount()
           
abstract  Folder getFolder(String name)
           
abstract  String getFullName()
           
abstract  Message getMessage(int id)
           
abstract  int getMessageCount()
           
 Message[] getMessages()
           
 Message[] getMessages(int[] ids)
           
 Message[] getMessages(int from, int to)
           
 int getMode()
           
abstract  String getName()
           
 int getNewMessageCount()
           
abstract  Folder getParent()
           
abstract  Flags getPermanentFlags()
           
abstract  char getSeparator()
           
 Store getStore()
           
abstract  int getType()
           
 int getUnreadMessageCount()
           
 URLName getURLName()
           
abstract  boolean hasNewMessages()
           
abstract  boolean isOpen()
           
 boolean isSubscribed()
           
 Folder[] list()
           
abstract  Folder[] list(String pattern)
           
 Folder[] listSubscribed()
           
 Folder[] listSubscribed(String pattern)
           
protected  void notifyConnectionListeners(int type)
           
protected  void notifyFolderListeners(int type)
           
protected  void notifyFolderRenamedListeners(Folder newFolder)
           
protected  void notifyMessageAddedListeners(Message[] messages)
           
protected  void notifyMessageChangedListeners(int type, Message message)
           
protected  void notifyMessageRemovedListeners(boolean removed, Message[] messages)
           
abstract  void open(int mode)
           
 void removeConnectionListener(ConnectionListener listener)
           
 void removeFolderListener(FolderListener listener)
           
 void removeMessageChangedListener(MessageChangedListener listener)
           
 void removeMessageCountListener(MessageCountListener listener)
           
abstract  boolean renameTo(Folder newName)
           
 Message[] search(SearchTerm term)
           
 Message[] search(SearchTerm term, Message[] messages)
           
 void setFlags(int[] ids, Flags flags, boolean value)
           
 void setFlags(int from, int to, Flags flags, boolean value)
           
 void setFlags(Message[] messages, Flags flags, boolean value)
           
 void setSubscribed(boolean subscribed)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOLDS_FOLDERS

public static final int HOLDS_FOLDERS
See Also:
Constant Field Values

HOLDS_MESSAGES

public static final int HOLDS_MESSAGES
See Also:
Constant Field Values

READ_ONLY

public static final int READ_ONLY
See Also:
Constant Field Values

READ_WRITE

public static final int READ_WRITE
See Also:
Constant Field Values

mode

protected int mode

store

protected Store store
Constructor Detail

Folder

protected Folder(Store store)
Method Detail

addConnectionListener

public void addConnectionListener(ConnectionListener listener)

addFolderListener

public void addFolderListener(FolderListener listener)

addMessageChangedListener

public void addMessageChangedListener(MessageChangedListener listener)

addMessageCountListener

public void addMessageCountListener(MessageCountListener listener)

appendMessages

public abstract void appendMessages(Message[] messages)
                             throws MessagingException
Throws:
MessagingException

close

public abstract void close(boolean expunge)
                    throws MessagingException
Throws:
MessagingException

copyMessages

public void copyMessages(Message[] messages,
                         Folder folder)
                  throws MessagingException
Throws:
MessagingException

create

public abstract boolean create(int type)
                        throws MessagingException
Throws:
MessagingException

delete

public abstract boolean delete(boolean recurse)
                        throws MessagingException
Throws:
MessagingException

exists

public abstract boolean exists()
                        throws MessagingException
Throws:
MessagingException

expunge

public abstract Message[] expunge()
                           throws MessagingException
Throws:
MessagingException

fetch

public void fetch(Message[] messages,
                  FetchProfile profile)
           throws MessagingException
Throws:
MessagingException

finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable

getDeletedMessageCount

public int getDeletedMessageCount()
                           throws MessagingException
Throws:
MessagingException

getFolder

public abstract Folder getFolder(String name)
                          throws MessagingException
Throws:
MessagingException

getFullName

public abstract String getFullName()

getMessage

public abstract Message getMessage(int id)
                            throws MessagingException
Throws:
MessagingException

getMessageCount

public abstract int getMessageCount()
                             throws MessagingException
Throws:
MessagingException

getMessages

public Message[] getMessages()
                      throws MessagingException
Throws:
MessagingException

getMessages

public Message[] getMessages(int from,
                             int to)
                      throws MessagingException
Throws:
MessagingException

getMessages

public Message[] getMessages(int[] ids)
                      throws MessagingException
Throws:
MessagingException

getMode

public int getMode()

getName

public abstract String getName()

getNewMessageCount

public int getNewMessageCount()
                       throws MessagingException
Throws:
MessagingException

getParent

public abstract Folder getParent()
                          throws MessagingException
Throws:
MessagingException

getPermanentFlags

public abstract Flags getPermanentFlags()

getSeparator

public abstract char getSeparator()
                           throws MessagingException
Throws:
MessagingException

getStore

public Store getStore()

getType

public abstract int getType()
                     throws MessagingException
Throws:
MessagingException

getUnreadMessageCount

public int getUnreadMessageCount()
                          throws MessagingException
Throws:
MessagingException

getURLName

public URLName getURLName()
                   throws MessagingException
Throws:
MessagingException

hasNewMessages

public abstract boolean hasNewMessages()
                                throws MessagingException
Throws:
MessagingException

isOpen

public abstract boolean isOpen()

isSubscribed

public boolean isSubscribed()

list

public Folder[] list()
              throws MessagingException
Throws:
MessagingException

list

public abstract Folder[] list(String pattern)
                       throws MessagingException
Throws:
MessagingException

listSubscribed

public Folder[] listSubscribed()
                        throws MessagingException
Throws:
MessagingException

listSubscribed

public Folder[] listSubscribed(String pattern)
                        throws MessagingException
Throws:
MessagingException

notifyConnectionListeners

protected void notifyConnectionListeners(int type)

notifyFolderListeners

protected void notifyFolderListeners(int type)

notifyFolderRenamedListeners

protected void notifyFolderRenamedListeners(Folder newFolder)

notifyMessageAddedListeners

protected void notifyMessageAddedListeners(Message[] messages)

notifyMessageChangedListeners

protected void notifyMessageChangedListeners(int type,
                                             Message message)

notifyMessageRemovedListeners

protected void notifyMessageRemovedListeners(boolean removed,
                                             Message[] messages)

open

public abstract void open(int mode)
                   throws MessagingException
Throws:
MessagingException

removeConnectionListener

public void removeConnectionListener(ConnectionListener listener)

removeFolderListener

public void removeFolderListener(FolderListener listener)

removeMessageChangedListener

public void removeMessageChangedListener(MessageChangedListener listener)

removeMessageCountListener

public void removeMessageCountListener(MessageCountListener listener)

renameTo

public abstract boolean renameTo(Folder newName)
                          throws MessagingException
Throws:
MessagingException

search

public Message[] search(SearchTerm term)
                 throws MessagingException
Throws:
MessagingException

search

public Message[] search(SearchTerm term,
                        Message[] messages)
                 throws MessagingException
Throws:
MessagingException

setFlags

public void setFlags(int from,
                     int to,
                     Flags flags,
                     boolean value)
              throws MessagingException
Throws:
MessagingException

setFlags

public void setFlags(int[] ids,
                     Flags flags,
                     boolean value)
              throws MessagingException
Throws:
MessagingException

setFlags

public void setFlags(Message[] messages,
                     Flags flags,
                     boolean value)
              throws MessagingException
Throws:
MessagingException

setSubscribed

public void setSubscribed(boolean subscribed)
                   throws MessagingException
Throws:
MessagingException

toString

public String toString()


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.