public.javadoc.org.spincast.core.dictionary.Dictionary.html Maven / Gradle / Ivy
Show all versions of spincast-website Show documentation
Dictionary (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.dictionary
Interface Dictionary
-
- All Known Implementing Classes:
- SpincastDictionaryDefault
public interface Dictionary
The entity to get a localized message given a
specified key.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
String
get(String key)
Gets a message.
String
get(String key,
boolean forceEvaluation)
Gets a message.
String
get(String key,
Locale locale)
Gets a message.
String
get(String key,
Locale locale,
boolean forceEvaluation)
Gets a message.
String
get(String key,
Locale locale,
Map<String,Object> params)
Gets a message.
String
get(String key,
Locale locale,
Pair... params)
Gets a message.
String
get(String key,
Map<String,Object> params)
Gets a message.
String
get(String key,
Pair... params)
Gets a message.
-
-
Method Detail
-
get
String get(String key)
Gets a message.
Will use the proper Locale as provided by the
LocaleResolver
.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
-
get
String get(String key,
Locale locale)
Gets a message.
Uses the specified Locale.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
-
get
String get(String key,
boolean forceEvaluation)
Gets a message.
Will use the proper Locale as provided by the
LocaleResolver
.
- Parameters:
forceEvaluation
- if true
,
the TemplatingEngine
will be used even there
are no parameters. This may be useful to trigger some
templating function that don't need parameters. We don't
use the templting engine will default since it is costy.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
-
get
String get(String key,
Locale locale,
boolean forceEvaluation)
Gets a message.
Uses the specified Locale.
- Parameters:
forceEvaluation
- if true
,
the TemplatingEngine
will be used even there
are no parameters. This may be useful to trigger some
templating function that don't need parameters. We don't
use the templting engine will default since it is costy.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
-
get
String get(String key,
Pair... params)
Gets a message.
Will use the proper Locale as provided by the
LocaleResolver
.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
-
get
String get(String key,
Locale locale,
Pair... params)
Gets a message.
Uses the specified Locale.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
-
get
String get(String key,
Map<String,Object> params)
Gets a message.
Will use the proper Locale as provided by the
LocaleResolver
.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
Copyright © 2019. All rights reserved.