Package org.exoplatform.wallet.service
Class WalletServiceImpl
java.lang.Object
org.exoplatform.wallet.service.WalletServiceImpl
- All Implemented Interfaces:
org.exoplatform.wallet.service.WalletService,org.picocontainer.Startable
public class WalletServiceImpl
extends Object
implements org.exoplatform.wallet.service.WalletService, org.picocontainer.Startable
A storage service to save/load information used by users and spaces wallets
-
Constructor Summary
ConstructorsConstructorDescriptionWalletServiceImpl(org.exoplatform.wallet.service.WalletContractService contractService, org.exoplatform.wallet.service.WalletAccountService accountService, WalletWebSocketService webSocketService, org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage webNotificationStorage, org.exoplatform.commons.api.settings.ExoFeatureService featureService, org.exoplatform.container.PortalContainer container, org.exoplatform.container.xml.InitParams params) -
Method Summary
Modifier and TypeMethodDescriptiondoubleorg.exoplatform.wallet.model.settings.InitialFundsSettingsorg.exoplatform.wallet.model.settings.GlobalSettingsorg.exoplatform.wallet.model.settings.UserSettingsgetUserSettings(String spaceId, String currentUser, boolean isAdministration) booleanbooleanisFundRequestSent(String notificationId, String currentUser) voidmarkFundRequestAsSent(String notificationId, String currentUser) voidrequestFunds(org.exoplatform.wallet.model.transaction.FundsRequest fundsRequest, String currentUser) voidsaveInitialFundsSettings(org.exoplatform.wallet.model.settings.InitialFundsSettings initialFundsSettings) voidsaveUserPreferences(String currentUser, org.exoplatform.wallet.model.settings.WalletSettings userPreferences) voidsetConfiguredContractDetail(org.exoplatform.wallet.model.ContractDetail contractDetail) voidsetGasPrice(double blockchainGasPrice) voidstart()voidstop()
-
Constructor Details
-
WalletServiceImpl
public WalletServiceImpl(org.exoplatform.wallet.service.WalletContractService contractService, org.exoplatform.wallet.service.WalletAccountService accountService, WalletWebSocketService webSocketService, org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage webNotificationStorage, org.exoplatform.commons.api.settings.ExoFeatureService featureService, org.exoplatform.container.PortalContainer container, 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
-
setConfiguredContractDetail
public void setConfiguredContractDetail(org.exoplatform.wallet.model.ContractDetail contractDetail) - Specified by:
setConfiguredContractDetailin interfaceorg.exoplatform.wallet.service.WalletService
-
getInitialFundsSettings
public org.exoplatform.wallet.model.settings.InitialFundsSettings getInitialFundsSettings()- Specified by:
getInitialFundsSettingsin interfaceorg.exoplatform.wallet.service.WalletService
-
saveInitialFundsSettings
public void saveInitialFundsSettings(org.exoplatform.wallet.model.settings.InitialFundsSettings initialFundsSettings) - Specified by:
saveInitialFundsSettingsin interfaceorg.exoplatform.wallet.service.WalletService
-
getSettings
public org.exoplatform.wallet.model.settings.GlobalSettings getSettings()- Specified by:
getSettingsin interfaceorg.exoplatform.wallet.service.WalletService
-
getUserSettings
public org.exoplatform.wallet.model.settings.UserSettings getUserSettings(String spaceId, String currentUser, boolean isAdministration) - Specified by:
getUserSettingsin interfaceorg.exoplatform.wallet.service.WalletService
-
saveUserPreferences
public void saveUserPreferences(String currentUser, org.exoplatform.wallet.model.settings.WalletSettings userPreferences) - Specified by:
saveUserPreferencesin interfaceorg.exoplatform.wallet.service.WalletService
-
requestFunds
public void requestFunds(org.exoplatform.wallet.model.transaction.FundsRequest fundsRequest, String currentUser) throws IllegalAccessException - Specified by:
requestFundsin interfaceorg.exoplatform.wallet.service.WalletService- Throws:
IllegalAccessException
-
markFundRequestAsSent
public void markFundRequestAsSent(String notificationId, String currentUser) throws IllegalAccessException - Specified by:
markFundRequestAsSentin interfaceorg.exoplatform.wallet.service.WalletService- Throws:
IllegalAccessException
-
isFundRequestSent
public boolean isFundRequestSent(String notificationId, String currentUser) throws IllegalAccessException - Specified by:
isFundRequestSentin interfaceorg.exoplatform.wallet.service.WalletService- Throws:
IllegalAccessException
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceorg.exoplatform.wallet.service.WalletService
-
getGasPrice
public double getGasPrice()- Specified by:
getGasPricein interfaceorg.exoplatform.wallet.service.WalletService
-
setGasPrice
public void setGasPrice(double blockchainGasPrice) - Specified by:
setGasPricein interfaceorg.exoplatform.wallet.service.WalletService
-