Package com.aquima.web.api.model.page
Class ModelFactory
- java.lang.Object
-
- com.aquima.web.api.model.page.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
-
-
Constructor Summary
Constructors Constructor Description ModelFactory(IApiRendererFactory rendererFactory, IRuntimeKeyMapper runtimeKeyMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
ModelFactory
@Autowired public ModelFactory(IApiRendererFactory rendererFactory, IRuntimeKeyMapper runtimeKeyMapper)
-
-
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.
-
-