Package org.exoplatform.wallet.service
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 Summary
Constructors Constructor Description WalletAccountServiceImpl(org.exoplatform.container.PortalContainer container, WalletStorage walletAccountStorage, AddressLabelStorage labelStorage, org.exoplatform.container.xml.InitParams params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateAdminAccount(String privateKey, String currentUser)booleanenableWalletByAddress(String address, boolean enable, String currentUser)Set<org.exoplatform.wallet.model.WalletAddressLabel>getAddressesLabelsVisibleBy(String currentUser)StringgetAdminAccountPassword()org.exoplatform.wallet.model.WalletgetAdminWallet()StringgetPrivateKeyByTypeAndId(String type, String remoteId)StringgetPrivateKeyByTypeAndId(String type, String remoteId, String currentUser)Map<String,Object>getStatisticParameters(String operation, Object result, Object... methodArgs)org.exoplatform.wallet.model.WalletgetWalletByAddress(String address)org.exoplatform.wallet.model.WalletgetWalletByAddress(String address, String currentUser)org.exoplatform.wallet.model.WalletgetWalletByIdentityId(long identityId)org.exoplatform.wallet.model.WalletgetWalletByTypeAndId(String type, String remoteId)org.exoplatform.wallet.model.WalletgetWalletByTypeAndId(String type, String remoteId, String currentUser)longgetWalletsCount()booleanisAdminAccountEnabled()booleanisWalletOwner(org.exoplatform.wallet.model.Wallet wallet, String currentUser)Set<org.exoplatform.wallet.model.Wallet>listWallets()voidrefreshWalletFromBlockchain(org.exoplatform.wallet.model.Wallet wallet, org.exoplatform.wallet.model.ContractDetail contractDetail, Map<String,Set<String>> walletsModifications)voidrefreshWalletsFromBlockchain(Map<String,Set<String>> walletsModifications)voidremovePrivateKeyByTypeAndId(String type, String remoteId, String currentUser)voidremoveWalletByAddress(String address, String currentUser)voidremoveWalletByTypeAndId(String type, String remoteId, String currentUser)voidretrieveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet)org.exoplatform.wallet.model.WalletAddressLabelsaveOrDeleteAddressLabel(org.exoplatform.wallet.model.WalletAddressLabel label, String currentUser)voidsavePrivateKeyByTypeAndId(String type, String remoteId, String content, String currentUser)org.exoplatform.wallet.model.WalletsaveWallet(org.exoplatform.wallet.model.Wallet wallet, boolean isNew)voidsaveWalletAddress(org.exoplatform.wallet.model.Wallet wallet, String currentUser)org.exoplatform.wallet.model.WalletsaveWalletBackupState(String currentUser, long identityId, boolean backupState)voidsaveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet, String contractAddress)voidsetInitializationStatus(String address, org.exoplatform.wallet.model.WalletState initializationState)voidsetInitializationStatus(String address, org.exoplatform.wallet.model.WalletState initializationState, String currentUser)voidsetListenerService(org.exoplatform.services.listener.ListenerService listenerService)voidsetTokenAdminService(org.exoplatform.wallet.service.WalletTokenAdminService tokenAdminService)voidstart()voidstop()
-
-
-
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:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()
- Specified by:
stopin interfaceorg.picocontainer.Startable
-
listWallets
public Set<org.exoplatform.wallet.model.Wallet> listWallets()
- Specified by:
listWalletsin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
refreshWalletsFromBlockchain
public void refreshWalletsFromBlockchain(Map<String,Set<String>> walletsModifications)
- Specified by:
refreshWalletsFromBlockchainin interfaceorg.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:
refreshWalletFromBlockchainin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getWalletsCount
public long getWalletsCount()
- Specified by:
getWalletsCountin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getWalletByIdentityId
public org.exoplatform.wallet.model.Wallet getWalletByIdentityId(long identityId)
- Specified by:
getWalletByIdentityIdin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
retrieveWalletBlockchainState
public void retrieveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet)
- Specified by:
retrieveWalletBlockchainStatein interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getWalletByTypeAndId
public org.exoplatform.wallet.model.Wallet getWalletByTypeAndId(String type, String remoteId, String currentUser)
- Specified by:
getWalletByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getWalletByTypeAndId
public org.exoplatform.wallet.model.Wallet getWalletByTypeAndId(String type, String remoteId)
- Specified by:
getWalletByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getAdminWallet
public org.exoplatform.wallet.model.Wallet getAdminWallet()
- Specified by:
getAdminWalletin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
savePrivateKeyByTypeAndId
public void savePrivateKeyByTypeAndId(String type, String remoteId, String content, String currentUser) throws IllegalAccessException
- Specified by:
savePrivateKeyByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
getPrivateKeyByTypeAndId
public String getPrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
- Specified by:
getPrivateKeyByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
getPrivateKeyByTypeAndId
public String getPrivateKeyByTypeAndId(String type, String remoteId)
- Specified by:
getPrivateKeyByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
removePrivateKeyByTypeAndId
public void removePrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
- Specified by:
removePrivateKeyByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
getWalletByAddress
public org.exoplatform.wallet.model.Wallet getWalletByAddress(String address, String currentUser)
- Specified by:
getWalletByAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getWalletByAddress
public org.exoplatform.wallet.model.Wallet getWalletByAddress(String address)
- Specified by:
getWalletByAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
createAdminAccount
public void createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
- Specified by:
createAdminAccountin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
saveWalletBlockchainState
public void saveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet, String contractAddress)- Specified by:
saveWalletBlockchainStatein interfaceorg.exoplatform.wallet.service.WalletAccountService
-
saveWalletBackupState
public org.exoplatform.wallet.model.Wallet saveWalletBackupState(String currentUser, long identityId, boolean backupState) throws IllegalAccessException
- Specified by:
saveWalletBackupStatein interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
saveWalletAddress
public void saveWalletAddress(org.exoplatform.wallet.model.Wallet wallet, String currentUser) throws IllegalAccessException- Specified by:
saveWalletAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
saveWallet
public org.exoplatform.wallet.model.Wallet saveWallet(org.exoplatform.wallet.model.Wallet wallet, boolean isNew)- Specified by:
saveWalletin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
removeWalletByAddress
public void removeWalletByAddress(String address, String currentUser) throws IllegalAccessException
- Specified by:
removeWalletByAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
removeWalletByTypeAndId
public void removeWalletByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
- Specified by:
removeWalletByTypeAndIdin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
enableWalletByAddress
public boolean enableWalletByAddress(String address, boolean enable, String currentUser) throws IllegalAccessException
- Specified by:
enableWalletByAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
setInitializationStatus
public void setInitializationStatus(String address, org.exoplatform.wallet.model.WalletState initializationState, String currentUser) throws IllegalAccessException
- Specified by:
setInitializationStatusin interfaceorg.exoplatform.wallet.service.WalletAccountService- Throws:
IllegalAccessException
-
setInitializationStatus
public void setInitializationStatus(String address, org.exoplatform.wallet.model.WalletState initializationState)
- Specified by:
setInitializationStatusin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
isWalletOwner
public boolean isWalletOwner(org.exoplatform.wallet.model.Wallet wallet, String currentUser)- Specified by:
isWalletOwnerin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
saveOrDeleteAddressLabel
public org.exoplatform.wallet.model.WalletAddressLabel saveOrDeleteAddressLabel(org.exoplatform.wallet.model.WalletAddressLabel label, String currentUser)- Specified by:
saveOrDeleteAddressLabelin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getAddressesLabelsVisibleBy
public Set<org.exoplatform.wallet.model.WalletAddressLabel> getAddressesLabelsVisibleBy(String currentUser)
- Specified by:
getAddressesLabelsVisibleByin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getAdminAccountPassword
public String getAdminAccountPassword()
- Specified by:
getAdminAccountPasswordin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getStatisticParameters
public Map<String,Object> getStatisticParameters(String operation, Object result, Object... methodArgs)
- Specified by:
getStatisticParametersin interfaceorg.exoplatform.wallet.statistic.ExoWalletStatisticService
-
isAdminAccountEnabled
public boolean isAdminAccountEnabled()
- Specified by:
isAdminAccountEnabledin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
setTokenAdminService
public void setTokenAdminService(org.exoplatform.wallet.service.WalletTokenAdminService tokenAdminService)
-
setListenerService
public void setListenerService(org.exoplatform.services.listener.ListenerService listenerService)
-
-