Class 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 Detail

      • CxScriptProfileMapper

        public CxScriptProfileMapper()
    • Method Detail

      • populate

        public void populate​(T source,
                             MappingData target)
        Description copied from interface: Populator
        Populate the target instance with values from the source instance.
        Specified by:
        populate in interface Populator<T,​MappingData>
        Parameters:
        source - the source object
        target - the target to fill
      • createInputParameters

        protected java.util.Map<java.lang.String,​java.lang.Object> createInputParameters​(T source)
      • executeMapperScrip

        protected java.util.List<SegmentMappingData> executeMapperScrip​(CxMapperScriptModel script,
                                                                        java.util.Map<java.lang.String,​java.lang.Object> inputParameters)
      • 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)