|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.util.decorator.DecoratorMulti18nProvider
public abstract class DecoratorMulti18nProvider
A decorator provider for multi-i18n locale.
Implements the methodloadDecorators(Locale) to fill the decorators
availables.
Then can obtain decorator via the methods getDecorator(...)
| Nested Class Summary | |
|---|---|
static class |
DecoratorMulti18nProvider.DecoratorContext<T>
|
| Field Summary | |
|---|---|
protected Map<Locale,Collection<DecoratorMulti18nProvider.DecoratorContext<?>>> |
decoratorContexts
Loaded decorators. |
| Constructor Summary | |
|---|---|
DecoratorMulti18nProvider()
|
|
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
|
getDecorator(Locale locale,
O object)
Obtain a decorator for the given object using the given locale. |
|
|
getDecorator(Locale locale,
O object,
String name)
Obtain a decorator given a object and an extra name to qualify the context using the given locale. |
|
|
getDecoratorByType(Locale locale,
Class<O> type)
Obtain a decorator given a type on the given locale. |
|
|
getDecoratorByType(Locale locale,
Class<O> type,
String name)
Obtain a decorator given a type and a extra context name on the given locale. |
|
protected
|
getDecoratorContext(Locale locale,
Class<T> type,
String context,
boolean doLoad)
|
|
protected Map<Locale,Collection<DecoratorMulti18nProvider.DecoratorContext<?>>> |
getDecoratorContexts()
|
|
protected Collection<DecoratorMulti18nProvider.DecoratorContext<?>> |
getDecoratorContexts(Locale locale,
boolean doLoad)
|
|
protected abstract void |
loadDecorators(Locale locale)
Load all decorators of the provider for the given locale. |
|
protected void |
registerDecorator(Locale locale,
Decorator<?> decorator)
|
|
protected
|
registerDecorator(Locale locale,
String context,
Decorator<T> decorator)
Register a new decorator in the cache of the provider. |
|
protected void |
registerJXPathDecorator(Locale locale,
Class<?> klass,
String expression)
|
|
protected void |
registerJXPathDecorator(Locale locale,
Class<?> klass,
String name,
String expression)
|
|
protected void |
registerMultiJXPathDecorator(Locale locale,
Class<?> klass,
String expression,
String separator,
String separatorReplacement)
|
|
protected void |
registerMultiJXPathDecorator(Locale locale,
Class<?> klass,
String name,
String expression,
String separator,
String separatorReplacement)
|
|
protected void |
registerPropertyDecorator(Locale locale,
Class<?> klass,
String expression)
|
|
protected void |
registerPropertyDecorator(Locale locale,
Class<?> klass,
String name,
String expression)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<Locale,Collection<DecoratorMulti18nProvider.DecoratorContext<?>>> decoratorContexts
getDecoratorContexts(Locale, boolean).
| Constructor Detail |
|---|
public DecoratorMulti18nProvider()
| Method Detail |
|---|
protected abstract void loadDecorators(Locale locale)
locale.
locale - the locale to use to load decorators.
public <O> Decorator<O> getDecorator(Locale locale,
O object)
locale.
O - object of decorated objectlocale - user localeobject - object of decorated object
null if not found
public <O> Decorator<O> getDecorator(Locale locale,
O object,
String name)
locale.
O - object of decorated objectlocale - user localeobject - object of decorated objectname - extra name to qualify the decorator to use
null if not found
public <O> Decorator<O> getDecoratorByType(Locale locale,
Class<O> type)
locale.
O - type of decorated objectlocale - user localetype - type of decorated object
null if not found
public <O> Decorator<O> getDecoratorByType(Locale locale,
Class<O> type,
String name)
locale.
O - type of decorated objectlocale - user localetype - type of decorated objectname - extra name to qualify the decorator to use
null if not foundpublic void clear()
protected Map<Locale,Collection<DecoratorMulti18nProvider.DecoratorContext<?>>> getDecoratorContexts()
protected Collection<DecoratorMulti18nProvider.DecoratorContext<?>> getDecoratorContexts(Locale locale,
boolean doLoad)
protected <T> DecoratorMulti18nProvider.DecoratorContext<T> getDecoratorContext(Locale locale,
Class<T> type,
String context,
boolean doLoad)
protected void registerPropertyDecorator(Locale locale,
Class<?> klass,
String expression)
protected void registerJXPathDecorator(Locale locale,
Class<?> klass,
String expression)
protected void registerMultiJXPathDecorator(Locale locale,
Class<?> klass,
String expression,
String separator,
String separatorReplacement)
protected void registerPropertyDecorator(Locale locale,
Class<?> klass,
String name,
String expression)
protected void registerJXPathDecorator(Locale locale,
Class<?> klass,
String name,
String expression)
protected void registerMultiJXPathDecorator(Locale locale,
Class<?> klass,
String name,
String expression,
String separator,
String separatorReplacement)
protected void registerDecorator(Locale locale,
Decorator<?> decorator)
protected <T> void registerDecorator(Locale locale,
String context,
Decorator<T> decorator)
T - type of data decoratedlocale - the given locale to use for this decoratorcontext - the name decoratordecorator - the decorator to register
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||