Class DialectFallbackText

java.lang.Object
com.aquima.interactions.portal.ds.sys.dialects.DialectFallbackText
All Implemented Interfaces:
IMultilingualText, Serializable

public final class DialectFallbackText extends Object implements IMultilingualText
Internal class to wrap a multilingual text to add dialect fallback behaviour for multilingual elements.
Since:
8.4
Author:
Jon van Leuven
See Also:
  • Method Details

    • valueOf

      protected static IMultilingualText valueOf(IMultilingualText text, FallbackLanguages fallbackLanguages)
    • getValue

      public String getValue(String languageCode)
      Description copied from interface: IMultilingualText
      Retrieves the text for the specified language code. If desired one can return a constant text independent of language code.
      Specified by:
      getValue in interface IMultilingualText
      Parameters:
      languageCode - never null
      Returns:
      The text, can return a null pointer.
    • getValue

      public String getValue(String firstLanguageCode, String secondLanguageCode)
      Description copied from interface: IMultilingualText
      Retrieves the text for the specified language code. If this text does not exist, the text of the fallback language code is being retrieved. If desired one can return a constant text independent of language code.
      Specified by:
      getValue in interface IMultilingualText
      Parameters:
      firstLanguageCode - never null
      secondLanguageCode - never null
      Returns:
      The text, can return a null pointer.
    • getLanguageCodes

      public String[] getLanguageCodes()
      Description copied from interface: IMultilingualText
      Retrieves the language codes.
      Specified by:
      getLanguageCodes in interface IMultilingualText
      Returns:
      The text, can't return null.
    • getDefaultText

      public String getDefaultText()
      Description copied from interface: IMultilingualText
      Returns the default text.
      Specified by:
      getDefaultText in interface IMultilingualText
      Returns:
      The default text, can be null.