KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > browser > api > Tree


1 /*====================================================================
2
3 Objectweb Browser Framework
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library 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 GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle, Jerome Moroy.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.util.browser.api;
28
29 /**
30  * Defines methods in order to populate and to manipulate the tree.
31  *
32  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>,
33  * <a HREF="mailto:Jerome.Moroy@lifl.fr">Jérôme Moroy</a>
34  *
35  * @version 0.1
36  */

37 public interface Tree
38 {
39
40     /**
41      * Refresh the selected node.
42      */

43     public void
44     refresh();
45
46     /**
47      * Closes the tree.
48      * We suggest to call this method before closing the application based on this Tree.
49      */

50     public void
51     close();
52
53     /**
54      * Adds an object into the initial context.
55      *
56      * @param name Name of the object
57      * @param value The object to add
58      */

59     public void
60     addEntry(Object JavaDoc name, Object JavaDoc value);
61
62     /**
63      * Adds an object into the initial context and expands the node until a specific level if this one is a context.
64      *
65      * @param name Name of the object
66      * @param value The object to add
67      * @param level The level (>0 for a specific level or <0 for all levels)
68      */

69     public void
70     addEntry(Object JavaDoc name, Object JavaDoc value, int level);
71    
72     /**
73      * Refreshes the selected node name.
74      *
75      * @param odlName The old name.
76      * @param newName The new name.
77      */

78     public void
79     renameSelectedNode(String JavaDoc odlName, String JavaDoc newName);
80     
81     /**
82      * Removes the entry identified by the given name.
83      * This entry must be found within the InitialContext.
84      *
85      * @param name The name
86      */

87     public void
88     removeEntry(Object JavaDoc name);
89     
90     /**
91      * Renames the entry identified by the given name.
92      * This entry must be found within the InitialContext.
93      *
94      * @param currentName The current name of the entry.
95      * @param newName The new name.
96      */

97     public void
98     renameInitialEntry(Object JavaDoc currentName, Object JavaDoc newName);
99     
100     /**
101      * Removes all the entries contained within the InitialContext.
102      */

103     public void
104     clear();
105
106     /**
107      * Provides the number of entries contained within the InitialContext.
108      * @return
109      */

110     public int
111     getInitialContextSize();
112     
113 }
Popular Tags