Class AbstractContextualPopulatingConverter<SOURCE,TARGET,CONTEXT>
java.lang.Object
de.hybris.platform.converters.impl.AbstractConverter<SOURCE,TARGET>
de.hybris.platform.converters.impl.AbstractPopulatingConverter<SOURCE,TARGET>
de.hybris.platform.sap.productconfig.runtime.interf.impl.AbstractContextualPopulatingConverter<SOURCE,TARGET,CONTEXT>
- Type Parameters:
SOURCE- type of source objectTARGET- type of target objectCONTEXT- type of populating context
- All Implemented Interfaces:
Populator<SOURCE,,TARGET> PopulatorList<SOURCE,,TARGET> ContextualConverter<SOURCE,,TARGET, CONTEXT> ContextualPopulaterList<SOURCE,,TARGET, CONTEXT> Converter<SOURCE,,TARGET> org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
public class AbstractContextualPopulatingConverter<SOURCE,TARGET,CONTEXT>
extends AbstractPopulatingConverter<SOURCE,TARGET>
implements ContextualPopulaterList<SOURCE,TARGET,CONTEXT>, ContextualConverter<SOURCE,TARGET,CONTEXT>
Compared to it's parent the
So it manages two lists. The
AbstractPopulatingConverter, this abstract converter can handle both ordinary
Populators and ContextualPopulators.So it manages two lists. The
PopulatorList contains ordinary Populators, which are called without a
context during the convert process, while the ContextualPopulaterList contains ContextualPopulators,
which are called with a context during the convert process.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertWithContext(SOURCE source, CONTEXT context) Converts the source object, creating a new instance of the destination typeGet the list of populators.voidPopulate the target instance from the source instance.voidvoidsetContextualPopulators(List<ContextualPopulator<SOURCE, TARGET, CONTEXT>> contextualPopulators) Set the list of populators.Methods inherited from class de.hybris.platform.converters.impl.AbstractPopulatingConverter
getPopulators, populate, setPopulatorsMethods inherited from class de.hybris.platform.converters.impl.AbstractConverter
afterPropertiesSet, convert, convert, createFromClass, createTarget, getMyBeanName, setBeanName, setTargetClassMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convert, convert, convertAll, convertAllIgnoreExceptions, getLoggerMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
AbstractContextualPopulatingConverter
public AbstractContextualPopulatingConverter()
-
-
Method Details
-
getContextualPopulators
Description copied from interface:ContextualPopulaterListGet the list of populators.- Specified by:
getContextualPopulatorsin interfaceContextualPopulaterList<SOURCE,TARGET, CONTEXT> - Returns:
- the populators.
-
setContextualPopulators
public void setContextualPopulators(List<ContextualPopulator<SOURCE, TARGET, CONTEXT>> contextualPopulators) Description copied from interface:ContextualPopulaterListSet the list of populators.- Specified by:
setContextualPopulatorsin interfaceContextualPopulaterList<SOURCE,TARGET, CONTEXT> - Parameters:
contextualPopulators- the populators
-
populate
Populate the target instance from the source instance. Calls a list of injected populators to populate the instance.- Parameters:
source- the source itemtarget- the target item to populatecontext- populating context
-
convertWithContext
Description copied from interface:ContextualConverterConverts the source object, creating a new instance of the destination type- Specified by:
convertWithContextin interfaceContextualConverter<SOURCE,TARGET, CONTEXT> - Parameters:
source- the source objectcontext- converting context- Returns:
- the converted object
-
removePopulatorsDuplicates
@PostConstruct public void removePopulatorsDuplicates()- Overrides:
removePopulatorsDuplicatesin classAbstractPopulatingConverter<SOURCE,TARGET>
-