Interface IFormReplacerParams

    • Method Detail

      • getClient

        Mandant getClient()
        Returns:
        The current client scope.
      • getFieldRepetitions

        default Map<String,​Integer> getFieldRepetitions()
        When a form element placeholder is replaced and the form element is repeated, all repeated values are joined with a comma 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 repetition 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 field set with the following elements)
          • tf1
          • tf2
        • fs2 (repeated field set with the following elements)
          • upl1
          • upl2
        Let's also say we have two repetitions for each field set, 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 field repetitions to (name="upl2", index=0). Then the placeholder evaluates to valEd1_valTf1_1,valTf1_2 valUpl2_1. If we set the repetitions to (name="upl1", index=1) instead, the placeholder evaluates to valEd1_valTf1_1,valTf1_2 valUpl2_2.

        When this logic should be applied to all items in a repeated container, this method may return just that container. If this logic should be applied only to some items of a repeated container, those items must be returned individually. When multiple of the returned containers match, the first is used. Note however, that if you return a container within a repeated container, the children of the inner (non-repeated) container are not resolved automatically.

        Returns:
        The repetition context where the replacement is made. A mapping between the name of a form element and the repetition index for that form element or container.
      • getFormData

        IFormDataAdapter getFormData()
        Returns:
        The form data adapter with the data from the curren form record context, if any, for which the placeholder replacement is performed.
      • getFormVersion

        FormVersion getFormVersion()
        Returns:
        The form version context, if any, for which the placeholder replacement is performed.
      • getProcess

        Vorgang getProcess()
        Returns:
        The form record context, if any, for which the placeholder replacement is performed.
      • setFormData

        @Deprecated
        void setFormData​(IFormDataAdapter formData)
        Deprecated.
        This interface should not allow for modification. Use whatever mechanism you like to fill in he data in your implementing class.
        Parameters:
        formData - New form data to use.
      • isReplaceFormPlaceholders

        default boolean isReplaceFormPlaceholders()
        Returns:
        When false, form placeholders must not be processed at all.