Class OfferService

java.lang.Object
io.meeds.deeds.service.OfferService

@Component public class OfferService extends Object
  • Field Details

  • Constructor Details

    • OfferService

      public OfferService()
  • Method Details

    • getOffers

      public org.springframework.data.domain.Page<DeedTenantOfferDTO> getOffers(OfferFilter offerFilter, org.springframework.data.domain.Pageable pageable)
    • getOffer

      public DeedTenantOfferDTO getOffer(String id, String walletAddress, boolean refreshFromBlockchain) throws Exception
      Throws:
      Exception
    • getOffer

      public DeedTenantOfferDTO getOffer(String id)
    • getOfferByBlockchainId

      public DeedTenantOfferDTO getOfferByBlockchainId(long blockchainOfferId) throws Exception
      Throws:
      Exception
    • createRentingOffer

      public DeedTenantOfferDTO createRentingOffer(String ownerAddress, String ownerEmail, DeedTenantOfferDTO deedTenantOfferDTO) throws io.meeds.deeds.constant.ObjectNotFoundException, io.meeds.deeds.constant.UnauthorizedOperationException, io.meeds.deeds.constant.ObjectAlreadyExistsException
      Throws:
      io.meeds.deeds.constant.ObjectNotFoundException
      io.meeds.deeds.constant.UnauthorizedOperationException
      io.meeds.deeds.constant.ObjectAlreadyExistsException
    • updateRentingOffer

      public DeedTenantOfferDTO updateRentingOffer(String walletAddress, DeedTenantOfferDTO deedTenantOfferDTO) throws io.meeds.deeds.constant.ObjectNotFoundException, io.meeds.deeds.constant.UnauthorizedOperationException, io.meeds.deeds.constant.ObjectAlreadyExistsException
      Throws:
      io.meeds.deeds.constant.ObjectNotFoundException
      io.meeds.deeds.constant.UnauthorizedOperationException
      io.meeds.deeds.constant.ObjectAlreadyExistsException
    • markOfferAcquisitionInProgress

      public void markOfferAcquisitionInProgress(long nftId, String transactionHash, Instant validStartDate) throws io.meeds.deeds.constant.ObjectAlreadyExistsException
      Throws:
      io.meeds.deeds.constant.ObjectAlreadyExistsException
    • deleteRentingOffer

      public void deleteRentingOffer(String walletAddress, String offerId, String transactionHash) throws io.meeds.deeds.constant.ObjectNotFoundException, io.meeds.deeds.constant.UnauthorizedOperationException, io.meeds.deeds.constant.ObjectAlreadyExistsException
      Throws:
      io.meeds.deeds.constant.ObjectNotFoundException
      io.meeds.deeds.constant.UnauthorizedOperationException
      io.meeds.deeds.constant.ObjectAlreadyExistsException
    • cancelOffers

      public void cancelOffers(String newOwner, long nftId)
    • getPendingTransactions

      public List<DeedTenantOfferDTO> getPendingTransactions()
    • updateRentingOfferStatusFromBlockchain

      public void updateRentingOfferStatusFromBlockchain(String offerId, Map<io.meeds.deeds.constant.BlockchainOfferStatus,io.meeds.deeds.model.DeedOfferBlockchainState> minedEvents) throws Exception
      Throws:
      Exception
    • updateOfferFromBlockchain

      public DeedTenantOffer updateOfferFromBlockchain(io.meeds.deeds.model.DeedOfferBlockchainState blockchainOffer, boolean isBlockchainScan) throws Exception
      Throws:
      Exception
    • markOfferAsAcquired

      public void markOfferAsAcquired(long offerId, Instant leaseEndDate) throws Exception
      Throws:
      Exception
    • saveOfferTransactionAsError

      public void saveOfferTransactionAsError(String offerId) throws Exception
      Throws:
      Exception
    • releaseExplicitOfferRefreshLock

      protected void releaseExplicitOfferRefreshLock(String parentOfferId)