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 java.lang.Object implements ConfigurableConverter<SOURCE,TARGET,OPTION>
-
-
Constructor Summary
Constructors Constructor Description DefaultConfigurableSubtypeAwareConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TARGETconvert(SOURCE source, TARGET target, java.util.Collection<OPTION> options)Converts a SOURCE object into a TARGET object using provided Options.protected ConfigurableSubtypeConverter<SOURCE,TARGET,OPTION>findConverter(SOURCE source)java.util.Collection<OPTION>getDefaultOptions()Getting default optionsprotected java.lang.Class<?>getMarkerClass()TARGETgetTargetInstance(SOURCE source)Getting target instance of source objectprotected booleanhasValidMarkerClass(ConfigurableSubtypeConverter csc)voidinit()voidsetAllSubtypeConverters(java.util.Collection<ConfigurableSubtypeConverter<SOURCE,TARGET,OPTION>> allSubtypeConverters)voidsetDefaultOptions(java.util.Collection<OPTION> defaultOptions)voidsetMarkerClass(java.lang.Class<?> markerClass)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.personalizationfacades.converters.ConfigurableConverter
convert, convert, convert, convertAll, convertAll
-
Methods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLogger
-
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
hasValidMarkerClass
protected boolean hasValidMarkerClass(ConfigurableSubtypeConverter csc)
-
convert
public TARGET convert(SOURCE source, TARGET target, java.util.Collection<OPTION> options)
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
public TARGET getTargetInstance(SOURCE source)
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
protected ConfigurableSubtypeConverter<SOURCE,TARGET,OPTION> findConverter(SOURCE source)
-
getDefaultOptions
public java.util.Collection<OPTION> getDefaultOptions()
Description copied from interface:ConfigurableConverterGetting default options- Specified by:
getDefaultOptionsin interfaceConfigurableConverter<SOURCE,TARGET,OPTION>- Returns:
- the Collection of Options
-
setDefaultOptions
public void setDefaultOptions(java.util.Collection<OPTION> defaultOptions)
-
setMarkerClass
public void setMarkerClass(java.lang.Class<?> markerClass)
-
getMarkerClass
protected java.lang.Class<?> getMarkerClass()
-
setAllSubtypeConverters
@Autowired(required=false) public void setAllSubtypeConverters(java.util.Collection<ConfigurableSubtypeConverter<SOURCE,TARGET,OPTION>> allSubtypeConverters)
-
-