Class ComponentService


  • public class ComponentService
    extends java.lang.Object
    • Constructor Detail

      • ComponentService

        public ComponentService​(MessagesDTO dto)
    • Method Detail

      • getTranslations

        public ComponentService.TranslationsDTO getTranslations()
        Calls getTranslations(Iterator) using the pre-configured locale fallback queue.
        Returns:
        A TranslationsDTO whose message map is one of the items in the following priority-ordered list:
        • The messages in the requested locale
        • The messages in a fallback locale
        • The source messages
        • An empty map
      • getTranslations

        public ComponentService.TranslationsDTO getTranslations​(java.util.Iterator<java.util.Locale> fallbackLocalesIter)
        Gets messages from cache. The cache is refreshed if the set of localized messages is expired or not found.
        Parameters:
        fallbackLocalesIter - The locale fallback queue iterator to be used on failure. If null, there will be no fallback mechanism on failure so the message map will be empty.
        Returns:
        A TranslationsDTO whose data map is one of the following:
        • The messages in the requested locale
        • The messages in a fallback locale
        • The source messages
        • An empty map
      • isComponentAvailable

        public boolean isComponentAvailable()