Interface IFormReplacerParams

All Superinterfaces:
ILanguageTagProviding, IReplacerParams, Serializable
All Known Subinterfaces:
IPlaceholderValueParams
All Known Implementing Classes:
DefaultReplacerParameters

public interface IFormReplacerParams extends IReplacerParams, ILanguageTagProviding
Author:
XIMA MEDIA GmbH
  • Method Details

    • getClient

      Mandant getClient()
      Returns:
      the current Mandant object
    • getRepetitionContainer

      default IRepetitionContainer getRepetitionContainer()
      When a form element placeholder is replaced and the form element is repeated, all repeated values are joined with a comman by default and used as the replacement value. When a repetition container is given as the context for the replacement and the form element is inside the same reptition container, only the value at the given index is used.

      For example, let's say we have a form with the following elements:

      • ed1
      • fs1 (repeated fieldset with the following elements)
        • tf1
        • tf2
      • fs2 (repeated fieldset with the following elements)
        • upl1
        • upl2
      Let's also say we have two repetions for each fieldset, and the the form elements have the value valTf1_1, valTf1_2, valTf2_1, valTf1_2, valUpl1_1, valUpl1_2, valUpl2_1, valUpl2_2.

      Now when we have the placeholder [%ed1%]_[%tf1%]_[%upl2%], it is replaced by valEd1_valTf1_1,valTf1_2_valUpl2_1,valUpl2_2 by default.

      But if we are making the replacement within the context of upl2, e.g. when that placeholder is used to compute the file name for upl2, we want to use only the value of the current repetition for upl2, not a values joined with a comma.

      To do this, we can set the repetition container to (name="fs2", index=0). Then the placeholder evaluates to valEd1_valTf1_1,valTf1_2_valUpl2_1. If we set the context to (name="fs2", index=1) instead, the placeholder evaluates valEd1_valTf1_1,valTf1_2_valUpl2_2.

      Returns:
      The repetition context where the replacement is made. May be null.
    • getEscaper

      default IPlaceholderEscaper getEscaper()
      Description copied from interface: IReplacerParams
      The placeholder escaper, which should applied for the replaced placeholder values before they returned to the document
      Specified by:
      getEscaper in interface IReplacerParams
      Returns:
      an instance of IPlaceholderEscaper
    • getLanguageTag

      default String getLanguageTag()
      Specified by:
      getLanguageTag in interface ILanguageTagProviding
      Returns:
      The language tag (Locale.toLanguageTag()) provided by this object.
    • getFormData

      IFormDataAdapter getFormData()
    • getFormVersion

      FormVersion getFormVersion()
      Returns:
      the current FormVersion object
    • getProcess

      Vorgang getProcess()
      Returns:
      the current Vorgang object
    • isEncodeForHTML

      @Deprecated boolean isEncodeForHTML()
      Deprecated.
    • isEncodeFormValuesForPlaceholder

      default boolean isEncodeFormValuesForPlaceholder()
      Specified by:
      isEncodeFormValuesForPlaceholder in interface IReplacerParams
    • setFormData

      void setFormData(IFormDataAdapter formData)
    • isReplaceFormPlaceholders

      default boolean isReplaceFormPlaceholders()
      Returns:
      When false, form placeholders are not replaced.