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: package org.columba.mail.folder;
17:
18: import org.columba.core.filter.FilterList;
19: import org.columba.core.xml.XmlElement;
20: import org.columba.mail.config.FolderItem;
21:
22: /**
23: * Top-level folder of every IMAP account.
24: * <p>
25: * Only purpose of this folder is to allow for a better structure
26: * of the folder hierachy, where local and remote folders are
27: * very easy to distinct.
28: *
29: * @author fdietz
30: */
31: public abstract class AbstractRemoteFolder extends
32: AbstractMessageFolder {
33: //protected RemoteSearchEngine searchEngine;
34:
35: /**
36: * Constructs a AbstractRemoteFolder.
37: * @param item information about the folder.
38: */
39: public AbstractRemoteFolder(FolderItem item, String path) {
40: super (item, path);
41:
42: // TODO (@author fdietz): move this to AbstractMessageFolder constructor
43: XmlElement filterListElement = node
44: .getElement(FilterList.XML_NAME);
45:
46: if (filterListElement == null) {
47: filterListElement = new XmlElement(FilterList.XML_NAME);
48: getConfiguration().getRoot().addElement(filterListElement);
49: }
50:
51: filterList = new FilterList(filterListElement);
52: }
53:
54: /**
55: * Constructs a Remote Folder.
56: * @param name the name of the folder.
57: * @param type the type of a folder.
58: */
59: public AbstractRemoteFolder(String name, String type, String path) {
60: super(name, type, path);
61: }
62: }
|