Package io.keyko.nevermined.api.helper
Class InitializationHelper
- java.lang.Object
-
- io.keyko.nevermined.api.helper.InitializationHelper
-
public class InitializationHelper extends Object
Helper to initialize all the managers, services and contracts needed for the API
-
-
Field Summary
Fields Modifier and Type Field Description private NeverminedConfigneverminedConfig
-
Constructor Summary
Constructors Constructor Description InitializationHelper(NeverminedConfig neverminedConfig)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountsManagergetAccountsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService)Initialize an instance of AccountsManagerAgreementsManagergetAgreementsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService)Initialize an instance of AgreementsManagerAssetsManagergetAssetsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService)Initialize an instance of AssetsManagerConditionsManagergetConditionsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService)Initialize an instance of ConditionsManagercom.oceanprotocol.secretstore.core.EvmDtogetEvmDto()Initialize an instance of EvmDtoio.keyko.common.web3.KeeperServicegetKeeper()Initialize an instance of KeeperServiceMetadataApiServicegetMetadataService()Initialize an instance of MetadataApiServiceNeverminedManagergetNeverminedManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService)Initialize an instance of NeverminedManagercom.oceanprotocol.secretstore.core.SecretStoreDtogetSecretStoreDto()Initialize an instance of SecretStoreDtoSecretStoreManagergetSecretStoreManager(com.oceanprotocol.secretstore.core.SecretStoreDto secretStoreDto, com.oceanprotocol.secretstore.core.EvmDto evmDto)Initialize an instance of SecretStoreManagerTemplatesManagergetTemplatesManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService)Initialize an instance of TemplatesManagerio.keyko.nevermined.contracts.AccessSecretStoreConditionloadAccessSecretStoreCondition(io.keyko.common.web3.KeeperService keeper)Loads the AccessSecretStoreCondition contract from Keeperio.keyko.nevermined.contracts.AgreementStoreManagerloadAgreementStoreManager(io.keyko.common.web3.KeeperService keeper)Loads the AgreementStoreManager contract from Keeperio.keyko.nevermined.contracts.ComputeExecutionConditionloadComputeExecutionCondition(io.keyko.common.web3.KeeperService keeper)Loads the ComputeExecutionCondition contract from Keeperio.keyko.nevermined.contracts.ConditionStoreManagerloadConditionStoreManager(io.keyko.common.web3.KeeperService keeper)Loads the AgreementStoreManager contract from Keeperio.keyko.nevermined.contracts.DIDRegistryloadDIDRegistryContract(io.keyko.common.web3.KeeperService keeper)Loads the DIDRegistry contract from Keeperio.keyko.nevermined.contracts.DispenserloadDispenserContract(io.keyko.common.web3.KeeperService keeper)Loads the Dispenser contract from Keeperio.keyko.nevermined.contracts.EscrowAccessSecretStoreTemplateloadEscrowAccessSecretStoreTemplate(io.keyko.common.web3.KeeperService keeper)Loads the EscrowAccessSecretStoreTemplate contract from Keeperio.keyko.nevermined.contracts.EscrowComputeExecutionTemplateloadEscrowComputeExecutionTemplate(io.keyko.common.web3.KeeperService keeper)Loads the EscrowComputeExecutionTemplate contract from Keeperio.keyko.nevermined.contracts.EscrowRewardloadEscrowReward(io.keyko.common.web3.KeeperService keeper)Loads the EscrowReward contract from Keeperio.keyko.nevermined.contracts.LockRewardConditionloadLockRewardCondition(io.keyko.common.web3.KeeperService keeper)Loads the LockRewardCondition contract from Keeperio.keyko.nevermined.contracts.NeverminedTokenloadNeverminedTokenContract(io.keyko.common.web3.KeeperService keeper)Loads the NeverminedToken contract from Keeperio.keyko.nevermined.contracts.TemplateStoreManagerloadTemplateStoreManagerContract(io.keyko.common.web3.KeeperService keeper)Loads the TemplateStoreManager contract from Keeper
-
-
-
Field Detail
-
neverminedConfig
private NeverminedConfig neverminedConfig
-
-
Constructor Detail
-
InitializationHelper
public InitializationHelper(NeverminedConfig neverminedConfig)
Constructor- Parameters:
neverminedConfig- object with the configuration
-
-
Method Detail
-
getKeeper
public io.keyko.common.web3.KeeperService getKeeper() throws IOException, org.web3j.crypto.CipherExceptionInitialize an instance of KeeperService- Returns:
- an initialized KeeperService object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
getMetadataService
public MetadataApiService getMetadataService()
Initialize an instance of MetadataApiService- Returns:
- an initialized MetadataApiService object
-
getSecretStoreDto
public com.oceanprotocol.secretstore.core.SecretStoreDto getSecretStoreDto()
Initialize an instance of SecretStoreDto- Returns:
- an initializedSecretStoreDto object
-
getEvmDto
public com.oceanprotocol.secretstore.core.EvmDto getEvmDto()
Initialize an instance of EvmDto- Returns:
- an initialized EvmDto object
-
getSecretStoreManager
public SecretStoreManager getSecretStoreManager(com.oceanprotocol.secretstore.core.SecretStoreDto secretStoreDto, com.oceanprotocol.secretstore.core.EvmDto evmDto)
Initialize an instance of SecretStoreManager- Parameters:
secretStoreDto- the DTO to connect with secret storeevmDto- DTO with the EVM- Returns:
- an initialized SecretStoreManager object
-
getNeverminedManager
public NeverminedManager getNeverminedManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of NeverminedManager- Parameters:
keeperService- the keeperServicemetadataApiService- the MetadataApiService- Returns:
- an initialized NeverminedManager object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
getAccountsManager
public AccountsManager getAccountsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of AccountsManager- Parameters:
keeperService- the keeperServicemetadataApiService- the MetadataApiService- Returns:
- an initialized AccountsManager object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
getAgreementsManager
public AgreementsManager getAgreementsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of AgreementsManager- Parameters:
keeperService- the keeperServicemetadataApiService- the MetadataApiService- Returns:
- an initialized AgreementsManager object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
getConditionsManager
public ConditionsManager getConditionsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of ConditionsManager- Parameters:
keeperService- the keeperServicemetadataApiService- the MetadataApiService- Returns:
- an initialized ConditionsManager object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
getTemplatesManager
public TemplatesManager getTemplatesManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of TemplatesManager- Parameters:
keeperService- the keeperServicemetadataApiService- the MetadataApiService- Returns:
- an initialized TemplatesManager object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
getAssetsManager
public AssetsManager getAssetsManager(io.keyko.common.web3.KeeperService keeperService, MetadataApiService metadataApiService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of AssetsManager- Parameters:
keeperService- the KeeperServicemetadataApiService- the MetadataApiService- Returns:
- an initialized AssetsManager object
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadNeverminedTokenContract
public io.keyko.nevermined.contracts.NeverminedToken loadNeverminedTokenContract(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the NeverminedToken contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of NeverminedToken contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadTemplateStoreManagerContract
public io.keyko.nevermined.contracts.TemplateStoreManager loadTemplateStoreManagerContract(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the TemplateStoreManager contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of TemplateStoreManager contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadDispenserContract
public io.keyko.nevermined.contracts.Dispenser loadDispenserContract(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the Dispenser contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of Dispenser contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadDIDRegistryContract
public io.keyko.nevermined.contracts.DIDRegistry loadDIDRegistryContract(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the DIDRegistry contract from Keeper- Parameters:
keeper- the keeper service- Returns:
- an instance of DIDRegistry contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadEscrowAccessSecretStoreTemplate
public io.keyko.nevermined.contracts.EscrowAccessSecretStoreTemplate loadEscrowAccessSecretStoreTemplate(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the EscrowAccessSecretStoreTemplate contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of EscrowAccessSecretStoreTemplate contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadLockRewardCondition
public io.keyko.nevermined.contracts.LockRewardCondition loadLockRewardCondition(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the LockRewardCondition contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of LockRewardCondition contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadEscrowReward
public io.keyko.nevermined.contracts.EscrowReward loadEscrowReward(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the EscrowReward contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of EscrowReward contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadAgreementStoreManager
public io.keyko.nevermined.contracts.AgreementStoreManager loadAgreementStoreManager(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the AgreementStoreManager contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of AgreementStoreManager contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadConditionStoreManager
public io.keyko.nevermined.contracts.ConditionStoreManager loadConditionStoreManager(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the AgreementStoreManager contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of AgreementStoreManager contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadAccessSecretStoreCondition
public io.keyko.nevermined.contracts.AccessSecretStoreCondition loadAccessSecretStoreCondition(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the AccessSecretStoreCondition contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of AccessSecretStoreCondition contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadEscrowComputeExecutionTemplate
public io.keyko.nevermined.contracts.EscrowComputeExecutionTemplate loadEscrowComputeExecutionTemplate(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the EscrowComputeExecutionTemplate contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of EscrowComputeExecutionTemplate contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
loadComputeExecutionCondition
public io.keyko.nevermined.contracts.ComputeExecutionCondition loadComputeExecutionCondition(io.keyko.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherExceptionLoads the ComputeExecutionCondition contract from Keeper- Parameters:
keeper- the keeper Service- Returns:
- an instance of ComputeExecutionCondition contract deployed in keeper
- Throws:
IOException- IOExceptionorg.web3j.crypto.CipherException- CipherException
-
-