Package io.keyko.nevermined.api
Class NeverminedAPI
- java.lang.Object
-
- io.keyko.nevermined.api.NeverminedAPI
-
public class NeverminedAPI extends Object
Class that represents the entry point to initialize and use the API
-
-
Field Summary
Fields Modifier and Type Field Description private io.keyko.nevermined.contracts.AccessSecretStoreConditionaccessSecretStoreConditionprivate AccountsAPIaccountsAPIprivate AccountsManageraccountsManagerprivate AgreementsAPIagreementsAPIprivate AgreementsManageragreementsManagerprivate io.keyko.nevermined.contracts.AgreementStoreManageragreementStoreManagerContractprivate AssetsAPIassetsAPIprivate AssetsManagerassetsManagerprivate io.keyko.nevermined.contracts.ComputeExecutionConditioncomputeExecutionConditionprivate ConditionsAPIconditionsAPIprivate ConditionsManagerconditionsManagerprivate io.keyko.nevermined.contracts.ConditionStoreManagerconditionStoreManagerprivate io.keyko.nevermined.contracts.DIDRegistrydidRegistryContractprivate io.keyko.nevermined.contracts.Dispenserdispenserprivate io.keyko.nevermined.contracts.EscrowAccessSecretStoreTemplateescrowAccessSecretStoreTemplateprivate io.keyko.nevermined.contracts.EscrowComputeExecutionTemplateescrowComputeExecutionTemplateprivate io.keyko.nevermined.contracts.EscrowRewardescrowRewardprivate com.oceanprotocol.secretstore.core.EvmDtoevmDtoprivate io.keyko.common.web3.KeeperServicekeeperServiceprivate io.keyko.nevermined.contracts.LockRewardConditionlockRewardConditionprivate static org.apache.logging.log4j.Loggerlogprivate AccountmainAccountprivate MetadataApiServicemetadataApiServiceprivate static NeverminedAPIneverminedAPIprivate NeverminedConfigneverminedConfigprivate NeverminedManagerneverminedManagerprivate SecretStoreAPIsecretStoreAPIprivate com.oceanprotocol.secretstore.core.SecretStoreDtosecretStoreDtoprivate SecretStoreManagersecretStoreManagerprivate TemplatesAPItemplatesAPIprivate TemplatesManagertemplatesManagerprivate io.keyko.nevermined.contracts.TemplateStoreManagertemplateStoreManagerContractprivate io.keyko.nevermined.contracts.NeverminedTokentokenContractprivate TokensAPItokensAPI
-
Constructor Summary
Constructors Modifier Constructor Description privateNeverminedAPI(NeverminedConfig neverminedConfig)Private constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountsAPIgetAccountsAPI()Gets the AccountsAPIAgreementsAPIgetAgreementsAPI()Gets the AgreementsAPIAssetsAPIgetAssetsAPI()Gets the AssetsAPIConditionsAPIgetConditionsAPI()Gets the ConditionsAPIstatic NeverminedAPIgetInstance(com.typesafe.config.Config config)Build an Instance of Nevermined API from a TypeSafe Config objectstatic NeverminedAPIgetInstance(Properties properties)Build an Instance of Nevermined API from a Properties objectAccountgetMainAccount()Gets the account used to initialized the APISecretStoreAPIgetSecretStoreAPI()Gets the SecretStoreAPITemplatesAPIgetTemplatesAPI()Gets the TemplatesAPITokensAPIgetTokensAPI()Gets the TokensAPIprivate static voidsetRxUndeliverableExceptionHandler()voidsetTemplateStoreManagerContract(io.keyko.nevermined.contracts.TemplateStoreManager contract)Allows to overwrite the TemplateStoreManager contract instanceprivate static PropertiestoProperties(com.typesafe.config.Config config)Transform a TypeSafe Config object into a Java's Properties
-
-
-
Field Detail
-
log
private static final org.apache.logging.log4j.Logger log
-
neverminedConfig
private NeverminedConfig neverminedConfig
-
keeperService
private io.keyko.common.web3.KeeperService keeperService
-
metadataApiService
private MetadataApiService metadataApiService
-
secretStoreDto
private com.oceanprotocol.secretstore.core.SecretStoreDto secretStoreDto
-
evmDto
private com.oceanprotocol.secretstore.core.EvmDto evmDto
-
secretStoreManager
private SecretStoreManager secretStoreManager
-
neverminedManager
private NeverminedManager neverminedManager
-
assetsManager
private AssetsManager assetsManager
-
accountsManager
private AccountsManager accountsManager
-
agreementsManager
private AgreementsManager agreementsManager
-
conditionsManager
private ConditionsManager conditionsManager
-
templatesManager
private TemplatesManager templatesManager
-
tokenContract
private io.keyko.nevermined.contracts.NeverminedToken tokenContract
-
dispenser
private io.keyko.nevermined.contracts.Dispenser dispenser
-
didRegistryContract
private io.keyko.nevermined.contracts.DIDRegistry didRegistryContract
-
escrowAccessSecretStoreTemplate
private io.keyko.nevermined.contracts.EscrowAccessSecretStoreTemplate escrowAccessSecretStoreTemplate
-
lockRewardCondition
private io.keyko.nevermined.contracts.LockRewardCondition lockRewardCondition
-
accessSecretStoreCondition
private io.keyko.nevermined.contracts.AccessSecretStoreCondition accessSecretStoreCondition
-
escrowReward
private io.keyko.nevermined.contracts.EscrowReward escrowReward
-
templateStoreManagerContract
private io.keyko.nevermined.contracts.TemplateStoreManager templateStoreManagerContract
-
agreementStoreManagerContract
private io.keyko.nevermined.contracts.AgreementStoreManager agreementStoreManagerContract
-
conditionStoreManager
private io.keyko.nevermined.contracts.ConditionStoreManager conditionStoreManager
-
computeExecutionCondition
private io.keyko.nevermined.contracts.ComputeExecutionCondition computeExecutionCondition
-
escrowComputeExecutionTemplate
private io.keyko.nevermined.contracts.EscrowComputeExecutionTemplate escrowComputeExecutionTemplate
-
accountsAPI
private AccountsAPI accountsAPI
-
agreementsAPI
private AgreementsAPI agreementsAPI
-
conditionsAPI
private ConditionsAPI conditionsAPI
-
tokensAPI
private TokensAPI tokensAPI
-
assetsAPI
private AssetsAPI assetsAPI
-
secretStoreAPI
private SecretStoreAPI secretStoreAPI
-
templatesAPI
private TemplatesAPI templatesAPI
-
mainAccount
private Account mainAccount
-
neverminedAPI
private static NeverminedAPI neverminedAPI
-
-
Constructor Detail
-
NeverminedAPI
private NeverminedAPI(NeverminedConfig neverminedConfig)
Private constructor- Parameters:
neverminedConfig- the object to configure the API
-
-
Method Detail
-
toProperties
private static Properties toProperties(com.typesafe.config.Config config)
Transform a TypeSafe Config object into a Java's Properties- Parameters:
config- the config object- Returns:
- a Properties object with the configuration of the API
-
setRxUndeliverableExceptionHandler
private static void setRxUndeliverableExceptionHandler()
-
getInstance
public static NeverminedAPI getInstance(Properties properties) throws InitializationException, InvalidConfiguration
Build an Instance of Nevermined API from a Properties object- Parameters:
properties- values of the configuration- Returns:
- an Initialized NeverminedAPI object
- Throws:
InitializationException- InitializationExceptionInvalidConfiguration- InvalidConfiguration
-
getInstance
public static NeverminedAPI getInstance(com.typesafe.config.Config config) throws InitializationException, InvalidConfiguration
Build an Instance of Nevermined API from a TypeSafe Config object- Parameters:
config- the config object- Returns:
- an Initialized NeverminedAPI object
- Throws:
InitializationException- InitializationExceptionInvalidConfiguration- InvalidConfiguration
-
getMainAccount
public Account getMainAccount()
Gets the account used to initialized the API- Returns:
- the account used to initialized the API
-
getAccountsAPI
public AccountsAPI getAccountsAPI()
Gets the AccountsAPI- Returns:
- an instance of an Implementation class of AccountsAPI
-
getAgreementsAPI
public AgreementsAPI getAgreementsAPI()
Gets the AgreementsAPI- Returns:
- an instance of an Implementation class of AgreementsAPI
-
getConditionsAPI
public ConditionsAPI getConditionsAPI()
Gets the ConditionsAPI- Returns:
- an instance of an Implementation class of ConditionsAPI
-
getTokensAPI
public TokensAPI getTokensAPI()
Gets the TokensAPI- Returns:
- an instance of an Implementation class of TokensAPI
-
getAssetsAPI
public AssetsAPI getAssetsAPI()
Gets the AssetsAPI- Returns:
- an instance of an Implementation class of AssetsAPI
-
getSecretStoreAPI
public SecretStoreAPI getSecretStoreAPI()
Gets the SecretStoreAPI- Returns:
- an instance of an Implementation class of SecretStoreAPI
-
getTemplatesAPI
public TemplatesAPI getTemplatesAPI()
Gets the TemplatesAPI- Returns:
- an instance of an Implementation class of TemplatesAPI
-
setTemplateStoreManagerContract
public void setTemplateStoreManagerContract(io.keyko.nevermined.contracts.TemplateStoreManager contract)
Allows to overwrite the TemplateStoreManager contract instance- Parameters:
contract- TemplateStoreManager
-
-