KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > common > net > URLNavigationProvider


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.net;
10
11 import java.util.Iterator JavaDoc;
12 import java.net.URL JavaDoc;
13 import java.io.IOException JavaDoc;
14
15 /**
16  * Defines an interface that provides navigation for URLs.
17  *
18  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
19  * @version $Revision: 1.1 $
20  */

21 public interface URLNavigationProvider
22 {
23    /**
24     * Return true if the url represents a directory.
25     *
26     * @param url the target url
27     * @return true if this URL reprensents a directory
28     * @throws IllegalArgumentException if the url is null or is not accepted
29     * @throws IOException
30     */

31    boolean isDir(URL JavaDoc url) throws IllegalArgumentException JavaDoc, IOException JavaDoc;
32
33    /**
34     * Returns an iterator over the children of the URL.
35     *
36     * @param url the target url
37     * @return an iterator over the children of the url
38     * @throws IllegalArgumentException if the url is null or is not accepted
39     * @throws IOException
40     */

41    Iterator JavaDoc getChildren(URL JavaDoc url) throws IllegalArgumentException JavaDoc, IOException JavaDoc;
42
43    /**
44     * Visit all the children recursively.
45     *
46     * @param url the target url
47     * @param visitor the visitor
48     * @throws IllegalArgumentException if an argument is null or if the url is not accepted
49     * @throws IOException
50 s */

51    void visit(URL JavaDoc url, URLVisitor visitor) throws IllegalArgumentException JavaDoc, IOException JavaDoc;
52 }
53
Popular Tags