Package su.onno.importer
Class CatalogImportController
java.lang.Object
su.onno.importer.CatalogImportController
-
Constructor Summary
ConstructorsConstructorDescriptionCatalogImportController(CatalogQueryService catalogQuery, DocumentQueryService documentQuery, UiAccessService access, CatalogCsvImportService catalogImports, DocumentCsvImportService documentImports, OnnoImportProperties properties, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionimportCsv(String name, org.springframework.web.multipart.MultipartFile file, String mapping, CatalogImportMode mode, boolean dryRun, String charset, Principal principal) importDocumentCsv(String name, org.springframework.web.multipart.MultipartFile file, String mapping, DocumentImportMode mode, boolean dryRun, boolean postAfterImport, String groupBy, String charset, Principal principal) preview(String name, org.springframework.web.multipart.MultipartFile file, String charset, Principal principal) previewDocument(String name, org.springframework.web.multipart.MultipartFile file, String charset, Principal principal)
-
Constructor Details
-
CatalogImportController
public CatalogImportController(CatalogQueryService catalogQuery, DocumentQueryService documentQuery, UiAccessService access, CatalogCsvImportService catalogImports, DocumentCsvImportService documentImports, OnnoImportProperties properties, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
preview
@PostMapping("/catalogs/{name}/csv/preview") public CsvPreview preview(@PathVariable String name, @RequestPart("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(required=false) String charset, Principal principal) -
previewDocument
@PostMapping("/documents/{name}/csv/preview") public CsvPreview previewDocument(@PathVariable String name, @RequestPart("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(required=false) String charset, Principal principal) -
importCsv
@PostMapping("/catalogs/{name}/csv") public ImportResult importCsv(@PathVariable String name, @RequestPart("file") org.springframework.web.multipart.MultipartFile file, @RequestParam String mapping, @RequestParam(defaultValue="CREATE_ONLY") CatalogImportMode mode, @RequestParam(defaultValue="false") boolean dryRun, @RequestParam(required=false) String charset, Principal principal) -
importDocumentCsv
@PostMapping("/documents/{name}/csv") public ImportResult importDocumentCsv(@PathVariable String name, @RequestPart("file") org.springframework.web.multipart.MultipartFile file, @RequestParam String mapping, @RequestParam(defaultValue="CREATE_ONLY") DocumentImportMode mode, @RequestParam(defaultValue="false") boolean dryRun, @RequestParam(defaultValue="false") boolean postAfterImport, @RequestParam(required=false) String groupBy, @RequestParam(required=false) String charset, Principal principal)
-