public interface WalletAccountService
| Modifier and Type | Method and Description |
|---|---|
void |
checkCanSaveWallet(Wallet wallet,
Wallet storedWallet,
String currentUser)
Throws an exception if the user is not allowed to modify wallet information
|
void |
enableWalletByAddress(String address,
boolean enable,
String currentUser)
Enable/Disable User or Space wallet
|
Set<AddressLabel> |
getAddressesLabelsVisibleBy(String currentUser)
List of labels that current user can access
|
String |
getPrivateKeyByTypeAndId(String type,
String remoteId,
String currentUser)
Retrieve wallet private key by identity type and remoteId
|
Wallet |
getWalletByAddress(String address)
Retrieve wallet by address
|
Wallet |
getWalletByIdentityId(long identityId)
Retrieve wallet details by identity technical id
|
Wallet |
getWalletByTypeAndId(String type,
String remoteId)
Retrieve wallet details by identity type and remoteId
|
Wallet |
getWalletByTypeAndId(String type,
String remoteId,
String currentUser)
Retrieve wallet details by identity type and remoteId accessed by a user
|
long |
getWalletsCount()
Retrieve wallets count
|
boolean |
isWalletOwner(Wallet wallet,
String currentUser)
Return true if user is accessing his wallet or is accessing a space that he
manages wallet
|
Set<Wallet> |
listWallets()
Retrieves the list registered wallets
|
void |
removePrivateKeyByTypeAndId(String type,
String remoteId,
String currentUser)
Removes wallet private key by identity type and remoteId
|
void |
removeWalletByAddress(String address,
String currentUser)
Remove User or Space wallet address association
|
AddressLabel |
saveOrDeleteAddressLabel(AddressLabel label,
String currentUser)
Saves label if label is not empty else, delete it
|
void |
savePrivateKeyByTypeAndId(String type,
String remoteId,
String content,
String currentUser)
Save wallet private key for a wallet identified by identity type and
remoteId
|
void |
saveWalletAddress(Wallet wallet,
String currentUser,
boolean broadcast)
Save wallet address to currentUser or to a space managed by current user
|
void |
setInitializationStatus(String address,
WalletInitializationState initializationState,
String currentUserId)
Change wallet initialization status
|
Set<Wallet> listWallets()
long getWalletsCount()
Wallet getWalletByIdentityId(long identityId)
identityId - User/Space identity technical idWallet wallet details identified by identity technical idWallet getWalletByTypeAndId(String type, String remoteId, String currentUser)
type - 'user' or 'space'remoteId - username or space pretty namecurrentUser - current username saving wallet private keyWallet wallet details identified by type and remote IdWallet getWalletByTypeAndId(String type, String remoteId)
type - 'user' or 'space'remoteId - username or space pretty nameWallet wallet details identified by type and remote Idvoid savePrivateKeyByTypeAndId(String type, String remoteId, String content, String currentUser) throws IllegalAccessException
type - 'user' or 'space'remoteId - username or space pretty namecontent - crypted private keyIllegalAccessException - when the current user is not allowed to save
the encrypted private key of walletString getPrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
type - 'user' or 'space'remoteId - username or space pretty namecurrentUser - current username getting wallet private keyIllegalAccessException - when the current user is not allowed to get
the encrypted private key of walletvoid removePrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
type - 'user' or 'space'remoteId - username or space pretty namecurrentUser - current username removing wallet private keyIllegalAccessException - when the current user is not an owner of
walletWallet getWalletByAddress(String address)
address - address of wallet to retrieveWallet wallet details identified by type and remote Idvoid saveWalletAddress(Wallet wallet, String currentUser, boolean broadcast) throws IllegalAccessException
wallet - Wallet wallet details to savecurrentUser - current username saving wallet detailsbroadcast - broadcast saving event or notIllegalAccessException - when the current user is not able to save a
new address to the walletvoid removeWalletByAddress(String address, String currentUser) throws IllegalAccessException
address - wallet address association to removecurrentUser - current username removing wallet detailsIllegalAccessException - if current user is not an administratorvoid enableWalletByAddress(String address, boolean enable, String currentUser) throws IllegalAccessException
address - address of wallet to enable/disableenable - whether enable or disable walletcurrentUser - username of current user making the operationIllegalAccessException - if current user is not an administratorvoid checkCanSaveWallet(Wallet wallet, Wallet storedWallet, String currentUser) throws IllegalAccessException
wallet - wallet details to savestoredWallet - stored wallet in databasecurrentUser - current username that is making the modificationIllegalAccessException - if current user is not allowed to modify
walletboolean isWalletOwner(Wallet wallet, String currentUser)
wallet - currentUser - AddressLabel saveOrDeleteAddressLabel(AddressLabel label, String currentUser)
label - label details object to processcurrentUser - current user making the label
creation/modification/deletionAddressLabel saved or deleted label detailsSet<AddressLabel> getAddressesLabelsVisibleBy(String currentUser)
currentUser - current username accessing the list of addresses labelsSet of label detailsvoid setInitializationStatus(String address, WalletInitializationState initializationState, String currentUserId) throws IllegalAccessException
address - wallet addressinitializationState - wallet initialization status of type
WalletInitializationStatecurrentUserId - user changing wallet statusIllegalAccessException - if current user is not allowed to modify
wallet initialization statusCopyright © 2003–2019 eXo Platform SAS. All rights reserved.