Interface LanguageLabelContainer

  • All Superinterfaces:
    Identifiable
    All Known Subinterfaces:
    FormLanguageLabelContainer, WebsiteLanguageLabelContainer

    public interface LanguageLabelContainer
    extends Identifiable
    Website and language specific container for language labels. Several containers exist: one system-wide container per locale, which can be identified by its website id being -1 and several website- and locale-specific containers which contain only overridden language labels that were edited via the user interface.
    • Method Detail

      • getLocale

        String getLocale()
        The locale assigned to this container. For example en_US.
        Returns:
        the locale for which this container contains language labels
      • setLocale

        void setLocale​(String locale)
        Sets the locale for this language label container
        Parameters:
        locale - the string representation of the locale
      • getLanguageLabels

        List<LanguageLabel> getLanguageLabels()
        The list of all language labels in this container
        Returns:
        the list of all language labels in this container
      • setLanguageLabels

        void setLanguageLabels​(List<LanguageLabel> languageLabels)
        Sets the list of LanguageLabels in this container.
        Parameters:
        languageLabels - the list of LanguageLabels in this container
      • getLanguageLabel

        LanguageLabel getLanguageLabel​(String key)
        Returns the language label matching the given key.
        Parameters:
        key - the key to lookup
        Returns:
        The LanguageLabel, or null if the key didn't match anything.
      • addOrUpdateLanguageLabel

        LanguageLabel addOrUpdateLanguageLabel​(String key,
                                               String value)
        Creates a new language label or updates an existing one with the specified key an value.
        Parameters:
        key - the key of the language label to update or to create
        value - the value of the language label to update or to create
        Returns:
        the language label in question