org.apache.wicket.util.resource.locator
Interface IResourceStreamLocator

All Known Implementing Classes:
OsgiResourceStreamLocator, ResourceStreamLocator

public interface IResourceStreamLocator

Interface for code that locates resources.

Author:
Jonathan Locke

Method Summary
 IResourceStream locate(Class<?> clazz, String path)
          Loads a resource, given a path and class.
 IResourceStream locate(Class<?> clazz, String path, String style, Locale locale, String extension)
          Loads a resource, given a path, style, locale and extension.
 

Method Detail

locate

IResourceStream locate(Class<?> clazz,
                       String path)
Loads a resource, given a path and class. Typically this method is either called by external clients if they are not interested in a lookup that takes the style and locale into account, or it is called by the implementation of locate(Class, String, String, Locale, String) where the latter just takes care of trying out the different combinations for the provided style and locale and uses this method to actually load the resource stream.

Parameters:
clazz - The class loader for delegating the loading of the resource
path - The path of the resource
Returns:
The resource or null

locate

IResourceStream locate(Class<?> clazz,
                       String path,
                       String style,
                       Locale locale,
                       String extension)
Loads a resource, given a path, style, locale and extension.

Parameters:
clazz - The class loader for delegating the loading of the resource
path - The path of the resource
style - Any resource style, such as a skin style (see Session)
locale - The locale of the resource to load
extension - The extension of the resource
Returns:
The resource or null


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