KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > common > tree > Tree


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.common.tree;
10
11 import org.jboss.portal.common.FQN;
12
13 /**
14  * Defines a generic tree.
15  *
16  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
17  * @version $Revision: 1.1 $
18  */

19 public interface Tree
20 {
21    /**
22     * Returns a new session.
23     *
24     * @return a new session
25     */

26    Session getSession();
27
28    /**
29     * Returns the root node of the tree.
30     *
31     * @return the root node
32     */

33    Node getRoot();
34
35    /**
36     * Returns the node by its id or null if it does not exists.
37     *
38     * @return the specified node
39     */

40    Node getNode(FQN id);
41
42    /**
43     * Add a change listener on this node.
44     */

45    void addNodeChangeListener(NodeChangeListener listener);
46
47    /**
48     * Remove a change listener on this node.
49     */

50    void removeNodeChangeListener(NodeChangeListener listener);
51 }
52
Popular Tags