Author: chris.laprun(a)jboss.com
Date: 2007-03-27 13:01:38 -0400 (Tue, 27 Mar 2007)
New Revision: 6852
Modified:
trunk/common/src/main/org/jboss/portal/common/net/URLNavigator.java
Log:
- Added visit method without filter parameter for legacy support. (Should fix build).
Modified: trunk/common/src/main/org/jboss/portal/common/net/URLNavigator.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/net/URLNavigator.java 2007-03-27
13:08:36 UTC (rev 6851)
+++ trunk/common/src/main/org/jboss/portal/common/net/URLNavigator.java 2007-03-27
17:01:38 UTC (rev 6852)
@@ -25,8 +25,8 @@
import org.jboss.portal.common.net.file.FileURLNavigationProvider;
import org.jboss.portal.common.net.jar.JarURLNavigationProvider;
+import java.io.IOException;
import java.net.URL;
-import java.io.IOException;
/**
* The URLNavigator class is a registry for various URLNavigationProvider.
@@ -41,12 +41,36 @@
private static final URLNavigationProvider jarNav = new JarURLNavigationProvider();
+ private static final URLFilter NULL_FILTER = new URLFilter()
+ {
+ public boolean acceptFile(URL url)
+ {
+ return true;
+ }
+
+ public boolean acceptDir(URL url)
+ {
+ return true;
+ }
+ };
+
public static void visit(URL url, URLVisitor visitor, URLFilter filter) throws
IllegalArgumentException, IOException
{
URLNavigationProvider provider = getProvider(url);
+
+ if (filter == null)
+ {
+ filter = NULL_FILTER;
+ }
+
provider.visit(url, visitor, filter);
}
+ public static void visit(URL url, URLVisitor visitor) throws IOException
+ {
+ visit(url, visitor, null);
+ }
+
/**
* Return an URLNavigationProvider for the specified URL.
*
Show replies by date