Class DefaultImportParameterParser
java.lang.Object
com.hybris.backoffice.excel.importing.parser.DefaultImportParameterParser
- All Implemented Interfaces:
ImportParameterParser,org.springframework.core.Ordered
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()booleanparseDefaultValues(String referenceFormat, String defaultValues) Parses referencePattern cell (which is located in the second row) and default values cell (which is located in the third row) and creates map where key is equals to reference key and value is equals to value provided in the third row.parseValue(String cellValue, DefaultValues defaultValues) Parses referencePattern cell (which is located in the second row) and cell with data (which is located in the data row) and creates map where key is equal to reference key and value is equals to value provided in the data row.voidsetMatcher(ExcelParserMatcher matcher) voidsetOrder(int order) voidsetSplitter(ExcelParserSplitter splitter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.backoffice.excel.importing.parser.ImportParameterParser
parseValue
-
Constructor Details
-
DefaultImportParameterParser
public DefaultImportParameterParser()
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceImportParameterParser
-
parseDefaultValues
Parses referencePattern cell (which is located in the second row) and default values cell (which is located in the third row) and creates map where key is equals to reference key and value is equals to value provided in the third row. For example, for the following reference cell's value: catalog:version and default value cell: Default:Online the following map will be returned: {{key: catalog, value: Default}, {key: version, value: Online}}- Specified by:
parseDefaultValuesin interfaceImportParameterParser- Parameters:
referenceFormat- cell's value from second row of excel sheetdefaultValues- cell's value from third row of excel sheet- Returns:
- DefaultValues object. If default values are not provided then only keys will be returned.
-
parseValue
Parses referencePattern cell (which is located in the second row) and cell with data (which is located in the data row) and creates map where key is equal to reference key and value is equals to value provided in the data row. If value is null then default value is taken into account. For example, for the following reference cell's value: catalog:version and cell's value: Default:Online the following map will be returned: {{key: catalog, value: Default}, {key: version, value: Online}}. Parameters map always contains key :ImportParameters.RAW_VALUEwhich represents not parsed value, but merged with default values- Specified by:
parseValuein interfaceImportParameterParser- Parameters:
cellValue- value of cell's datadefaultValues- parsed default values- Returns:
- ParsedValues object. If default values are not provided then only keys will be returned.
-
setMatcher
-
setSplitter
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-