public class EthereumWalletService extends Object implements org.picocontainer.Startable
| Constructor and Description |
|---|
EthereumWalletService(EthereumClientConnector clientConnector,
EthereumWalletContractService contractService,
EthereumWalletAccountService accountService,
org.exoplatform.commons.api.settings.SettingService settingService,
org.exoplatform.social.core.space.spi.SpaceService spaceService,
org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage webNotificationStorage,
org.exoplatform.container.PortalContainer container,
org.exoplatform.container.xml.InitParams params) |
| Modifier and Type | Method and Description |
|---|---|
GlobalSettings |
getSettings()
Retrieves global stored settings used for all users.
|
GlobalSettings |
getSettings(Long networkId)
Retrieves global stored settings.
|
GlobalSettings |
getSettings(Long networkId,
String spaceId,
String currentUser)
Retrieves global stored settings.
|
boolean |
isFundRequestSent(String notificationId,
String currentUser)
Get fund request status
|
void |
markFundRequestAsSent(String notificationId,
String currentUser)
Mark a fund request web notification as sent
|
void |
requestFunds(FundsRequest fundsRequest)
Save funds request and send notifications
|
void |
saveSettings(GlobalSettings newGlobalSettings)
Save global settings
|
void |
saveSettings(GlobalSettings newGlobalSettings,
Integer dataVersion)
Save global settings with new dataversion
|
void |
saveUserPreferences(String currentUser,
WalletPreferences userPreferences)
Save user preferences of Wallet
|
void |
start() |
void |
stop() |
public EthereumWalletService(EthereumClientConnector clientConnector, EthereumWalletContractService contractService, EthereumWalletAccountService accountService, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage webNotificationStorage, org.exoplatform.container.PortalContainer container, org.exoplatform.container.xml.InitParams params)
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void saveSettings(GlobalSettings newGlobalSettings)
newGlobalSettings - global settings to savepublic void saveSettings(GlobalSettings newGlobalSettings, Integer dataVersion)
newGlobalSettings - global settings to savedataVersion - new data version of global settings to savepublic GlobalSettings getSettings()
GlobalSettings global settings of default watched
blockchain network without user preferencespublic GlobalSettings getSettings(Long networkId)
networkId - blockchain network id to retrieve its settingsGlobalSettings global settings of blockchain network id
without user preferencespublic GlobalSettings getSettings(Long networkId, String spaceId, String currentUser)
networkId - blockchain network id to retrieve its settingsspaceId - space pretty name to include its settingscurrentUser - username to include its preferencesGlobalSettings global settings with user and space
preferences included into itpublic void saveUserPreferences(String currentUser, WalletPreferences userPreferences)
currentUser - current user name to save its preferencesuserPreferences - user preferences to savepublic void requestFunds(FundsRequest fundsRequest) throws IllegalAccessException
fundsRequest - funds request details to saveIllegalAccessException - if request sender is not allowed to send
request to receiver walletpublic void markFundRequestAsSent(String notificationId, String currentUser) throws IllegalAccessException
notificationId - web notification idcurrentUser - current username that is marking the notification as
sentIllegalAccessException - if current user is not the targetted user of
notificationpublic boolean isFundRequestSent(String notificationId, String currentUser) throws IllegalAccessException
notificationId - web notification idcurrentUser - current usernameIllegalAccessException - if current user is not the targetted user of
notificationCopyright © 2003–2019 eXo Platform SAS. All rights reserved.