ToolboxImportFileGenerator

This commit is contained in:
gexce
2017-08-07 18:12:22 +02:00
parent 55f4f98da2
commit 6a2f9eb96e
@@ -45,6 +45,8 @@ import com.univocity.parsers.csv.CsvParserSettings;
public class ToolboxImportFileGenerator {
private static Logger log = Logger.getLogger(ToolboxImportFileGenerator.class);
private static String toolboxExportFilePath = "C:\\Users\\gexce\\Desktop\\Migration CS - SQL Server\\export-2017-08-07.csv";
private static final Map<String, String> brandMap;
private static final Map<String, String> unitMap;
@@ -220,8 +222,8 @@ public class ToolboxImportFileGenerator {
brandMap.put("Prosper FX", "Prosper");
brandMap.put("Protech Plus", "TEMPORARY");
brandMap.put("ProTechPlus", "TEMPORARY");
brandMap.put("Protégé", "TEMPORARY");
brandMap.put("Protégé FL", "TEMPORARY");
brandMap.put("Protg", "TEMPORARY");
brandMap.put("Protg FL", "TEMPORARY");
brandMap.put("Provado", "TEMPORARY");
brandMap.put("Provost", "Provost");
brandMap.put("Provost Opti", "Provost Opti");
@@ -497,8 +499,8 @@ public class ToolboxImportFileGenerator {
unitMap.put("Prosper FX", "Crop Protection");
unitMap.put("Protech Plus", "Crop Protection");
unitMap.put("ProTechPlus", "Crop Protection");
unitMap.put("Protégé", "Crop Protection");
unitMap.put("Protégé FL", "Crop Protection");
unitMap.put("Protg", "Crop Protection");
unitMap.put("Protg FL", "Crop Protection");
unitMap.put("Provado", "Crop Protection");
unitMap.put("Provost", "Crop Protection");
unitMap.put("Provost Opti", "Crop Protection");
@@ -594,8 +596,6 @@ public class ToolboxImportFileGenerator {
}
private static String toolboxExportFilePath = "C:\\Users\\gexce\\Desktop\\Migration CS - SQL Server\\export-2017-08-03.csv";
private List<String[]> rows;
private HashMap<Integer, Asset> assets = new HashMap<Integer, Asset>();
@@ -644,8 +644,17 @@ public class ToolboxImportFileGenerator {
asset.assetPath = "/Resources/Upload/Toolbox";
asset.filename = line[1];
//appendClassification
asset.byr_Title = line[2];
asset.byr_cs_assetApproval = "No Approval"; // TODO check value
//asset.byr_cs_license_classification = ???
asset.byr_cs_keywords_tl = "toolbox import";
asset.byr_MarketingId = line[3];
assets.put(assetId, asset);