|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.resource.locator.ResourceStreamLocator
public class ResourceStreamLocator
Locate Wicket resource.
Contains the logic to locate a resource based on a path, a style (see
Session
), a locale and an extension string. The full filename will be
built like: <path>_<style>_<locale>.<extension>.
Resource matches will be attempted in the following order:
Locales may contain a language, a country and a region or variant. Combinations of these components will be attempted in the following order:
Constructor Summary | |
---|---|
ResourceStreamLocator()
Constructor |
|
ResourceStreamLocator(IResourceFinder finder)
Constructor |
Method Summary | |
---|---|
IResourceStream |
locate(java.lang.Class clazz,
java.lang.String path)
Loads a resource, given a path and class. |
IResourceStream |
locate(java.lang.Class clazz,
java.lang.String path,
java.lang.String style,
java.util.Locale locale,
java.lang.String extension)
Loads a resource, given a path, style, locale and extension. |
protected IResourceStream |
locateByClassLoader(java.lang.Class clazz,
java.lang.String path)
Search the the resource my means of the various classloaders available |
protected IResourceStream |
locateByResourceFinder(java.lang.Class clazz,
java.lang.String path)
Search the resource by means of the application registered resource finder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceStreamLocator()
public ResourceStreamLocator(IResourceFinder finder)
finder
- resource finderMethod Detail |
---|
public IResourceStream locate(java.lang.Class clazz, java.lang.String path)
IResourceStreamLocator
IResourceStreamLocator.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.
locate
in interface IResourceStreamLocator
clazz
- The class loader for delegating the loading of the resourcepath
- The path of the resource
IResourceStreamLocator.locate(java.lang.Class,
java.lang.String)
public IResourceStream locate(java.lang.Class clazz, java.lang.String path, java.lang.String style, java.util.Locale locale, java.lang.String extension)
IResourceStreamLocator
locate
in interface IResourceStreamLocator
clazz
- The class loader for delegating the loading of the resourcepath
- The path of the resourcestyle
- Any resource style, such as a skin style (see Session
)locale
- The locale of the resource to loadextension
- The extension of the resource
IResourceStreamLocator.locate(java.lang.Class,
java.lang.String, java.lang.String, java.util.Locale, java.lang.String)
protected IResourceStream locateByClassLoader(java.lang.Class clazz, java.lang.String path)
clazz
- path
-
protected IResourceStream locateByResourceFinder(java.lang.Class clazz, java.lang.String path)
clazz
- path
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |