|
||||||||||
| 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(java.lang.String path,
java.lang.String style,
java.lang.String variation,
java.util.Locale locale,
java.lang.String extensions,
boolean strict)
Construct. |
|
| Method Summary | |
|---|---|
java.lang.String |
getExtension()
Get the exact filename extension used for the latest resource path. |
java.util.Locale |
getLocale()
Get the exact Locale which has been used for the latest resource path. |
java.lang.String |
getStyle()
Get the exact Style which has been used for the latest resource path. |
java.lang.String |
getVariation()
Get the exact Variation which has been used for the latest resource path. |
boolean |
hasNext()
|
protected ExtensionResourceNameIterator |
newExtensionResourceNameIterator(java.lang.String extensions)
|
protected LocaleResourceNameIterator |
newLocaleResourceNameIterator(java.util.Locale locale,
boolean strict)
|
protected StyleAndVariationResourceNameIterator |
newStyleAndVariationResourceNameIterator(java.lang.String style,
java.lang.String variation)
|
java.lang.String |
next()
|
void |
remove()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceNameIterator(java.lang.String path,
java.lang.String style,
java.lang.String variation,
java.util.Locale locale,
java.lang.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 final java.util.Locale getLocale()
public final java.lang.String getStyle()
public final java.lang.String getVariation()
public final java.lang.String getExtension()
public boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.String>Iterator.hasNext()public java.lang.String next()
next in interface java.util.Iterator<java.lang.String>Iterator.next()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
protected LocaleResourceNameIterator newLocaleResourceNameIterator(java.util.Locale locale,
boolean strict)
locale - strict -
protected StyleAndVariationResourceNameIterator newStyleAndVariationResourceNameIterator(java.lang.String style,
java.lang.String variation)
style - variation -
protected ExtensionResourceNameIterator newExtensionResourceNameIterator(java.lang.String extensions)
extensions -
public void remove()
remove in interface java.util.Iterator<java.lang.String>Iterator.remove()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||