Class InitializationHelper


  • public class InitializationHelper
    extends Object
    Helper to initialize all the managers, services and contracts needed for the API
    • 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.CipherException
        Initialize an instance of KeeperService
        Returns:
        an initialized KeeperService object
        Throws:
        IOException - IOException
        org.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 store
        evmDto - 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 keeperService
        metadataApiService - the MetadataApiService
        Returns:
        an initialized NeverminedManager object
        Throws:
        IOException - IOException
        org.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 keeperService
        metadataApiService - the MetadataApiService
        Returns:
        an initialized AccountsManager object
        Throws:
        IOException - IOException
        org.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 keeperService
        metadataApiService - the MetadataApiService
        Returns:
        an initialized AgreementsManager object
        Throws:
        IOException - IOException
        org.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 keeperService
        metadataApiService - the MetadataApiService
        Returns:
        an initialized ConditionsManager object
        Throws:
        IOException - IOException
        org.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 keeperService
        metadataApiService - the MetadataApiService
        Returns:
        an initialized TemplatesManager object
        Throws:
        IOException - IOException
        org.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 KeeperService
        metadataApiService - the MetadataApiService
        Returns:
        an initialized AssetsManager object
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadNeverminedTokenContract

        public io.keyko.nevermined.contracts.NeverminedToken loadNeverminedTokenContract​(io.keyko.common.web3.KeeperService keeper)
                                                                                  throws IOException,
                                                                                         org.web3j.crypto.CipherException
        Loads the NeverminedToken contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of NeverminedToken contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadTemplateStoreManagerContract

        public io.keyko.nevermined.contracts.TemplateStoreManager loadTemplateStoreManagerContract​(io.keyko.common.web3.KeeperService keeper)
                                                                                            throws IOException,
                                                                                                   org.web3j.crypto.CipherException
        Loads the TemplateStoreManager contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of TemplateStoreManager contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadDispenserContract

        public io.keyko.nevermined.contracts.Dispenser loadDispenserContract​(io.keyko.common.web3.KeeperService keeper)
                                                                      throws IOException,
                                                                             org.web3j.crypto.CipherException
        Loads the Dispenser contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of Dispenser contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadDIDRegistryContract

        public io.keyko.nevermined.contracts.DIDRegistry loadDIDRegistryContract​(io.keyko.common.web3.KeeperService keeper)
                                                                          throws IOException,
                                                                                 org.web3j.crypto.CipherException
        Loads the DIDRegistry contract from Keeper
        Parameters:
        keeper - the keeper service
        Returns:
        an instance of DIDRegistry contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadEscrowAccessSecretStoreTemplate

        public io.keyko.nevermined.contracts.EscrowAccessSecretStoreTemplate loadEscrowAccessSecretStoreTemplate​(io.keyko.common.web3.KeeperService keeper)
                                                                                                          throws IOException,
                                                                                                                 org.web3j.crypto.CipherException
        Loads the EscrowAccessSecretStoreTemplate contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of EscrowAccessSecretStoreTemplate contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadLockRewardCondition

        public io.keyko.nevermined.contracts.LockRewardCondition loadLockRewardCondition​(io.keyko.common.web3.KeeperService keeper)
                                                                                  throws IOException,
                                                                                         org.web3j.crypto.CipherException
        Loads the LockRewardCondition contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of LockRewardCondition contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadEscrowReward

        public io.keyko.nevermined.contracts.EscrowReward loadEscrowReward​(io.keyko.common.web3.KeeperService keeper)
                                                                    throws IOException,
                                                                           org.web3j.crypto.CipherException
        Loads the EscrowReward contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of EscrowReward contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadAgreementStoreManager

        public io.keyko.nevermined.contracts.AgreementStoreManager loadAgreementStoreManager​(io.keyko.common.web3.KeeperService keeper)
                                                                                      throws IOException,
                                                                                             org.web3j.crypto.CipherException
        Loads the AgreementStoreManager contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of AgreementStoreManager contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadConditionStoreManager

        public io.keyko.nevermined.contracts.ConditionStoreManager loadConditionStoreManager​(io.keyko.common.web3.KeeperService keeper)
                                                                                      throws IOException,
                                                                                             org.web3j.crypto.CipherException
        Loads the AgreementStoreManager contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of AgreementStoreManager contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadAccessSecretStoreCondition

        public io.keyko.nevermined.contracts.AccessSecretStoreCondition loadAccessSecretStoreCondition​(io.keyko.common.web3.KeeperService keeper)
                                                                                                throws IOException,
                                                                                                       org.web3j.crypto.CipherException
        Loads the AccessSecretStoreCondition contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of AccessSecretStoreCondition contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadEscrowComputeExecutionTemplate

        public io.keyko.nevermined.contracts.EscrowComputeExecutionTemplate loadEscrowComputeExecutionTemplate​(io.keyko.common.web3.KeeperService keeper)
                                                                                                        throws IOException,
                                                                                                               org.web3j.crypto.CipherException
        Loads the EscrowComputeExecutionTemplate contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of EscrowComputeExecutionTemplate contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • loadComputeExecutionCondition

        public io.keyko.nevermined.contracts.ComputeExecutionCondition loadComputeExecutionCondition​(io.keyko.common.web3.KeeperService keeper)
                                                                                              throws IOException,
                                                                                                     org.web3j.crypto.CipherException
        Loads the ComputeExecutionCondition contract from Keeper
        Parameters:
        keeper - the keeper Service
        Returns:
        an instance of ComputeExecutionCondition contract deployed in keeper
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException