01: //The contents of this file are subject to the Mozilla Public License Version 1.1
02: //(the "License"); you may not use this file except in compliance with the
03: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
04: //
05: //Software distributed under the License is distributed on an "AS IS" basis,
06: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
07: //for the specific language governing rights and
08: //limitations under the License.
09: //
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
31: RootFolder {
32:
33: /**
34: * Constructor
35: * <p>
36: * Due to limitations of the current plugin system, every folder
37: * which is loaded dynamically needs to have the same constructor
38: * behaviour.
39: * <p>
40: * I've added "String path" for this reason. (fdietz)
41: *
42: */
43: public LocalRootFolder(FolderItem item, String path) {
44: super (item);
45: }
46:
47: /* (non-Javadoc)
48: * @see org.columba.mail.folder.RootFolder#getTrashFolder()
49: */
50: public AbstractFolder getTrashFolder() {
51: return findChildWithUID("105", false);
52: }
53:
54: /* (non-Javadoc)
55: * @see org.columba.mail.folder.RootFolder#getInbox()
56: */
57: public AbstractFolder getInboxFolder() {
58: return findChildWithUID("101", false);
59: }
60:
61: /** {@inheritDoc} */
62: public boolean supportsAddFolder(String newFolderType) {
63: return true;
64: }
65: }
|