|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.core.util.resource.locator.ResourceNameIterator
public class ResourceNameIterator
Contains the logic to locate a resource based on a path, style (see
Session
), variation, locale and extension strings. The full filename
will be built like:
<path>_<variation>_<_<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 | |
---|---|
ResourceNameIterator(String path,
String style,
String variation,
Locale locale,
Iterable<String> extensions,
boolean strict)
Construct. |
Method Summary | |
---|---|
String |
getExtension()
Get the exact filename extension used for the latest resource path. |
Locale |
getLocale()
Get the exact Locale which has been used for the latest resource path. |
String |
getStyle()
Get the exact Style which has been used for the latest resource path. |
String |
getVariation()
Get the exact Variation which has been used for the latest resource path. |
boolean |
hasNext()
|
protected ExtensionResourceNameIterator |
newExtensionResourceNameIterator(Iterable<String> extensions)
|
protected LocaleResourceNameIterator |
newLocaleResourceNameIterator(Locale locale,
boolean strict)
|
protected StyleAndVariationResourceNameIterator |
newStyleAndVariationResourceNameIterator(String style,
String variation)
|
String |
next()
|
void |
remove()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceNameIterator(String path, String style, String variation, Locale locale, Iterable<String> extensions, boolean strict)
path
- The path of the resource. In case the parameter 'extensions' is null, the path
will be checked and if a filename extension is present, it'll be used instead.style
- A theme or style (see Session
)variation
- The component's variation (of the style)locale
- The Locale to applyextensions
- the filename's extensionsstrict
- If false, weaker combinations of style, locale, etc. are tested as wellMethod Detail |
---|
public final Locale getLocale()
getLocale
in interface IResourceNameIterator
public final String getStyle()
getStyle
in interface IResourceNameIterator
public final String getVariation()
getVariation
in interface IResourceNameIterator
public final String getExtension()
getExtension
in interface IResourceNameIterator
public boolean hasNext()
hasNext
in interface Iterator<String>
Iterator.hasNext()
public String next()
next
in interface Iterator<String>
Iterator.next()
public String toString()
toString
in class Object
Object.toString()
protected LocaleResourceNameIterator newLocaleResourceNameIterator(Locale locale, boolean strict)
locale
- strict
-
protected StyleAndVariationResourceNameIterator newStyleAndVariationResourceNameIterator(String style, String variation)
style
- variation
-
protected ExtensionResourceNameIterator newExtensionResourceNameIterator(Iterable<String> extensions)
extensions
-
public void remove()
remove
in interface Iterator<String>
Iterator.remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |