public class EthereumWalletAccountService extends Object implements org.exoplatform.addon.wallet.service.WalletAccountService, org.picocontainer.Startable
| Constructor and Description |
|---|
EthereumWalletAccountService(WalletStorage walletAccountStorage,
AddressLabelStorage labelStorage,
org.exoplatform.container.xml.InitParams params) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCanSaveWallet(org.exoplatform.addon.wallet.model.Wallet wallet,
org.exoplatform.addon.wallet.model.Wallet storedWallet,
String currentUser) |
void |
createAdminAccount(String privateKey,
String currentUser) |
void |
enableWalletByAddress(String address,
boolean enable,
String currentUser) |
Set<org.exoplatform.addon.wallet.model.WalletAddressLabel> |
getAddressesLabelsVisibleBy(String currentUser) |
String |
getAdminAccountPassword() |
String |
getPrivateKeyByTypeAndId(String type,
String remoteId) |
String |
getPrivateKeyByTypeAndId(String type,
String remoteId,
String currentUser) |
org.exoplatform.addon.wallet.model.Wallet |
getWalletByAddress(String address) |
org.exoplatform.addon.wallet.model.Wallet |
getWalletByIdentityId(long identityId) |
org.exoplatform.addon.wallet.model.Wallet |
getWalletByTypeAndId(String type,
String remoteId) |
org.exoplatform.addon.wallet.model.Wallet |
getWalletByTypeAndId(String type,
String remoteId,
String currentUser) |
long |
getWalletsCount() |
boolean |
isWalletOwner(org.exoplatform.addon.wallet.model.Wallet wallet,
String currentUser) |
Set<org.exoplatform.addon.wallet.model.Wallet> |
listWallets() |
void |
removePrivateKeyByTypeAndId(String type,
String remoteId,
String currentUser) |
void |
removeWalletByAddress(String address,
String currentUser) |
void |
removeWalletByTypeAndId(String type,
String remoteId,
String currentUser) |
org.exoplatform.addon.wallet.model.WalletAddressLabel |
saveOrDeleteAddressLabel(org.exoplatform.addon.wallet.model.WalletAddressLabel label,
String currentUser) |
void |
savePrivateKeyByTypeAndId(String type,
String remoteId,
String content,
String currentUser) |
void |
saveWallet(org.exoplatform.addon.wallet.model.Wallet wallet) |
void |
saveWalletAddress(org.exoplatform.addon.wallet.model.Wallet wallet,
String currentUser,
boolean broadcast) |
void |
setInitializationStatus(String address,
org.exoplatform.addon.wallet.model.WalletInitializationState initializationState) |
void |
setInitializationStatus(String address,
org.exoplatform.addon.wallet.model.WalletInitializationState initializationState,
String currentUser) |
void |
start() |
void |
stop() |
public EthereumWalletAccountService(WalletStorage walletAccountStorage, AddressLabelStorage labelStorage, org.exoplatform.container.xml.InitParams params)
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic Set<org.exoplatform.addon.wallet.model.Wallet> listWallets()
listWallets in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic long getWalletsCount()
getWalletsCount in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic org.exoplatform.addon.wallet.model.Wallet getWalletByIdentityId(long identityId)
getWalletByIdentityId in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic org.exoplatform.addon.wallet.model.Wallet getWalletByTypeAndId(String type, String remoteId, String currentUser)
getWalletByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic org.exoplatform.addon.wallet.model.Wallet getWalletByTypeAndId(String type, String remoteId)
getWalletByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic void savePrivateKeyByTypeAndId(String type, String remoteId, String content, String currentUser) throws IllegalAccessException
savePrivateKeyByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic String getPrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
getPrivateKeyByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic String getPrivateKeyByTypeAndId(String type, String remoteId)
getPrivateKeyByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic void removePrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
removePrivateKeyByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic org.exoplatform.addon.wallet.model.Wallet getWalletByAddress(String address)
getWalletByAddress in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic void createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
createAdminAccount in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic void saveWallet(org.exoplatform.addon.wallet.model.Wallet wallet)
saveWallet in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic void saveWalletAddress(org.exoplatform.addon.wallet.model.Wallet wallet,
String currentUser,
boolean broadcast)
throws IllegalAccessException
saveWalletAddress in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic void removeWalletByAddress(String address, String currentUser) throws IllegalAccessException
removeWalletByAddress in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic void removeWalletByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
removeWalletByTypeAndId in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic void enableWalletByAddress(String address, boolean enable, String currentUser) throws IllegalAccessException
enableWalletByAddress in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic void setInitializationStatus(String address, org.exoplatform.addon.wallet.model.WalletInitializationState initializationState, String currentUser) throws IllegalAccessException
setInitializationStatus in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic void setInitializationStatus(String address, org.exoplatform.addon.wallet.model.WalletInitializationState initializationState)
setInitializationStatus in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic void checkCanSaveWallet(org.exoplatform.addon.wallet.model.Wallet wallet,
org.exoplatform.addon.wallet.model.Wallet storedWallet,
String currentUser)
throws IllegalAccessException
checkCanSaveWallet in interface org.exoplatform.addon.wallet.service.WalletAccountServiceIllegalAccessExceptionpublic boolean isWalletOwner(org.exoplatform.addon.wallet.model.Wallet wallet,
String currentUser)
isWalletOwner in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic org.exoplatform.addon.wallet.model.WalletAddressLabel saveOrDeleteAddressLabel(org.exoplatform.addon.wallet.model.WalletAddressLabel label,
String currentUser)
saveOrDeleteAddressLabel in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic Set<org.exoplatform.addon.wallet.model.WalletAddressLabel> getAddressesLabelsVisibleBy(String currentUser)
getAddressesLabelsVisibleBy in interface org.exoplatform.addon.wallet.service.WalletAccountServicepublic String getAdminAccountPassword()
getAdminAccountPassword in interface org.exoplatform.addon.wallet.service.WalletAccountServiceCopyright © 2003–2019 eXo Platform SAS. All rights reserved.