public class EthereumWalletTokenAdminService extends Object implements org.exoplatform.addon.wallet.service.WalletTokenAdminService, org.picocontainer.Startable, ExoBlockchainTransactionService, ExoWalletStatisticService
| Constructor and Description |
|---|
EthereumWalletTokenAdminService(EthereumClientConnector clientConnector,
ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
balanceOf(String address) |
void |
createAdminAccount() |
org.exoplatform.addon.wallet.model.Wallet |
createAdminAccount(String privateKey,
String currentUser) |
Object |
executeReadOperation(String contractAddress,
String methodName,
Object... arguments) |
String |
executeSendEtherTransaction(String receiverAddress,
double amountInEther) |
String |
executeTokenTransaction(String contractAddress,
String methodName,
Object... arguments) |
int |
getAdminLevel(String address) |
org.exoplatform.addon.wallet.model.Wallet |
getAdminWallet() |
String |
getAdminWalletAddress() |
org.exoplatform.addon.wallet.contract.ERTTokenV2 |
getContractInstance(String contractAddress,
boolean writeOperation) |
BigInteger |
getEtherBalanceOf(String address) |
Map<String,Object> |
getParameters(String statisticType,
Object result,
Object... methodArgs)
Retrieve statistic log parameters
|
ClassLoader |
getWebappClassLoader() |
org.exoplatform.addon.wallet.model.transaction.TransactionDetail |
initialize(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String issuerUsername) |
boolean |
isApprovedAccount(String address) |
boolean |
isInitializedAccount(String address) |
void |
refreshContractDetailFromBlockchain(org.exoplatform.addon.wallet.model.ContractDetail contractDetail,
Set<String> contractModifications) |
void |
refreshWallet(org.exoplatform.addon.wallet.model.Wallet wallet,
org.exoplatform.addon.wallet.model.ContractDetail contractDetail,
Set<String> walletModifications) |
org.exoplatform.addon.wallet.model.transaction.TransactionDetail |
reward(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String issuerUsername) |
org.exoplatform.addon.wallet.model.transaction.TransactionDetail |
sendEther(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String currentUserId) |
org.exoplatform.addon.wallet.model.transaction.TransactionDetail |
sendToken(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String issuerUsername) |
void |
start() |
void |
stop() |
public EthereumWalletTokenAdminService(EthereumClientConnector clientConnector, ClassLoader classLoader)
public ClassLoader getWebappClassLoader()
getWebappClassLoader in interface ExoBlockchainTransactionServicepublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void createAdminAccount()
createAdminAccount in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServicepublic org.exoplatform.addon.wallet.model.Wallet createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
createAdminAccount in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceIllegalAccessExceptionpublic org.exoplatform.addon.wallet.model.Wallet getAdminWallet()
getAdminWallet in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServicepublic String getAdminWalletAddress()
getAdminWalletAddress in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServicepublic final boolean isApprovedAccount(String address) throws Exception
isApprovedAccount in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final int getAdminLevel(String address) throws Exception
getAdminLevel in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final boolean isInitializedAccount(String address) throws Exception
isInitializedAccount in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final BigInteger balanceOf(String address) throws Exception
balanceOf in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final BigInteger getEtherBalanceOf(String address) throws Exception
getEtherBalanceOf in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final org.exoplatform.addon.wallet.model.transaction.TransactionDetail initialize(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String issuerUsername)
throws Exception
initialize in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic org.exoplatform.addon.wallet.model.transaction.TransactionDetail sendEther(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String currentUserId)
throws Exception
sendEther in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final org.exoplatform.addon.wallet.model.transaction.TransactionDetail sendToken(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String issuerUsername)
throws Exception
sendToken in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic final org.exoplatform.addon.wallet.model.transaction.TransactionDetail reward(org.exoplatform.addon.wallet.model.transaction.TransactionDetail transactionDetail,
String issuerUsername)
throws Exception
reward in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic void refreshWallet(org.exoplatform.addon.wallet.model.Wallet wallet,
org.exoplatform.addon.wallet.model.ContractDetail contractDetail,
Set<String> walletModifications)
throws Exception
refreshWallet in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServiceExceptionpublic void refreshContractDetailFromBlockchain(org.exoplatform.addon.wallet.model.ContractDetail contractDetail,
Set<String> contractModifications)
refreshContractDetailFromBlockchain in interface org.exoplatform.addon.wallet.service.WalletTokenAdminServicepublic Map<String,Object> getParameters(String statisticType, Object result, Object... methodArgs)
ExoWalletStatisticServicegetParameters in interface ExoWalletStatisticServiceMap of parameters to include in statistic logpublic String executeSendEtherTransaction(String receiverAddress, double amountInEther) throws Exception
Exceptionpublic String executeTokenTransaction(String contractAddress, String methodName, Object... arguments) throws Exception
Exceptionpublic Object executeReadOperation(String contractAddress, String methodName, Object... arguments) throws Exception
Exceptionpublic org.exoplatform.addon.wallet.contract.ERTTokenV2 getContractInstance(String contractAddress, boolean writeOperation) throws InterruptedException, IOException
InterruptedExceptionIOExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.