Class ModelFactory

java.lang.Object
com.aquima.web.api.model.page.ModelFactory
All Implemented Interfaces:
IModelFactory

@Component public class ModelFactory extends Object implements IModelFactory
This class converts the data model of a page to a viewmodel for the api.
Since:
9.2
Author:
A.Pragt
  • Constructor Details Link icon

  • Method Details Link icon

    • convert Link icon

      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.
      Specified by:
      convert in interface IModelFactory
      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.