KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > mail > folder > LocalRootFolder


1 //The contents of this file are subject to the Mozilla Public License Version 1.1
2
//(the "License"); you may not use this file except in compliance with the
3
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
4
//
5
//Software distributed under the License is distributed on an "AS IS" basis,
6
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7
//for the specific language governing rights and
8
//limitations under the License.
9
//
10
//The Original Code is "The Columba Project"
11
//
12
//The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
13
//Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
14
//
15
//All Rights Reserved.
16

17 package org.columba.mail.folder;
18
19 import org.columba.mail.config.FolderItem;
20
21 /**
22  * Top-level folder of all local folders.
23  * <p>
24  * Only purpose of this folder is to allow for a better structure
25  * of the folder hierachy, where local and remote folders are
26  * very easy to distinct.
27  *
28  * @author fdietz
29  */

30 public class LocalRootFolder extends AbstractFolder implements RootFolder {
31
32     /**
33  * Constructor
34  * <p>
35  * Due to limitations of the current plugin system, every folder
36  * which is loaded dynamically needs to have the same constructor
37  * behaviour.
38  * <p>
39  * I've added "String path" for this reason. (fdietz)
40  *
41  */

42     public LocalRootFolder(FolderItem item, String JavaDoc path) {
43         super(item);
44     }
45     
46     /* (non-Javadoc)
47  * @see org.columba.mail.folder.RootFolder#getTrashFolder()
48  */

49     public AbstractFolder getTrashFolder() {
50         return findChildWithUID("105", false);
51     }
52
53     /* (non-Javadoc)
54  * @see org.columba.mail.folder.RootFolder#getInbox()
55  */

56     public AbstractFolder getInboxFolder() {
57         return findChildWithUID("101", false);
58     }
59
60     /** {@inheritDoc} */
61     public boolean supportsAddFolder(String JavaDoc newFolderType) {
62         return true;
63     }
64 }
65
Popular Tags