01: package net.sourceforge.squirrel_sql.plugins.favs;
02:
03: /*
04: * Copyright (C) 2001 Colin Bell
05: * colbell@users.sourceforge.net
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License
09: * as published by the Free Software Foundation; either version 2
10: * of the License, or any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20: */
21: import net.sourceforge.squirrel_sql.fw.persist.ValidationException;
22:
23: final class FolderNode extends BaseNode {
24:
25: private static final long serialVersionUID = 1L;
26: private Folder _folder;
27: private String _identifier;
28: private String _name;
29:
30: FolderNode(Folder folder) throws IllegalArgumentException {
31: super (folder != null ? folder.getName() : "?", true);
32: if (folder == null) {
33: throw new IllegalArgumentException("Null Folder passed");
34: }
35: _folder = folder;
36: }
37:
38: public boolean isLeaf() {
39: return false;
40: }
41:
42: Folder getFolder() {
43: return _folder;
44: }
45:
46: String getName() {
47: return _folder.getName();
48: }
49:
50: void setName(String name) throws ValidationException {
51: _folder.setName(name);
52: }
53: }
|