Klasse ParcelOfferService

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

public final class ParcelOfferService extends Object
Coordinates persistent listing preparation with sale and rental publication services.

Prepared values survive restarts but are not financial journals. Publication always performs the authoritative state and permission checks again before creating an active listing.

  • Konstruktordetails

    • ParcelOfferService

      public ParcelOfferService(Database database, EstateRepository estates, ParcelOfferSettingsRepository settings, EstateApplicationService sales, RentalService rentals, BigDecimal minimumPrice, BigDecimal maximumPrice, int defaultMaximumRentalPeriods)
      Creates the parcel offer preparation service.
      Parameter:
      database - asynchronous database executor
      estates - estate repository
      settings - prepared-value repository
      sales - initial-sale publisher
      rentals - rental publisher
      minimumPrice - inclusive minimum price
      maximumPrice - inclusive maximum price
      defaultMaximumRentalPeriods - default contract period limit
  • Methodendetails

    • setSalePrice

      public CompletableFuture<Void> setSalePrice(UUID actorId, String regionName, BigDecimal price)
      Stores an initial-sale price for a managed draft parcel.
      Parameter:
      actorId - landlord or delegated manager
      regionName - parcel name
      price - prepared sale price
      Gibt zurück:
      completion future
    • publishSale

      public CompletableFuture<Listing> publishSale(UUID actorId, String regionName)
      Publishes a managed draft using its prepared initial-sale price.
      Parameter:
      actorId - landlord or delegated manager
      regionName - parcel name
      Gibt zurück:
      future containing the listing
    • setRentalPrice

      public CompletableFuture<Void> setRentalPrice(UUID actorId, String regionName, BigDecimal price)
      Stores the price per period for a managed draft parcel.
      Parameter:
      actorId - landlord or delegated manager
      regionName - parcel name
      price - price per period
      Gibt zurück:
      completion future
    • setRentalPeriod

      public CompletableFuture<Void> setRentalPeriod(UUID actorId, String regionName, Duration period)
      Stores a billable rental duration for a managed draft parcel.
      Parameter:
      actorId - landlord or delegated manager
      regionName - parcel name
      period - billable period
      Gibt zurück:
      completion future
    • publishRental

      public CompletableFuture<Listing> publishRental(UUID actorId, String regionName)
      Publishes a rental listing using its prepared price and duration.
      Parameter:
      actorId - landlord or delegated manager
      regionName - parcel name
      Gibt zurück:
      future containing the rental listing