Import
Table of Contents
Namespaces
- Dto
- Exceptions
Interfaces
- ImportParserInterface
- Common interface of the three format parsers; all fill one `ImportDto`, so validator and executor
are format-independent. {@see XmlImportParser}, {@see CsvImportParser} and {@see JsonImportParser}
implement it; {@see ImportParserFactory} selects the implementation by `ProductImportFormat`.
Classes
- CsvImportParser
- Parses the flat CSV subset into {@see ImportDto}, with the same output shape as {@see XmlImportParser}.
- ImportBundleVerdict
- Validator verdict for one `<bundle>`, the counterpart of {@see ImportItemVerdict} for variants.
- ImportBundleWriter
- Writes one `<bundle>` (`ProductSet` of `type=2`, no card, variant or stock) exclusively through
the existing Api managers.
- ImportCodebookLoader
- Loads all code lists once per run and builds {@see ImportCodebooks} (id maps) from them.
- ImportCodebooks
- Import code lists (matching of names and keys) as **id maps, not entities**: loaded once per run
({@see ImportCodebookLoader}) and then only queried in memory.
- ImportExecutionContext
- State of one live run: wraps the validation context (job settings, code lists as id maps, log of
the `execute` phase, matching registries) and adds the write summary.
- ImportExecutionSummary
- Running summary of a live run (job states, batching): what is written to the job after each batch
(`processedItems`, `createdCount`, ...) and what decides `done` or `failed` at the end.
- ImportExecutor
- Live import write: walks the file in batches and orchestrates validator and writer.
- ImportFilePath
- Single place that builds the absolute path in `privateDir` from the stored relative path of a job.
- ImportImageDownloader
- SSRF-safe image download for the import; the only place where the import reaches out to the network.
- ImportImageDownloadResult
- Result of one image download ({@see ImportImageDownloader::download()}): a temporary file on disk
(not bytes in memory, images dominate the cost) + the `sha256` of the content and the actually
detected extension (`getimagesize`, not the `Content-Type` header).
- ImportItemVerdict
- Validator verdict for one item (variant): what the executor needs so that it does not duplicate
rules (whether the item is hard-blocked, which action to take, whether the validator already
logged a soft error, which set the item targets).
- ImportLogReader
- Paged reading of the jsonl log (detail shows a paged preview + download).
- ImportLogWriter
- Row log of the import: a **jsonl** file in `privateDir`, one JSON object per row:
`{phase, line, code, action, level, message, key?, value?}`.
- ImportMatcher
- Matching of variant code → set → variant → card, shared by validator and executor.
- ImportParserFactory
- Picks the parser by {@see ProductImportFormat}.
- ImportProductVerdict
- Validator verdict for one `<product>` card and its variants; see {@see ImportItemVerdict}.
- ImportProductWriter
- Writes one `<product>` card with its variants into the catalog.
- ImportRules
- Rules shared by the validator (dry-run) and the executor (real write): the single place for
column limits, nullable/not-null field lists and scalar interpretation. If each side kept
its own copy, the report would promise something different from what the executor does.
- ImportValidationContext
- State of one validation run: everything the validator carries between product cards (job
settings, code lists, log writer, running summary) plus two registries that only make sense
across the whole file:
- ImportValidationSummary
- Dry-run result: how many items would be created, updated and skipped, and how many hard
errors (rows are not written) and soft errors (rows are written incomplete and flagged
`importIncomplete`) were found.
- ImportValidator
- Dry-run validation of an import file: matching, limits, structure and code lists.
- JsonImportParser
- JSON parser producing an {@see ImportDto} with the same output shape as {@see XmlImportParser}:
an element maps to a property, repeatable elements to arrays, texts with `lang` to an object
keyed by the language alias, a collection is either a plain array (default mode) or
`{"mode": "...", "items": [...]}`. Tri-state: a missing key means untouched, `null` (or `""`
for texts) means clear.
- XmlImportParser
- Streaming parser of the canonical import XML that yields {@see ImportDto}.