org.apache.wicket.util.file
Class WebApplicationPath

java.lang.Object
  extended by org.apache.wicket.util.file.WebApplicationPath
All Implemented Interfaces:
IResourceFinder, IResourcePath

public final class WebApplicationPath
extends Object
implements IResourcePath

Maintain a list of paths which might either be ordinary folders of the filesystem or relative paths to the web application's servlet context.

Author:
Johan Compagner

Constructor Summary
WebApplicationPath(javax.servlet.ServletContext servletContext)
          Constructor
 
Method Summary
 void add(String path)
           
 IResourceStream find(Class<?> clazz, String pathname)
          Looks for a given pathname along this path
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebApplicationPath

public WebApplicationPath(javax.servlet.ServletContext servletContext)
Constructor

Parameters:
servletContext - The webapplication context where the resources must be loaded from
Method Detail

add

public void add(String path)
Specified by:
add in interface IResourcePath
Parameters:
path - add a path that is lookup through the servlet context

find

public IResourceStream find(Class<?> clazz,
                            String pathname)
Description copied from interface: IResourceFinder
Looks for a given pathname along this path

Specified by:
find in interface IResourceFinder
Parameters:
clazz - The class requesting the resource stream
pathname - The filename with possible path
Returns:
The resource stream
See Also:
IResourceFinder.find(Class, String)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.