Class RendererUtil


  • public final class RendererUtil
    extends Object
    Utility class used during transformation of data models.
    Since:
    9.2
    Author:
    A.Pragt
    • Method Detail

      • convertMultilingualText

        public static String convertMultilingualText​(com.aquima.interactions.foundation.text.IMultilingualText multilingualText,
                                                     IRendererContext context)
        This method transforms a multilingual text to a single text.
        Parameters:
        multilingualText - The text to transform.
        context - The context to use, never null.
        Returns:
        The single text based on the context, null if the multilingualText was null.
      • convertMessages

        public static List<Message> convertMessages​(com.aquima.interactions.composer.IMessage[] messages,
                                                    IRendererContext context)
        This method transforms a message to the message viewmodel.
        Parameters:
        messages - The messages to convert, not null.
        context - The context to use, never null.
        Returns:
        The converted messages, never null.
      • convertDisplayValue

        public static String convertDisplayValue​(com.aquima.interactions.foundation.IPrimitiveValue value,
                                                 IRendererContext context)
        This method converts a displayvalue to a single value based on the language context.
        Parameters:
        value - The value to convert, not null.
        context - The context to use, not null.
        Returns:
        The single value, never null.
      • convertValidations

        public static List<FieldValidation> convertValidations​(com.aquima.interactions.composer.IFieldValidation[] validations,
                                                               IRendererContext context)
        Converts field validations to field validation viewmodel.
        Parameters:
        validations - the field validations to convert, not null.
        context - The context to use, not null.
        Returns:
        the converted field validations, never null.
        Since:
        9.3.2
      • convertParameters

        public static List<FieldParameter> convertParameters​(com.aquima.interactions.composer.IGlobalParameterValue[] parameters,
                                                             IRendererContext context)
        Converts field parameters to field parameter viewmodels.
        Parameters:
        parameters - the field parameters to convert, not null.
        context - The context to use, not null.
        Returns:
        the converted field parameters, never null.
        Since:
        11.3
      • convertPresentationStyles

        public static List<String> convertPresentationStyles​(com.aquima.interactions.composer.model.PresentationStyle... styles)
        Converts presentation styles to list of presentation style names.
        Parameters:
        styles - the presentation styles, may be null or empty.
        Returns:
        list of presentation styles, never null