Class ExcelValueConverterRegistry
java.lang.Object
com.hybris.backoffice.excel.validators.engine.converters.ExcelValueConverterRegistry
Default registry for excel converters used during validation process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<CONVERTER extends ExcelValueConverter>
Optional<ExcelValueConverter>getConverter(ExcelAttribute excelAttribute, ImportParameters importParameters, Class<CONVERTER>... exclude) Finds converter which can handle given attribute descriptor.Returns list of registered converters.voidsetConverters(List<ExcelValueConverter> converters) Sets list of converters for the registry.
-
Constructor Details
-
ExcelValueConverterRegistry
public ExcelValueConverterRegistry()
-
-
Method Details
-
getConverter
public <CONVERTER extends ExcelValueConverter> Optional<ExcelValueConverter> getConverter(ExcelAttribute excelAttribute, ImportParameters importParameters, Class<CONVERTER>... exclude) Finds converter which can handle given attribute descriptor.- Parameters:
excelAttribute- which represents selected attribute.exclude- list of converters class which shouldn't be taken into account while finding appropriate converter.- Returns:
- Optional of
ExcelValueConverter. If none converter can handle given attribute thenOptional.empty()will be returned.
-
getConverters
Returns list of registered converters.- Returns:
- list of registered converters.
-
setConverters
Sets list of converters for the registry.- Parameters:
converters- for the registry.
-