Klasse LegacyAreaShopImportService
java.lang.Object
de.delinkedde.areashopreborn.application.LegacyAreaShopImportService
Previews and executes conservative, resumable migration from legacy AreaShop YAML files.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungLegacyAreaShopImportService(Database database, EstateRepository estates, LegacyImportRepository imports, WorldGuardGateway worldGuard, ThreadBridge threads, Path pluginsDirectory, String configuredDirectory, String currency, BigDecimal minimumPrice, BigDecimal maximumPrice, int maximumRentalPeriods, Path mappingFile) Creates the legacy migration service.LegacyAreaShopImportService(Database database, EstateRepository estates, LegacyImportRepository imports, WorldGuardGateway worldGuard, ThreadBridge threads, Path pluginsDirectory, String configuredDirectory, String currency, BigDecimal minimumPrice, BigDecimal maximumPrice, int maximumRentalPeriods, Path mappingFile, int maximumFiles, long maximumFileBytes, long maximumTotalBytes, int maximumDepth, int maximumReportDetails, long maximumMappingBytes, int maximumMappingEntries) Creates a resource-bounded legacy migration service. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungmappings()Lists explicit inheritance mappings in stable source order.mappings(int limit) Lists a bounded prefix of explicit inheritance mappings.removeMapping(UUID actorId, String sourceKey, String fieldName) Removes one explicit inheritance mapping.Previews or imports every legacy region YAML file in stable path order.setMapping(UUID actorId, String sourceKey, String fieldName, String value) Validates and stores one administrator-approved effective legacy value.
-
Konstruktordetails
-
LegacyAreaShopImportService
public LegacyAreaShopImportService(Database database, EstateRepository estates, LegacyImportRepository imports, WorldGuardGateway worldGuard, ThreadBridge threads, Path pluginsDirectory, String configuredDirectory, String currency, BigDecimal minimumPrice, BigDecimal maximumPrice, int maximumRentalPeriods, Path mappingFile) Creates the legacy migration service.- Parameter:
database- asynchronous SQLite executorestates- estate lookup repositoryimports- legacy import history and atomic writerworldGuard- WorldGuard adapterthreads- Paper main-thread bridgepluginsDirectory- normalized server plugins directoryconfiguredDirectory- legacy path relative to the plugins directorycurrency- configured logical currencyminimumPrice- minimum accepted listing pricemaximumPrice- maximum accepted listing pricemaximumRentalPeriods- configured rental extension limitmappingFile- YAML file containing explicit effective legacy values
-
LegacyAreaShopImportService
public LegacyAreaShopImportService(Database database, EstateRepository estates, LegacyImportRepository imports, WorldGuardGateway worldGuard, ThreadBridge threads, Path pluginsDirectory, String configuredDirectory, String currency, BigDecimal minimumPrice, BigDecimal maximumPrice, int maximumRentalPeriods, Path mappingFile, int maximumFiles, long maximumFileBytes, long maximumTotalBytes, int maximumDepth, int maximumReportDetails, long maximumMappingBytes, int maximumMappingEntries) Creates a resource-bounded legacy migration service.- Parameter:
database- asynchronous SQLite executorestates- estate lookup repositoryimports- legacy import history and atomic writerworldGuard- WorldGuard adapterthreads- Paper main-thread bridgepluginsDirectory- normalized server plugins directoryconfiguredDirectory- legacy path relative to the plugins directorycurrency- configured logical currencyminimumPrice- minimum accepted listing pricemaximumPrice- maximum accepted listing pricemaximumRentalPeriods- configured rental extension limitmappingFile- YAML file containing explicit effective legacy valuesmaximumFiles- hard YAML file ceilingmaximumFileBytes- maximum bytes accepted from one YAML filemaximumTotalBytes- maximum combined YAML bytesmaximumDepth- maximum directory traversal depthmaximumReportDetails- maximum detail lines retained in memorymaximumMappingBytes- maximum explicit-mapping YAML sizemaximumMappingEntries- maximum explicit mapping rows
-
-
Methodendetails
-
run
Previews or imports every legacy region YAML file in stable path order.- Parameter:
actorId- administrator performing the migrationdryRun- whether to perform validation without any writes- Gibt zurück:
- asynchronous detailed migration report
-
mappings
Lists explicit inheritance mappings in stable source order.- Gibt zurück:
- asynchronous immutable mapping list
-
mappings
Lists a bounded prefix of explicit inheritance mappings.- Parameter:
limit- maximum mapping rows returned- Gibt zurück:
- asynchronous immutable mapping list
-
setMapping
public CompletableFuture<Void> setMapping(UUID actorId, String sourceKey, String fieldName, String value) Validates and stores one administrator-approved effective legacy value.- Parameter:
actorId- administrator changing the mappingsourceKey- relative legacy region YAML pathfieldName-price,resale-price, orrent-durationvalue- effective literal value- Gibt zurück:
- asynchronous completion
-
removeMapping
Removes one explicit inheritance mapping.- Parameter:
actorId- administrator changing the mappingsourceKey- relative legacy region YAML pathfieldName- mapped field name- Gibt zurück:
- future containing whether a value existed
-