public class DefaultFileGeneratorOperation extends AbstractImpexGeneratorOperation implements FileGeneratorOperation
| Constructor and Description |
|---|
DefaultFileGeneratorOperation() |
| Modifier and Type | Method and Description |
|---|---|
String |
assembleOutputFileName(ImportCockpitCronJobModel cronJob)
Assembles the name for the output file out of the cron job code and a time stamp,
following the pattern: import_package_[cronjob code]_[dd-MM-yyyy-HH-mm-SSS].
|
File |
createTmpFile(String prefix,
String filename)
Creates an empty file in the default temporary-file directory, using
the given prefix and filename to generate its name.
|
boolean |
writeToCsvFile(File file,
String encoding,
Map<Integer,String> data)
Writes a single line to the writer.
|
appendCatalogVersionDetailsForAttributeReference, appendOwner, apppendTranslatorForProductAttrib, getCatalogTypeService, getCatalogVersionsForMapping, getGeneratedDocIDReference, getHaveUniqueAttributes, getMappingLineService, getMappingService, getVersionForMappingLine, hasMappedSource, hasMappedSources, isCatalogItem, setCatalogTypeService, setMappingLineService, setMappingServicepublic String assembleOutputFileName(ImportCockpitCronJobModel cronJob)
FileGeneratorOperationassembleOutputFileName in interface FileGeneratorOperationpublic File createTmpFile(String prefix, String filename)
CsvFileOperationHandlercreateTmpFile in interface CsvFileOperationHandlerprefix - - The prefix string to be used in generating the file's name; must be at least three characters long.filename - - The filename string to be used in generating the file's name; may be null, in which case the
prefix ".tmp" will be used.public boolean writeToCsvFile(File file, String encoding, Map<Integer,String> data)
CsvFileOperationHandlerCSVReader.parseLine(String) how the map looks like. The line will
be quoted in the textseparator char. Map{
{ 0:Integer, Field_1:String },
{ 1:Integer, Field_2:String },
...
{ n:Integer, Field_n:String }
}
writeToCsvFile in interface CsvFileOperationHandlerfile - - An abstract pathname denoting the CSV file to write to.encoding - - The encoding to use for the CSV file.data - - The line of data which will be written.Copyright © 2017 SAP SE. All Rights Reserved.