Class WalletAccountServiceImpl

  • All Implemented Interfaces:
    org.exoplatform.wallet.service.WalletAccountService, org.exoplatform.wallet.statistic.ExoWalletStatisticService, org.picocontainer.Startable

    public class WalletAccountServiceImpl
    extends Object
    implements org.exoplatform.wallet.service.WalletAccountService, org.exoplatform.wallet.statistic.ExoWalletStatisticService, org.picocontainer.Startable
    • Constructor Detail

      • WalletAccountServiceImpl

        public WalletAccountServiceImpl​(org.exoplatform.container.PortalContainer container,
                                        WalletStorage walletAccountStorage,
                                        AddressLabelStorage labelStorage,
                                        org.exoplatform.container.xml.InitParams params)
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface org.picocontainer.Startable
      • stop

        public void stop()
        Specified by:
        stop in interface org.picocontainer.Startable
      • listWallets

        public Set<org.exoplatform.wallet.model.Wallet> listWallets()
        Specified by:
        listWallets in interface org.exoplatform.wallet.service.WalletAccountService
      • refreshWalletsFromBlockchain

        public void refreshWalletsFromBlockchain​(Map<String,​Set<String>> walletsModifications)
        Specified by:
        refreshWalletsFromBlockchain in interface org.exoplatform.wallet.service.WalletAccountService
      • refreshWalletFromBlockchain

        public void refreshWalletFromBlockchain​(org.exoplatform.wallet.model.Wallet wallet,
                                                org.exoplatform.wallet.model.ContractDetail contractDetail,
                                                Map<String,​Set<String>> walletsModifications)
        Specified by:
        refreshWalletFromBlockchain in interface org.exoplatform.wallet.service.WalletAccountService
      • getWalletsCount

        public long getWalletsCount()
        Specified by:
        getWalletsCount in interface org.exoplatform.wallet.service.WalletAccountService
      • getWalletByIdentityId

        public org.exoplatform.wallet.model.Wallet getWalletByIdentityId​(long identityId)
        Specified by:
        getWalletByIdentityId in interface org.exoplatform.wallet.service.WalletAccountService
      • retrieveWalletBlockchainState

        public void retrieveWalletBlockchainState​(org.exoplatform.wallet.model.Wallet wallet)
        Specified by:
        retrieveWalletBlockchainState in interface org.exoplatform.wallet.service.WalletAccountService
      • getWalletByTypeAndId

        public org.exoplatform.wallet.model.Wallet getWalletByTypeAndId​(String type,
                                                                        String remoteId,
                                                                        String currentUser)
        Specified by:
        getWalletByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      • getWalletByTypeAndId

        public org.exoplatform.wallet.model.Wallet getWalletByTypeAndId​(String type,
                                                                        String remoteId)
        Specified by:
        getWalletByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      • getAdminWallet

        public org.exoplatform.wallet.model.Wallet getAdminWallet()
        Specified by:
        getAdminWallet in interface org.exoplatform.wallet.service.WalletAccountService
      • getPrivateKeyByTypeAndId

        public String getPrivateKeyByTypeAndId​(String type,
                                               String remoteId)
        Specified by:
        getPrivateKeyByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      • getWalletByAddress

        public org.exoplatform.wallet.model.Wallet getWalletByAddress​(String address,
                                                                      String currentUser)
        Specified by:
        getWalletByAddress in interface org.exoplatform.wallet.service.WalletAccountService
      • getWalletByAddress

        public org.exoplatform.wallet.model.Wallet getWalletByAddress​(String address)
        Specified by:
        getWalletByAddress in interface org.exoplatform.wallet.service.WalletAccountService
      • saveWalletBlockchainState

        public void saveWalletBlockchainState​(org.exoplatform.wallet.model.Wallet wallet,
                                              String contractAddress)
        Specified by:
        saveWalletBlockchainState in interface org.exoplatform.wallet.service.WalletAccountService
      • saveWalletBackupState

        public org.exoplatform.wallet.model.Wallet saveWalletBackupState​(String currentUser,
                                                                         long identityId,
                                                                         boolean backupState)
                                                                  throws IllegalAccessException
        Specified by:
        saveWalletBackupState in interface org.exoplatform.wallet.service.WalletAccountService
        Throws:
        IllegalAccessException
      • saveWalletAddress

        public void saveWalletAddress​(org.exoplatform.wallet.model.Wallet wallet,
                                      String currentUser)
                               throws IllegalAccessException
        Specified by:
        saveWalletAddress in interface org.exoplatform.wallet.service.WalletAccountService
        Throws:
        IllegalAccessException
      • saveWallet

        public org.exoplatform.wallet.model.Wallet saveWallet​(org.exoplatform.wallet.model.Wallet wallet,
                                                              boolean isNew)
        Specified by:
        saveWallet in interface org.exoplatform.wallet.service.WalletAccountService
      • enableWalletByAddress

        public boolean enableWalletByAddress​(String address,
                                             boolean enable,
                                             String currentUser)
                                      throws IllegalAccessException
        Specified by:
        enableWalletByAddress in interface org.exoplatform.wallet.service.WalletAccountService
        Throws:
        IllegalAccessException
      • setInitializationStatus

        public void setInitializationStatus​(String address,
                                            org.exoplatform.wallet.model.WalletState initializationState,
                                            String currentUser)
                                     throws IllegalAccessException
        Specified by:
        setInitializationStatus in interface org.exoplatform.wallet.service.WalletAccountService
        Throws:
        IllegalAccessException
      • setInitializationStatus

        public void setInitializationStatus​(String address,
                                            org.exoplatform.wallet.model.WalletState initializationState)
        Specified by:
        setInitializationStatus in interface org.exoplatform.wallet.service.WalletAccountService
      • isWalletOwner

        public boolean isWalletOwner​(org.exoplatform.wallet.model.Wallet wallet,
                                     String currentUser)
        Specified by:
        isWalletOwner in interface org.exoplatform.wallet.service.WalletAccountService
      • saveOrDeleteAddressLabel

        public org.exoplatform.wallet.model.WalletAddressLabel saveOrDeleteAddressLabel​(org.exoplatform.wallet.model.WalletAddressLabel label,
                                                                                        String currentUser)
        Specified by:
        saveOrDeleteAddressLabel in interface org.exoplatform.wallet.service.WalletAccountService
      • getAddressesLabelsVisibleBy

        public Set<org.exoplatform.wallet.model.WalletAddressLabel> getAddressesLabelsVisibleBy​(String currentUser)
        Specified by:
        getAddressesLabelsVisibleBy in interface org.exoplatform.wallet.service.WalletAccountService
      • getAdminAccountPassword

        public String getAdminAccountPassword()
        Specified by:
        getAdminAccountPassword in interface org.exoplatform.wallet.service.WalletAccountService
      • getStatisticParameters

        public Map<String,​Object> getStatisticParameters​(String operation,
                                                               Object result,
                                                               Object... methodArgs)
        Specified by:
        getStatisticParameters in interface org.exoplatform.wallet.statistic.ExoWalletStatisticService
      • isAdminAccountEnabled

        public boolean isAdminAccountEnabled()
        Specified by:
        isAdminAccountEnabled in interface org.exoplatform.wallet.service.WalletAccountService
      • setTokenAdminService

        public void setTokenAdminService​(org.exoplatform.wallet.service.WalletTokenAdminService tokenAdminService)
      • setListenerService

        public void setListenerService​(org.exoplatform.services.listener.ListenerService listenerService)