Package io.meeds.deeds.service
Class TenantService
- java.lang.Object
-
- io.meeds.deeds.service.TenantService
-
@Component public class TenantService extends Object
-
-
Constructor Summary
Constructors Constructor Description TenantService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLastTenantCommand(String managerAddress, long nftId)Retrives Deed Tenant Last status by NFT IdentifierbooleanisDeedManager(String address, long nftId)Checks if address is the provisioning manager of the DEEDvoidsaveEmail(String managerAddress, long nftId, String email)Stores User Email to allow support Team Contact him and notify him about Tenant StatusvoidstartTenant(String managerAddress, String transactionHash, long nftId, String email)Stores User Email to allow support Team Contact him and notify him about Tenant Status.voidstopTenant(String managerAddress, String transactionHash, long nftId)Collects information about DEED Nft and transaction hash to command Tenant shutdown.
-
-
-
Method Detail
-
getLastTenantCommand
public String getLastTenantCommand(String managerAddress, long nftId) throws UnauthorizedOperationException
Retrives Deed Tenant Last status by NFT Identifier- Parameters:
managerAddress- DEED Provisioning Manager wallet addressnftId- Deed NFT Id- Returns:
- Last Command Status (START/STOP)
- Throws:
UnauthorizedOperationException- when the wallet isn't the DEED manager who
-
saveEmail
public void saveEmail(String managerAddress, long nftId, String email) throws UnauthorizedOperationException, ObjectNotFoundException
Stores User Email to allow support Team Contact him and notify him about Tenant Status- Parameters:
nftId- DEED NFT id in the blockchainmanagerAddress- DEED Provisioning Manager wallet addressemail- Email of the manager- Throws:
UnauthorizedOperationException- when the wallet isn't the DEED managerObjectNotFoundException- when NFT with selected identifier doesn't exists
-
startTenant
public void startTenant(String managerAddress, String transactionHash, long nftId, String email) throws UnauthorizedOperationException, ObjectNotFoundException
Stores User Email to allow support Team Contact him and notify him about Tenant Status. In addition, this will collect information about DEED Nft and transaction hash to command Tenant startup.- Parameters:
nftId- DEED NFT id in the blockchainmanagerAddress- DEED Provisioning Manager wallet addresstransactionHash- Ethereum Blockchain Deed Start command Transaction Hashemail- Email of the manager- Throws:
UnauthorizedOperationException- when the wallet isn't the DEED managerObjectNotFoundException- when NFT with selected identifier doesn't exists
-
stopTenant
public void stopTenant(String managerAddress, String transactionHash, long nftId) throws UnauthorizedOperationException, ObjectNotFoundException
Collects information about DEED Nft and transaction hash to command Tenant shutdown.- Parameters:
nftId- DEED NFT id in the blockchainmanagerAddress- DEED Provisioning Manager wallet addresstransactionHash- Ethereum Blockchain Deed Start command Transaction Hash- Throws:
UnauthorizedOperationException- when the wallet isn't the DEED managerObjectNotFoundException- when NFT with selected identifier doesn't exists
-
isDeedManager
public boolean isDeedManager(String address, long nftId)
Checks if address is the provisioning manager of the DEED- Parameters:
nftId- DEED NFT identifieraddress- Wallet or Contract Ethereum address- Returns:
- true if address is the provisioning manager of the DEED Tenant
-
-