Package io.meeds.deeds.common.service
Class OfferService
java.lang.Object
io.meeds.deeds.common.service.OfferService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelOffers(String newOwner, long nftId) createRentingOffer(String ownerAddress, String ownerEmail, DeedTenantOfferDTO deedTenantOfferDTO) voiddeleteRentingOffer(String walletAddress, String offerId, String transactionHash) getOfferByBlockchainId(long blockchainOfferId) org.springframework.data.domain.Page<DeedTenantOfferDTO>getOffers(OfferFilter offerFilter, org.springframework.data.domain.Pageable pageable) voidmarkOfferAcquisitionInProgress(long nftId, String transactionHash, Instant validStartDate) voidmarkOfferAsAcquired(long offerId, Instant leaseEndDate) protected voidreleaseExplicitOfferRefreshLock(String parentOfferId) voidsaveOfferTransactionAsError(String offerId) updateOfferFromBlockchain(DeedOfferBlockchainState blockchainOffer, boolean isBlockchainScan) updateRentingOffer(String walletAddress, DeedTenantOfferDTO deedTenantOfferDTO) voidupdateRentingOfferStatusFromBlockchain(String offerId, Map<BlockchainOfferStatus, DeedOfferBlockchainState> minedEvents)
-
Field Details
-
OFFER_CREATED_EVENT
- See Also:
-
OFFER_CREATED_CONFIRMED_EVENT
- See Also:
-
OFFER_UPDATED_EVENT
- See Also:
-
OFFER_UPDATED_CONFIRMED_EVENT
- See Also:
-
OFFER_DELETED_EVENT
- See Also:
-
OFFER_DELETED_CONFIRMED_EVENT
- See Also:
-
OFFER_CANCELED_EVENT
- See Also:
-
OFFER_ACQUISITION_PROGRESS_EVENT
- See Also:
-
OFFER_ACQUISITION_CONFIRMED_EVENT
- See Also:
-
-
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
-
getOfferByBlockchainId
- Throws:
Exception
-
createRentingOffer
public DeedTenantOfferDTO createRentingOffer(String ownerAddress, String ownerEmail, DeedTenantOfferDTO deedTenantOfferDTO) throws io.meeds.wom.api.constant.ObjectNotFoundException, UnauthorizedOperationException, io.meeds.wom.api.constant.ObjectAlreadyExistsException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionUnauthorizedOperationExceptionio.meeds.wom.api.constant.ObjectAlreadyExistsException
-
updateRentingOffer
public DeedTenantOfferDTO updateRentingOffer(String walletAddress, DeedTenantOfferDTO deedTenantOfferDTO) throws io.meeds.wom.api.constant.ObjectNotFoundException, UnauthorizedOperationException, io.meeds.wom.api.constant.ObjectAlreadyExistsException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionUnauthorizedOperationExceptionio.meeds.wom.api.constant.ObjectAlreadyExistsException
-
markOfferAcquisitionInProgress
public void markOfferAcquisitionInProgress(long nftId, String transactionHash, Instant validStartDate) throws io.meeds.wom.api.constant.ObjectAlreadyExistsException - Throws:
io.meeds.wom.api.constant.ObjectAlreadyExistsException
-
deleteRentingOffer
public void deleteRentingOffer(String walletAddress, String offerId, String transactionHash) throws io.meeds.wom.api.constant.ObjectNotFoundException, UnauthorizedOperationException, io.meeds.wom.api.constant.ObjectAlreadyExistsException - Throws:
io.meeds.wom.api.constant.ObjectNotFoundExceptionUnauthorizedOperationExceptionio.meeds.wom.api.constant.ObjectAlreadyExistsException
-
cancelOffers
-
getPendingTransactions
-
updateRentingOfferStatusFromBlockchain
public void updateRentingOfferStatusFromBlockchain(String offerId, Map<BlockchainOfferStatus, DeedOfferBlockchainState> minedEvents) throws Exception- Throws:
Exception
-
updateOfferFromBlockchain
public DeedTenantOffer updateOfferFromBlockchain(DeedOfferBlockchainState blockchainOffer, boolean isBlockchainScan) throws Exception - Throws:
Exception
-
markOfferAsAcquired
- Throws:
Exception
-
saveOfferTransactionAsError
- Throws:
Exception
-
releaseExplicitOfferRefreshLock
-