Class CxScriptProfileMapper<T>
- java.lang.Object
-
- de.hybris.platform.personalizationintegration.mapping.mapper.impl.CxScriptProfileMapper<T>
-
- All Implemented Interfaces:
Populator<T,MappingData>
- Direct Known Subclasses:
CxTestScriptProfileMapper,DefaultCxScriptConsumptionLayerMapper
public class CxScriptProfileMapper<T> extends java.lang.Object implements Populator<T,MappingData>
This mapper implementation retrieve all the active CxMapperScript in the database and execute them to retrieve instances of SegmentMappingData. These segments will be added to the target of the populator. If a script doesn't return a result of the expected type (a list), the mapper will log an error but will continue with subsequent scripts.
-
-
Constructor Summary
Constructors Constructor Description CxScriptProfileMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.Object>createInputParameters(T source)protected java.util.List<SegmentMappingData>executeMapperScrip(CxMapperScriptModel script, java.util.Map<java.lang.String,java.lang.Object> inputParameters)protected java.util.List<CxMapperScriptModel>findMapperScripts()protected FlexibleSearchServicegetFlexibleSearchService()protected java.lang.StringgetScriptGroup()protected ScriptingLanguagesServicegetScriptingLanguagesService()voidpopulate(T source, MappingData target)Populate the target instance with values from the source instance.voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetScriptGroup(java.lang.String scriptGroup)voidsetScriptingLanguagesService(ScriptingLanguagesService scriptingLanguagesService)
-
-
-
Method Detail
-
populate
public void populate(T source, MappingData target)
Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Specified by:
populatein interfacePopulator<T,MappingData>- Parameters:
source- the source objecttarget- the target to fill
-
createInputParameters
protected java.util.Map<java.lang.String,java.lang.Object> createInputParameters(T source)
-
findMapperScripts
protected java.util.List<CxMapperScriptModel> findMapperScripts()
-
executeMapperScrip
protected java.util.List<SegmentMappingData> executeMapperScrip(CxMapperScriptModel script, java.util.Map<java.lang.String,java.lang.Object> inputParameters)
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
getScriptingLanguagesService
protected ScriptingLanguagesService getScriptingLanguagesService()
-
getScriptGroup
protected java.lang.String getScriptGroup()
-
setScriptingLanguagesService
public void setScriptingLanguagesService(ScriptingLanguagesService scriptingLanguagesService)
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
setScriptGroup
public void setScriptGroup(java.lang.String scriptGroup)
-
-