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
ConstructorsConstructorDescriptionWalletAccountServiceImpl(org.exoplatform.container.PortalContainer container, WalletStorage walletAccountStorage, AddressLabelStorage labelStorage, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.container.xml.InitParams params) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAdminAccount(String privateKey, String currentUser) org.exoplatform.wallet.model.WalletcreateWalletInstance(org.exoplatform.wallet.model.WalletProvider provider, String address, long identityId) booleanenableWalletByAddress(String address, boolean enable, String currentUser) Set<org.exoplatform.wallet.model.WalletAddressLabel>getAddressesLabelsVisibleBy(String currentUser) org.exoplatform.wallet.model.WalletgetPrivateKeyByTypeAndId(String type, String remoteId) getPrivateKeyByTypeAndId(String type, String remoteId, String currentUser) 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) longbooleanbooleanisWalletOwner(org.exoplatform.wallet.model.Wallet wallet, String currentUser) Set<org.exoplatform.wallet.model.Wallet>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()voidswitchToInternalWallet(long identityId) voidswitchWalletProvider(long identityId, org.exoplatform.wallet.model.WalletProvider provider, String newAddress, String rawMessage, String signedMessage)
-
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:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
listWallets
- Specified by:
listWalletsin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
refreshWalletsFromBlockchain
- 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
- 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
- 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
- Specified by:
getWalletByAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
getWalletByAddress
- Specified by:
getWalletByAddressin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
createAdminAccount
- 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
-
switchToInternalWallet
public void switchToInternalWallet(long identityId) - Specified by:
switchToInternalWalletin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
switchWalletProvider
public void switchWalletProvider(long identityId, org.exoplatform.wallet.model.WalletProvider provider, String newAddress, String rawMessage, String signedMessage) - Specified by:
switchWalletProviderin interfaceorg.exoplatform.wallet.service.WalletAccountService
-
createWalletInstance
public org.exoplatform.wallet.model.Wallet createWalletInstance(org.exoplatform.wallet.model.WalletProvider provider, String address, long identityId) - Specified by:
createWalletInstancein interfaceorg.exoplatform.wallet.service.WalletAccountService
-
removeWalletByAddress
- 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
- 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
- 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)
-