Class SuperUserSmartContractService
java.lang.Object
dev.getelements.elements.service.blockchain.omni.SuperUserSmartContractService
- All Implemented Interfaces:
SmartContractService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSmartContract
(CreateSmartContractRequest createSmartContractRequest) Creates a new smart contract.void
deleteContract
(String contractId) Deletes theSmartContract
with the supplied contract ID.getSmartContract
(String contractId) Fetches a specificSmartContract
instance based on ID.getSmartContracts
(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Lists allSmartContract
instances, specifying a search query.void
setSmartContractDao
(SmartContractDao smartContractDao) void
setValidationHelper
(ValidationHelper validationHelper) void
setVaultDao
(VaultDao vaultDao) updateSmartContract
(String smartContractId, UpdateSmartContractRequest updateSmartContractRequest) Updates the suppliedSmartContract
.
-
Constructor Details
-
SuperUserSmartContractService
public SuperUserSmartContractService()
-
-
Method Details
-
getSmartContracts
public Pagination<SmartContract> getSmartContracts(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Description copied from interface:SmartContractService
Lists allSmartContract
instances, specifying a search query.- Specified by:
getSmartContracts
in interfaceSmartContractService
- Parameters:
offset
-count
-- Returns:
- a
Pagination
ofSmartContract
instances
-
getSmartContract
Description copied from interface:SmartContractService
Fetches a specificSmartContract
instance based on ID. If not found, an exception is raised.- Specified by:
getSmartContract
in interfaceSmartContractService
- Parameters:
contractId
- the contract ID- Returns:
- the
SmartContract
, never null
-
createSmartContract
Description copied from interface:SmartContractService
Creates a new smart contract.- Specified by:
createSmartContract
in interfaceSmartContractService
- Parameters:
createSmartContractRequest
- creates a smart contract- Returns:
- the
SmartContract
-
updateSmartContract
public SmartContract updateSmartContract(String smartContractId, UpdateSmartContractRequest updateSmartContractRequest) Description copied from interface:SmartContractService
Updates the suppliedSmartContract
. ThePatchSmartContractRequest
method is used to key theSmartContract
.- Specified by:
updateSmartContract
in interfaceSmartContractService
- Parameters:
updateSmartContractRequest
- theUpdateSmartContractRequest
with the information to update- Returns:
- the
SmartContract
as it was changed by the service.
-
getVaultDao
-
setVaultDao
-
deleteContract
Description copied from interface:SmartContractService
Deletes theSmartContract
with the supplied contract ID.- Specified by:
deleteContract
in interfaceSmartContractService
- Parameters:
contractId
- the contract ID.
-
getSmartContractDao
-
setSmartContractDao
-
getValidationHelper
-
setValidationHelper
-