Interface DescriptionService

All Known Subinterfaces:
DescriptionStorage

@Deprecated(forRemoval=true, since="6.5") public interface DescriptionService
Deprecated, for removal: This API element is subject to removal in a future version.
use DescriptionStorage instead since this is a storage layer and the name is ambiguous
The description service provides configuration and runtime interaction of described objects.
Author:
Julien Viet
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resolve a description with the locale argument.
    resolveDescription(String id, Locale locale2, Locale locale1)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resolve a description, the locale1 argument specifies which locale is relevant for retrieval, the locale2 specifies which locale should be defaulted to when the locale1 cannot provide any relevant match.
    void
    setDescription(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.
    void
    setDescription(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.
    void
    setDescriptions(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

      State resolveDescription(String id, Locale locale) throws NullPointerException
      Deprecated, for removal: This API element is subject to removal in a future version.

      Resolve a description with the locale argument.

      Parameters:
      id - the object id
      locale - the locale to resolve
      Returns:
      the description
      Throws:
      NullPointerException - if the id or the locale argument is null
    • resolveDescription

      State resolveDescription(String id, Locale locale2, Locale locale1) throws NullPointerException
      Deprecated, for removal: This API element is subject to removal in a future version.

      Resolve a description, the locale1 argument specifies which locale is relevant for retrieval, the locale2 specifies which locale should be defaulted to when the locale1 cannot provide any relevant match. The locale2 argument is optional.

      The resolution follows those rules:
      • 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 id
      locale2 - the first locale
      locale1 - the second locale
      Returns:
      the description
      Throws:
      NullPointerException - if the id or the locale1 argument is null
    • getDescription

      State getDescription(String id) throws NullPointerException
      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

      void setDescription(String id, State description) throws NullPointerException
      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 id
      description - the new description
      Throws:
      NullPointerException - if the id argument is null
    • getDescription

      State getDescription(String id, Locale locale) throws NullPointerException
      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 id
      locale - 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 id
      locale - the locale
      description - the new description
      Throws:
      NullPointerException - if the id or locale argument is null
      IllegalArgumentException - if the locale is not valid
    • getDescriptions

      Map<Locale,State> getDescriptions(String id) throws NullPointerException
      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, IllegalArgumentException
      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.
      Parameters:
      id - the object id
      descriptions - the new descriptions
      Throws:
      NullPointerException - if the id is null
      IllegalArgumentException - if the map contains an invalid locale