Klasse LegacyAreaShopImportService

java.lang.Object
de.delinkedde.areashopreborn.application.LegacyAreaShopImportService

public final class LegacyAreaShopImportService extends Object
Previews and executes conservative, resumable migration from legacy AreaShop YAML files.
  • 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 executor
      estates - estate lookup repository
      imports - legacy import history and atomic writer
      worldGuard - WorldGuard adapter
      threads - Paper main-thread bridge
      pluginsDirectory - normalized server plugins directory
      configuredDirectory - legacy path relative to the plugins directory
      currency - configured logical currency
      minimumPrice - minimum accepted listing price
      maximumPrice - maximum accepted listing price
      maximumRentalPeriods - configured rental extension limit
      mappingFile - 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 executor
      estates - estate lookup repository
      imports - legacy import history and atomic writer
      worldGuard - WorldGuard adapter
      threads - Paper main-thread bridge
      pluginsDirectory - normalized server plugins directory
      configuredDirectory - legacy path relative to the plugins directory
      currency - configured logical currency
      minimumPrice - minimum accepted listing price
      maximumPrice - maximum accepted listing price
      maximumRentalPeriods - configured rental extension limit
      mappingFile - YAML file containing explicit effective legacy values
      maximumFiles - hard YAML file ceiling
      maximumFileBytes - maximum bytes accepted from one YAML file
      maximumTotalBytes - maximum combined YAML bytes
      maximumDepth - maximum directory traversal depth
      maximumReportDetails - maximum detail lines retained in memory
      maximumMappingBytes - maximum explicit-mapping YAML size
      maximumMappingEntries - maximum explicit mapping rows
  • Methodendetails

    • run

      public CompletableFuture<LegacyImportReport> run(UUID actorId, boolean dryRun)
      Previews or imports every legacy region YAML file in stable path order.
      Parameter:
      actorId - administrator performing the migration
      dryRun - 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 mapping
      sourceKey - relative legacy region YAML path
      fieldName - price, resale-price, or rent-duration
      value - effective literal value
      Gibt zurück:
      asynchronous completion
    • removeMapping

      public CompletableFuture<Boolean> removeMapping(UUID actorId, String sourceKey, String fieldName)
      Removes one explicit inheritance mapping.
      Parameter:
      actorId - administrator changing the mapping
      sourceKey - relative legacy region YAML path
      fieldName - mapped field name
      Gibt zurück:
      future containing whether a value existed