| java.lang.Object dtw.webmail.model.JwmaFolderList
JwmaFolderList | class JwmaFolderList (Code) | | Class implementing a list for JwmaFolder
instances.
It has caching functionality, which reduces the need to
reconstruct the list after moving and deleting folders.
author: Dieter Wimberger version: 0.9.7 07/02/2003 |
Method Summary | |
public void | addFolderToList(JwmaFolderImpl folder) Adds a given folder to this list. | public boolean | contains(String path) Tests if this list contains a folder with the
given path.
Parameters: path - the path of the folder as String. | public boolean | contains(JwmaFolder folder) Tests if this list contains a given folder.
Parameters: folder - the folder as JwmaFolder. | public JwmaFolder[] | createFolderArray(List folders) Creates an array of JwmaFolder instances from
the given List.
If the list is empty, then the returned array will be
empty, but not null.
Parameters: folders - the List of folders. | public static JwmaFolderList | createStoreList(Folder folder) Factory method that creates a flat list of all folders on the store.
The given folder should be the root folder, or the default folder
on the store.
Parameters: folder - the javax.mail.Folder instance representing theroot folder. | public static JwmaFolderList | createSubfolderList(Folder folder) Factory method that creates a list of all subfolders of the given
folder.
There is no recursion into subfolders.
Parameters: folder - the javax.mail.Folder instance to be listed. | public String | getPattern() Sets the pattern used for listing folders. | public boolean | isSubscribedOnly() Tests if this JwmaFolderList will work
only with subscribed folders. | public Iterator | iterator() Returns an Iterator over the JwmaFolder instances
contained within this list. | public void | rebuild() Rebuilds this list of folders. | public void | removeFolderFromList(String path) Removes a folder with the given path from this list. | public void | setPattern(String pattern) Returns the pattern for listing folders. | public void | setSubscribedOnly(boolean subscribedOnly) Sets or resets the flag for working only with
subscribed folders. | public int | size() Returns the size of this list. | public List | sublist(int type) Returns a sublist of this list, that contains only
the folders of the given type.
Parameters: type - the requested folder type as int. | public List | sublist(int type, boolean subscribed) Returns a sublist of this list, that contains only
the folders of the given type.
Parameters: type - the requested folder type as int. | public List | sublist(int type, JwmaFolderImpl folder) Returns a sublist of this list, that contains only
the folders of the given type, filtering the given
folder.
This method can be used to obtain targets for moving
messages or other folders.
Parameters: type - the requested folder type as int. Parameters: folder - the JwmaFolderImpl instance to be filteredfrom the list. | public List | sublist(int type, JwmaFolderImpl folder, boolean subscribed) Returns a sublist of this list, that contains only
the folders of the given type, filtering the given
folder.
This method can be used to obtain targets for moving
messages or other folders.
Parameters: type - the requested folder type as int. Parameters: folder - the JwmaFolderImpl instance to be filteredfrom the list. | public List | sublist(int type, String[] exfolders, boolean subscribed) Returns a sublist of this list, that contains only
the folders of the given type, filtering the given
folders.
This method should be used to obtain a list of subscribed
or unsubscribed folders, pasing in the special folders (trash,
draft etc.)
Parameters: type - the requested folder type as int. Parameters: exfolders - the folders (by path) to be filteredfrom the list as String[]. |
LEXOGRAPHICAL | final public static Comparator LEXOGRAPHICAL(Code) | | Defines a Comparator that sorts
the folder instances lexographical.
|
c_SubscribedOnly | public static boolean c_SubscribedOnly(Code) | | |
addFolderToList | public void addFolderToList(JwmaFolderImpl folder)(Code) | | Adds a given folder to this list.
Parameters: folder - the folder to be added as JwmaFolder. |
contains | public boolean contains(String path)(Code) | | Tests if this list contains a folder with the
given path.
Parameters: path - the path of the folder as String. true if this list contains a folder with the given path,false otherwise. |
contains | public boolean contains(JwmaFolder folder)(Code) | | Tests if this list contains a given folder.
Parameters: folder - the folder as JwmaFolder. true if this list contains the given folder,false otherwise. |
createFolderArray | public JwmaFolder[] createFolderArray(List folders)(Code) | | Creates an array of JwmaFolder instances from
the given List.
If the list is empty, then the returned array will be
empty, but not null.
Parameters: folders - the List of folders. the newly created array. |
createStoreList | public static JwmaFolderList createStoreList(Folder folder) throws JwmaException(Code) | | Factory method that creates a flat list of all folders on the store.
The given folder should be the root folder, or the default folder
on the store.
Parameters: folder - the javax.mail.Folder instance representing theroot folder. the newly created JwmaFolderList instance. throws: JwmaException - if it fails to build the folder list. |
createSubfolderList | public static JwmaFolderList createSubfolderList(Folder folder) throws JwmaException(Code) | | Factory method that creates a list of all subfolders of the given
folder.
There is no recursion into subfolders.
Parameters: folder - the javax.mail.Folder instance to be listed. the newly created JwmaFolderList instance. throws: JwmaException - if it fails to build the folder list. |
getPattern | public String getPattern()(Code) | | Sets the pattern used for listing folders.
the pattern as String. |
isSubscribedOnly | public boolean isSubscribedOnly()(Code) | | Tests if this JwmaFolderList will work
only with subscribed folders.
true if subscribed only, false otherwise. |
iterator | public Iterator iterator()(Code) | | Returns an Iterator over the JwmaFolder instances
contained within this list.
the Iterator over the items in this list. |
rebuild | public void rebuild() throws MessagingException, JwmaException(Code) | | Rebuilds this list of folders.
|
removeFolderFromList | public void removeFolderFromList(String path)(Code) | | Removes a folder with the given path from this list.
Parameters: path - the path of the folder to be removed as String. |
setPattern | public void setPattern(String pattern)(Code) | | Returns the pattern for listing folders.
Parameters: pattern - the pattern as String. |
setSubscribedOnly | public void setSubscribedOnly(boolean subscribedOnly)(Code) | | Sets or resets the flag for working only with
subscribed folders.
|
size | public int size()(Code) | | Returns the size of this list.
the size of this list. |
sublist | public List sublist(int type)(Code) | | Returns a sublist of this list, that contains only
the folders of the given type.
Parameters: type - the requested folder type as int. the list containing all folders of the given type asList. |
sublist | public List sublist(int type, boolean subscribed)(Code) | | Returns a sublist of this list, that contains only
the folders of the given type.
Parameters: type - the requested folder type as int. the list containing all folders of the given type asList. |
sublist | public List sublist(int type, JwmaFolderImpl folder)(Code) | | Returns a sublist of this list, that contains only
the folders of the given type, filtering the given
folder.
This method can be used to obtain targets for moving
messages or other folders.
Parameters: type - the requested folder type as int. Parameters: folder - the JwmaFolderImpl instance to be filteredfrom the list. the list containing all folders of the given type asList. |
sublist | public List sublist(int type, JwmaFolderImpl folder, boolean subscribed)(Code) | | Returns a sublist of this list, that contains only
the folders of the given type, filtering the given
folder.
This method can be used to obtain targets for moving
messages or other folders.
Parameters: type - the requested folder type as int. Parameters: folder - the JwmaFolderImpl instance to be filteredfrom the list. the list containing all folders of the given type asList. |
sublist | public List sublist(int type, String[] exfolders, boolean subscribed)(Code) | | Returns a sublist of this list, that contains only
the folders of the given type, filtering the given
folders.
This method should be used to obtain a list of subscribed
or unsubscribed folders, pasing in the special folders (trash,
draft etc.)
Parameters: type - the requested folder type as int. Parameters: exfolders - the folders (by path) to be filteredfrom the list as String[]. the list containing all folders of the given type asList. |
|
|