Class DefaultConfigurableSubtypeAwareConverter<SOURCE,TARGET,OPTION>
java.lang.Object
de.hybris.platform.personalizationfacades.converters.impl.DefaultConfigurableSubtypeAwareConverter<SOURCE,TARGET,OPTION>
- All Implemented Interfaces:
ConfigurableConverter<SOURCE,,TARGET, OPTION> Converter<SOURCE,,TARGET> org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
public class DefaultConfigurableSubtypeAwareConverter<SOURCE,TARGET,OPTION>
extends Object
implements ConfigurableConverter<SOURCE,TARGET,OPTION>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(SOURCE source, TARGET target, Collection<OPTION> options) Converts a SOURCE object into a TARGET object using provided Options.protected ConfigurableSubtypeConverter<SOURCE,TARGET, OPTION> findConverter(SOURCE source) Getting default optionsprotected Class<?>getTargetInstance(SOURCE source) Getting target instance of source objectprotected booleanvoidinit()voidsetAllSubtypeConverters(Collection<ConfigurableSubtypeConverter<SOURCE, TARGET, OPTION>> allSubtypeConverters) voidsetDefaultOptions(Collection<OPTION> defaultOptions) voidsetMarkerClass(Class<?> markerClass) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.personalizationfacades.converters.ConfigurableConverter
convert, convert, convert, convertAll, convertAllMethods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLoggerMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
DefaultConfigurableSubtypeAwareConverter
public DefaultConfigurableSubtypeAwareConverter()
-
-
Method Details
-
init
@PostConstruct public void init() -
hasValidMarkerClass
-
convert
Description copied from interface:ConfigurableConverterConverts a SOURCE object into a TARGET object using provided Options.- Specified by:
convertin interfaceConfigurableConverter<SOURCE,TARGET, OPTION> - Parameters:
source- - the source objecttarget- - the target objectoptions- - the collection of convert options- Returns:
- the TARGET object
-
getTargetInstance
Description copied from interface:ConfigurableConverterGetting target instance of source object- Specified by:
getTargetInstancein interfaceConfigurableConverter<SOURCE,TARGET, OPTION> - Parameters:
source- - the source object- Returns:
- the TARGET object
-
findConverter
-
getDefaultOptions
Description copied from interface:ConfigurableConverterGetting default options- Specified by:
getDefaultOptionsin interfaceConfigurableConverter<SOURCE,TARGET, OPTION> - Returns:
- the Collection of Options
-
setDefaultOptions
-
setMarkerClass
-
getMarkerClass
-
setAllSubtypeConverters
@Autowired(required=false) public void setAllSubtypeConverters(Collection<ConfigurableSubtypeConverter<SOURCE, TARGET, OPTION>> allSubtypeConverters)
-