|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.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:
Extensions may be a comma separated list of extensions, e.g. "properties,xml"
| Constructor Summary | |
|---|---|
ResourceNameIterator(String path,
String style,
String variation,
Locale locale,
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(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,
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 filname's extensions (comma separated)strict - If false, weaker combinations of style, locale, etc. are tested as well| Method Detail |
|---|
public Locale getLocale()
public String getStyle()
public String getVariation()
public String getExtension()
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 ObjectObject.toString()
protected LocaleResourceNameIterator newLocaleResourceNameIterator(Locale locale,
boolean strict)
locale - strict -
protected StyleAndVariationResourceNameIterator newStyleAndVariationResourceNameIterator(String style,
String variation)
style - variation -
protected ExtensionResourceNameIterator newExtensionResourceNameIterator(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 | |||||||||