Class WalletAccountServiceImpl

java.lang.Object
io.meeds.wallet.service.WalletAccountServiceImpl
All Implemented Interfaces:
io.meeds.wallet.service.WalletAccountService, io.meeds.wallet.statistic.ExoWalletStatisticService, org.picocontainer.Startable

public class WalletAccountServiceImpl extends Object implements io.meeds.wallet.service.WalletAccountService, io.meeds.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
    • listWallets

      public Set<io.meeds.wallet.model.Wallet> listWallets()
      Specified by:
      listWallets in interface io.meeds.wallet.service.WalletAccountService
    • listWalletsByIdentityIds

      public Set<io.meeds.wallet.model.Wallet> listWalletsByIdentityIds(List<Long> identityIds)
      Specified by:
      listWalletsByIdentityIds in interface io.meeds.wallet.service.WalletAccountService
    • refreshWalletsFromBlockchain

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

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

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

      public io.meeds.wallet.model.Wallet getWalletByIdentityId(long identityId)
      Specified by:
      getWalletByIdentityId in interface io.meeds.wallet.service.WalletAccountService
    • retrieveWalletBlockchainState

      public void retrieveWalletBlockchainState(io.meeds.wallet.model.Wallet wallet)
      Specified by:
      retrieveWalletBlockchainState in interface io.meeds.wallet.service.WalletAccountService
    • getWalletByTypeAndId

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

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

      public io.meeds.wallet.model.Wallet getAdminWallet()
      Specified by:
      getAdminWallet in interface io.meeds.wallet.service.WalletAccountService
    • savePrivateKeyByTypeAndId

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

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

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

      public void removePrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
      Specified by:
      removePrivateKeyByTypeAndId in interface io.meeds.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • getWalletByAddress

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

      public io.meeds.wallet.model.Wallet getWalletByAddress(String address)
      Specified by:
      getWalletByAddress in interface io.meeds.wallet.service.WalletAccountService
    • createAdminAccount

      public void createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
      Specified by:
      createAdminAccount in interface io.meeds.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • saveWalletBlockchainState

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

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

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

      public io.meeds.wallet.model.Wallet saveWallet(io.meeds.wallet.model.Wallet wallet, boolean isNew)
      Specified by:
      saveWallet in interface io.meeds.wallet.service.WalletAccountService
    • switchToInternalWallet

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

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

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

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

      public void removeWalletByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
      Specified by:
      removeWalletByTypeAndId in interface io.meeds.wallet.service.WalletAccountService
      Throws:
      IllegalAccessException
    • enableWalletByAddress

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

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

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

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

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

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

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

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

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

      public void setTokenAdminService(io.meeds.wallet.service.WalletTokenAdminService tokenAdminService)
    • setListenerService

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