Interface LocalizedStringField

All Superinterfaces:
CustomField

public interface LocalizedStringField extends CustomField

A field with a localized string value.


Example to create an instance using the builder pattern

     LocalizedStringField localizedStringField = LocalizedStringField.builder()
             .value(valueBuilder -> valueBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getValue

      @NotNull @Valid @NotNull @Valid LocalizedString getValue()

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Returns:
      value
    • setValue

      void setValue(LocalizedString value)

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Parameters:
      value - value to be set
    • of

      static LocalizedStringField of()
      factory method
      Returns:
      instance of LocalizedStringField
    • of

      factory method to create a shallow copy LocalizedStringField
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of LocalizedStringField
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static LocalizedStringFieldBuilder builder()
      builder factory method for LocalizedStringField
      Returns:
      builder
    • builder

      create builder for LocalizedStringField instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLocalizedStringField

      default <T> T withLocalizedStringField(Function<LocalizedStringField,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<LocalizedStringField> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference