Class WalletAccountServiceImpl

java.lang.Object
org.exoplatform.wallet.service.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 Details

    • WalletAccountServiceImpl

      public WalletAccountServiceImpl(org.exoplatform.container.PortalContainer container, WalletStorage walletAccountStorage, AddressLabelStorage labelStorage, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.container.xml.InitParams params)
  • Method Details

    • 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
    • savePrivateKeyByTypeAndId

      public void savePrivateKeyByTypeAndId(String type, String remoteId, String content, String currentUser) throws IllegalAccessException
      Specified by:
      savePrivateKeyByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • getPrivateKeyByTypeAndId

      public String getPrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
      Specified by:
      getPrivateKeyByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • getPrivateKeyByTypeAndId

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

      public void removePrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
      Specified by:
      removePrivateKeyByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • 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
    • createAdminAccount

      public void createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
      Specified by:
      createAdminAccount in interface org.exoplatform.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • 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
    • switchToInternalWallet

      public void switchToInternalWallet(long identityId)
      Specified by:
      switchToInternalWallet in interface org.exoplatform.wallet.service.WalletAccountService
    • switchWalletProvider

      public void switchWalletProvider(long identityId, org.exoplatform.wallet.model.WalletProvider provider, String newAddress, String rawMessage, String signedMessage)
      Specified by:
      switchWalletProvider in interface org.exoplatform.wallet.service.WalletAccountService
    • createWalletInstance

      public org.exoplatform.wallet.model.Wallet createWalletInstance(org.exoplatform.wallet.model.WalletProvider provider, String address, long identityId)
      Specified by:
      createWalletInstance in interface org.exoplatform.wallet.service.WalletAccountService
    • removeWalletByAddress

      public void removeWalletByAddress(String address, String currentUser) throws IllegalAccessException
      Specified by:
      removeWalletByAddress in interface org.exoplatform.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • removeWalletByTypeAndId

      public void removeWalletByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
      Specified by:
      removeWalletByTypeAndId in interface org.exoplatform.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • 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)