Class OceanInitializationHelper
- java.lang.Object
-
- com.oceanprotocol.squid.api.helper.OceanInitializationHelper
-
public class OceanInitializationHelper extends Object
Helper to initialize all the managers, services and contracts needed for the API
-
-
Field Summary
Fields Modifier and Type Field Description private OceanConfig
oceanConfig
-
Constructor Summary
Constructors Constructor Description OceanInitializationHelper(OceanConfig oceanConfig)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountsManager
getAccountsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService)
Initialize an instance of AccountsManagerAgreementsManager
getAgreementsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService)
Initialize an instance of AgreementsManagerAquariusService
getAquarius()
Initialize an instance of AquariusServiceAssetsManager
getAssetsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService)
Initialize an instance of AssetsManagerConditionsManager
getConditionsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService)
Initialize an instance of ConditionsManagercom.oceanprotocol.secretstore.core.EvmDto
getEvmDto()
Initialize an instance of EvmDtocom.oceanprotocol.common.web3.KeeperService
getKeeper()
Initialize an instance of KeeperServiceOceanManager
getOceanManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService)
Initialize an instance of OceanManagercom.oceanprotocol.secretstore.core.SecretStoreDto
getSecretStoreDto()
Initialize an instance of SecretStoreDtoSecretStoreManager
getSecretStoreManager(com.oceanprotocol.secretstore.core.SecretStoreDto secretStoreDto, com.oceanprotocol.secretstore.core.EvmDto evmDto)
Initialize an instance of SecretStoreManagerTemplatesManager
getTemplatesManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService)
Initialize an instance of TemplatesManagercom.oceanprotocol.keeper.contracts.AccessSecretStoreCondition
loadAccessSecretStoreCondition(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the AccessSecretStoreCondition contract from Keepercom.oceanprotocol.keeper.contracts.AgreementStoreManager
loadAgreementStoreManager(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the AgreementStoreManager contract from Keepercom.oceanprotocol.keeper.contracts.ConditionStoreManager
loadConditionStoreManager(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the AgreementStoreManager contract from Keepercom.oceanprotocol.keeper.contracts.DIDRegistry
loadDIDRegistryContract(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the DIDRegistry contract from Keepercom.oceanprotocol.keeper.contracts.Dispenser
loadDispenserContract(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the Dispenser contract from Keepercom.oceanprotocol.keeper.contracts.EscrowAccessSecretStoreTemplate
loadEscrowAccessSecretStoreTemplate(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the EscrowAccessSecretStoreTemplate contract from Keepercom.oceanprotocol.keeper.contracts.EscrowReward
loadEscrowReward(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the EscrowReward contract from Keepercom.oceanprotocol.keeper.contracts.LockRewardCondition
loadLockRewardCondition(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the LockRewardCondition contract from Keepercom.oceanprotocol.keeper.contracts.OceanToken
loadOceanTokenContract(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the OceanToken contract from Keepercom.oceanprotocol.keeper.contracts.TemplateStoreManager
loadTemplateStoreManagerContract(com.oceanprotocol.common.web3.KeeperService keeper)
Loads the TemplateStoreManager contract from Keeper
-
-
-
Field Detail
-
oceanConfig
private OceanConfig oceanConfig
-
-
Constructor Detail
-
OceanInitializationHelper
public OceanInitializationHelper(OceanConfig oceanConfig)
Constructor- Parameters:
oceanConfig
- object with the configuration
-
-
Method Detail
-
getKeeper
public com.oceanprotocol.common.web3.KeeperService getKeeper() throws IOException, org.web3j.crypto.CipherException
Initialize an instance of KeeperService- Returns:
- an initialized KeeperService object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
getAquarius
public AquariusService getAquarius()
Initialize an instance of AquariusService- Returns:
- an initialized AquariusService 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
-
getOceanManager
public OceanManager getOceanManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of OceanManager- Parameters:
keeperService
- the keeperServiceaquariusService
- the aquariusService- Returns:
- an initialized OceanManager object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
getAccountsManager
public AccountsManager getAccountsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of AccountsManager- Parameters:
keeperService
- the keeperServiceaquariusService
- the AquariusService- Returns:
- an initialized AccountsManager object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
getAgreementsManager
public AgreementsManager getAgreementsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of AgreementsManager- Parameters:
keeperService
- the keeperServiceaquariusService
- the AquariusService- Returns:
- an initialized AgreementsManager object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
getConditionsManager
public ConditionsManager getConditionsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of ConditionsManager- Parameters:
keeperService
- the keeperServiceaquariusService
- the AquariusService- Returns:
- an initialized ConditionsManager object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
getTemplatesManager
public TemplatesManager getTemplatesManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of TemplatesManager- Parameters:
keeperService
- the keeperServiceaquariusService
- the AquariusService- Returns:
- an initialized TemplatesManager object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
getAssetsManager
public AssetsManager getAssetsManager(com.oceanprotocol.common.web3.KeeperService keeperService, AquariusService aquariusService) throws IOException, org.web3j.crypto.CipherException
Initialize an instance of AssetsManager- Parameters:
keeperService
- the KeeperServiceaquariusService
- the AquariusService- Returns:
- an initialized AssetsManager object
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadOceanTokenContract
public com.oceanprotocol.keeper.contracts.OceanToken loadOceanTokenContract(com.oceanprotocol.common.web3.KeeperService keeper) throws IOException, org.web3j.crypto.CipherException
Loads the OceanToken contract from Keeper- Parameters:
keeper
- the keeper Service- Returns:
- an instance of OceanToken contract deployed in keeper
- Throws:
IOException
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadTemplateStoreManagerContract
public com.oceanprotocol.keeper.contracts.TemplateStoreManager loadTemplateStoreManagerContract(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadDispenserContract
public com.oceanprotocol.keeper.contracts.Dispenser loadDispenserContract(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadDIDRegistryContract
public com.oceanprotocol.keeper.contracts.DIDRegistry loadDIDRegistryContract(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadEscrowAccessSecretStoreTemplate
public com.oceanprotocol.keeper.contracts.EscrowAccessSecretStoreTemplate loadEscrowAccessSecretStoreTemplate(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadLockRewardCondition
public com.oceanprotocol.keeper.contracts.LockRewardCondition loadLockRewardCondition(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadEscrowReward
public com.oceanprotocol.keeper.contracts.EscrowReward loadEscrowReward(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadAgreementStoreManager
public com.oceanprotocol.keeper.contracts.AgreementStoreManager loadAgreementStoreManager(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadConditionStoreManager
public com.oceanprotocol.keeper.contracts.ConditionStoreManager loadConditionStoreManager(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
loadAccessSecretStoreCondition
public com.oceanprotocol.keeper.contracts.AccessSecretStoreCondition loadAccessSecretStoreCondition(com.oceanprotocol.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
- IOExceptionorg.web3j.crypto.CipherException
- CipherException
-
-