public interface SettingsService { <T> T setting( String name, Class<T> expectedType, Object... beans); <T> T settingWithDefault([...]); <T> List<T> settingAsList([...]); <K, V> Map<K, V> settingAsMap([...]); [...] }
All setting*
methods are actually just variants of the basic
setting
method. Some provide additional convenience like
settingWithDefault
, others have complex return types which cannot be expressed
as a simple type parameter, for example settingAsList
. All setting*
methods have some common parameters which are described in Table 4.4, “
Parameters of the settings* methods
”. For detailed
descriptions of the setting*
methods please consult the API documentation of the
SettingsService.
Parameter | Description |
---|---|
|
The name (or key) of the setting to fetch. |
|
The type of the returned object. This parameter allows for type safety and prevents
you from unchecked casts of the result. For the |
|
Settings are always fetched for one or multiple targets, which are passed by the
|
Table 4.4. Parameters of the settings* methods