Interface DescriptionService
- All Known Subinterfaces:
DescriptionStorage
Deprecated, for removal: This API element is subject to removal in a future version.
The description service provides configuration and runtime interaction of described objects.
- Author:
- Julien Viet
-
Method Summary
Modifier and TypeMethodDescriptiongetDescription(String id) Deprecated, for removal: This API element is subject to removal in a future version.Returns the default description or null if it does not exist.getDescription(String id, Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.Returns a description for the specified locale argument or null if it does not exist.Deprecated, for removal: This API element is subject to removal in a future version.Returns a map containing all the descriptions of an object or null if the object is not internationalized.resolveDescription(String id, Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.Resolve a description with thelocaleargument.resolveDescription(String id, Locale locale2, Locale locale1) Deprecated, for removal: This API element is subject to removal in a future version.Resolve a description, thelocale1argument specifies which locale is relevant for retrieval, thelocale2specifies which locale should be defaulted to when thelocale1cannot provide any relevant match.voidsetDescription(String id, Locale locale, State description) Deprecated, for removal: This API element is subject to removal in a future version.Update the description for the specified locale to the new description or remove it if the description argument is null.voidsetDescription(String id, State description) Deprecated, for removal: This API element is subject to removal in a future version.Update the default description to the new description or remove it if the description argument is null.voidsetDescriptions(String id, Map<Locale, State> descriptions) Deprecated, for removal: This API element is subject to removal in a future version.Updates the description of the specified object or remove the internationalized characteristic of the object if the description map is null.
-
Method Details
-
resolveDescription
Deprecated, for removal: This API element is subject to removal in a future version.Resolve a description with the
localeargument.- Parameters:
id- the object idlocale- the locale to resolve- Returns:
- the description
- Throws:
NullPointerException- if theidor thelocaleargument is null
-
resolveDescription
Deprecated, for removal: This API element is subject to removal in a future version.Resolve a description, the
The resolution follows those rules:locale1argument specifies which locale is relevant for retrieval, thelocale2specifies which locale should be defaulted to when thelocale1cannot provide any relevant match. Thelocale2argument is optional.- The resolution is performed against the locale1.
- When the locale1 does not resolve and a locale2 is provided, a resolution is performed with locale2.
- Otherwise null is returned.
- Parameters:
id- the object idlocale2- the first localelocale1- the second locale- Returns:
- the description
- Throws:
NullPointerException- if theidor thelocale1argument is null
-
getDescription
Deprecated, for removal: This API element is subject to removal in a future version.Returns the default description or null if it does not exist.- Parameters:
id- the object id- Returns:
- the description
- Throws:
NullPointerException- if the id argument is null
-
setDescription
Deprecated, for removal: This API element is subject to removal in a future version.Update the default description to the new description or remove it if the description argument is null.- Parameters:
id- the object iddescription- the new description- Throws:
NullPointerException- if the id argument is null
-
getDescription
Deprecated, for removal: This API element is subject to removal in a future version.Returns a description for the specified locale argument or null if it does not exist.- Parameters:
id- the object idlocale- the locale- Returns:
- the description
- Throws:
NullPointerException- if the id or locale argument is null
-
setDescription
void setDescription(String id, Locale locale, State description) throws NullPointerException, IllegalArgumentException Deprecated, for removal: This API element is subject to removal in a future version.Update the description for the specified locale to the new description or remove it if the description argument is null.- Parameters:
id- the object idlocale- the localedescription- the new description- Throws:
NullPointerException- if the id or locale argument is nullIllegalArgumentException- if the locale is not valid
-
getDescriptions
Deprecated, for removal: This API element is subject to removal in a future version.Returns a map containing all the descriptions of an object or null if the object is not internationalized.- Parameters:
id- the object id- Returns:
- the map the description map
- Throws:
NullPointerException- if the id is null
-
setDescriptions
void setDescriptions(String id, Map<Locale, State> descriptions) throws NullPointerException, IllegalArgumentExceptionDeprecated, for removal: This API element is subject to removal in a future version.Updates the description of the specified object or remove the internationalized characteristic of the object if the description map is null.- Parameters:
id- the object iddescriptions- the new descriptions- Throws:
NullPointerException- if the id is nullIllegalArgumentException- if the map contains an invalid locale
-
DescriptionStorageinstead since this is a storage layer and the name is ambiguous