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, String variation, Locale locale, String extension)
          Loads a resource, given a path, style, variation, locale and extension.
 IResourceStream locate(Class<?> clazz, String path, String style, String variation, Locale locale, String extension, boolean strict)
          Loads a resource, given a path, style, variation, 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,
                       String variation,
                       Locale locale,
                       String extension)
Loads a resource, given a path, style, variation, 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)
variation - The component's variation (of the style)
locale - The locale of the resource to load
extension - The extension of the resource
Returns:
The resource or null

locate

IResourceStream locate(Class<?> clazz,
                       String path,
                       String style,
                       String variation,
                       Locale locale,
                       String extension,
                       boolean strict)
Loads a resource, given a path, style, variation, 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)
variation - The component's variation (of the style)
locale - The locale of the resource to load
extension - The extension of the resource
strict - whether the specified attributes must match exactly
Returns:
The resource or null


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