Interface DataGeneratorOperation
-
- All Superinterfaces:
ImpexGeneratorOperation
- All Known Implementing Classes:
DefaultDataGeneratorOperation
public interface DataGeneratorOperation extends ImpexGeneratorOperation
API of data generation operation (non-header ImpEx lines).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgenerateDataLineForAtomicEntry(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingLineModel mappingLine)java.lang.StringgenerateDataLineForComposedEntry(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingLineModel mappingLine, boolean forMainDataFile, GeneratorOperationState operationState)java.util.Map<java.lang.Integer,java.lang.String>generateDataLineForMappingModel(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingModel mappingModel, GeneratorOperationState operationState)Generates a line of data that can be then written using aCSVWriterobject.java.lang.StringgenerateDataLineForProductAttribEntry(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingLineModel mappingLine)-
Methods inherited from interface de.hybris.platform.importcockpit.services.impex.generator.operations.ImpexGeneratorOperation
getCatalogVersionsForMapping, getGeneratedDocIDReference, getVersionForMappingLine, hasMappedSources, isCatalogItem
-
-
-
-
Method Detail
-
generateDataLineForMappingModel
java.util.Map<java.lang.Integer,java.lang.String> generateDataLineForMappingModel(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingModel mappingModel, GeneratorOperationState operationState) throws java.lang.IllegalArgumentExceptionGenerates a line of data that can be then written using aCSVWriterobject. The data is generated from aMappingModelobject which contains the mapping between data in a source CSV file and an item's attributes discriptors.- Parameters:
inputDataLine- - A line of data read using aCSVWriter.mappingModel- - AMappingModelobject (Source Data - Target Attribute Data) used to generate the data returned.operationState- - AGeneratorOperationStateobject used to hold the sate of the data generation process.- Returns:
- A
Mapcontaining data that can be used to write to aCSVWriter. SeeCSVReader.parseLine(String)how the map looks like. - Throws:
java.lang.IllegalArgumentException- - ifinputDataLine, mappingModel, operationStateis not set to valid data.
-
generateDataLineForComposedEntry
java.lang.String generateDataLineForComposedEntry(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingLineModel mappingLine, boolean forMainDataFile, GeneratorOperationState operationState) throws java.lang.IllegalArgumentException- Parameters:
inputDataLine- - A line of data read using aCSVWriter.mappingLine- - AMappingLineModelobject (Source Data - Target Attribute Data) used to generate the data returned.forMainDataFile- - A boolean flag which indicates if the data generated is for the Main CSV file for import or a generated file (e.g. when composed attributes are generated) that will be a part if the import medias.operationState- - AGeneratorOperationStateobject used to hold the sate of the data generation process.- Returns:
- A
Stringobject containing a line of data that can be appended to aMapcontaining data that can be used to write to aCSVWriter. SeeCSVReader.parseLine(String)how the map looks like. - Throws:
java.lang.IllegalArgumentException- - ifinputDataLine, mappingModel, operationStateis not set to valid data.
-
generateDataLineForAtomicEntry
java.lang.String generateDataLineForAtomicEntry(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingLineModel mappingLine)- Parameters:
inputDataLine- - A line of data read using aCSVWriter.mappingLine- - AMappingLineModelobject (Source Data - Target Attribute Data) used to generate the data returned.- Returns:
- A
Stringobject containing a line of data that can be appended to aMapcontaining data that can be used to write to aCSVWriter. SeeCSVReader.parseLine(String)how the map looks like.
-
generateDataLineForProductAttribEntry
java.lang.String generateDataLineForProductAttribEntry(java.util.Map<java.lang.Integer,java.lang.String> inputDataLine, MappingLineModel mappingLine)- Parameters:
inputDataLine- - A line of data read using aCSVWriter.mappingLine- - AMappingLineModelobject (Source Data - Target Attribute Data) used to generate the data returned.- Returns:
- A
Stringobject containing a line of data that can be appended to aMapcontaining data that can be used to write to aCSVWriter. SeeCSVReader.parseLine(String)how the map looks like.
-
-