diff options
| author | Kostya <mail@sartin.in> | 2026-10-09 15:32:09 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-10-09 15:32:33 +0300 |
| commit | 9c1a10712a724b448de9e066ff76f97059c86b40 (patch) | |
| tree | bae467b5c29c32181e98cf13e7d5de0f155ba0e1 /ui-client/src/test/java/market/guess/ui | |
| parent | 9a62e94261e6531c6b60d296322e0cef2a5b21e1 (diff) | |
| download | guess-market-9c1a10712a724b448de9e066ff76f97059c86b40.tar.gz guess-market-9c1a10712a724b448de9e066ff76f97059c86b40.tar.xz guess-market-9c1a10712a724b448de9e066ff76f97059c86b40.zip | |
catalog: make Loader a stream-based strategy
Loader was tied to the disk: load(Path) did its own file checks and
opening, so the v3 loader, which reads HTTP uploads, could not
implement it, and the server had to hand its catalog a stub loader
that refused everything.
Reduce Loader to a single strategy method, load(InputStream, source,
owner). The v1, v2 and v3 loaders are now interchangeable
implementations, picked by wiring: v1 for the console, v2 for the
desktop, v3 for the server. The owner is the uploading user; v1 and v2
ignore it because their files name their own Market Makers.
Opening a file by path is now LocalCatalogContext.loadEvents' job,
with the same INVALID_PATH, FILE_NOT_FOUND and NOT_XML errors as
before. The server catalog uses the v3 loader directly. A path load
there passes no uploader, which v3 refuses, so nothing reaches the
server's market except an upload.
Drop Loader.seed, which every loader implemented by throwing and
nothing called.
Diffstat (limited to 'ui-client/src/test/java/market/guess/ui')
0 files changed, 0 insertions, 0 deletions