Class ModelFactory


  • @Component
    public class ModelFactory
    extends Object
    This class converts the data model of a page to a viewmodel for the api.
    Since:
    9.2
    Author:
    A.Pragt
    • Method Detail

      • convert

        public PageContent convert​(com.aquima.interactions.composer.IPage page,
                                   String defaultLanguageCode,
                                   String languageCode,
                                   com.aquima.interactions.foundation.IValueFormatter valueFormatter)
        This method converts the page to the viewmodel.
        Parameters:
        page - The page to convert, not null.
        defaultLanguageCode - The default language code to use (in case the languagecode isn't available), not null.
        languageCode - The current language code, not null.
        valueFormatter - The value formatter to use, not null.
        Returns:
        The page viewmodel, never null.