Class TenantService


  • @Component
    public class TenantService
    extends Object
    • Constructor Detail

      • TenantService

        public TenantService()
    • 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 address
        nftId - Deed NFT Id
        Returns:
        Last Command Status (START/STOP)
        Throws:
        UnauthorizedOperationException - when the wallet isn't the DEED manager who
      • 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 blockchain
        managerAddress - DEED Provisioning Manager wallet address
        transactionHash - Ethereum Blockchain Deed Start command Transaction Hash
        email - Email of the manager
        Throws:
        UnauthorizedOperationException - when the wallet isn't the DEED manager
        ObjectNotFoundException - 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 identifier
        address - Wallet or Contract Ethereum address
        Returns:
        true if address is the provisioning manager of the DEED Tenant