Class CampaignTranslation

java.lang.Object
io.goobi.viewer.model.translations.Translation
io.goobi.viewer.model.crowdsourcing.campaigns.CampaignTranslation
All Implemented Interfaces:
Serializable

@Entity public class CampaignTranslation extends Translation implements Serializable
A persistence object holding a translated String value.
Author:
Florian Alpers
See Also:
  • Constructor Details

    • CampaignTranslation

      public CampaignTranslation()
      Creates a new CampaignTranslation instance.
    • CampaignTranslation

      public CampaignTranslation(String language, String tag, String value, Campaign owner)
      Creates a new CampaignTranslation instance.
      Parameters:
      language - BCP 47 language code for this translation
      tag - key identifying the translated field
      value - translated text value
      owner - campaign this translation belongs to
    • CampaignTranslation

      public CampaignTranslation(CampaignTranslation orig)
    • CampaignTranslation

      public CampaignTranslation(CampaignTranslation orig, Campaign owner)
  • Method Details

    • setTranslation

      public static void setTranslation(List<CampaignTranslation> translations, String lang, String value, String tag, Campaign owner)
      setTranslation.
      Parameters:
      translations - mutable list of existing translations to update
      lang - BCP 47 language code to set or add
      value - translated text to assign
      tag - key identifying the translated field
      owner - campaign to assign when creating a new translation
    • getOwner

      public Campaign getOwner()
      Getter for the field owner.
      Returns:
      the campaign this translation belongs to
    • setOwner

      public void setOwner(Campaign owner)
      Setter for the field owner.
      Parameters:
      owner - the campaign this translation belongs to