Package io.keyko.nevermined.api
Interface TemplatesAPI
-
- All Known Implementing Classes:
TemplatesImpl
public interface TemplatesAPIExposes the Public API related with the Service Agreements Templates Management
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.web3j.protocol.core.methods.response.TransactionReceiptapprove(String templateId)Approve (whitelist) an already proposed template.BigIntegergetListSize()Get the number of agreement templates registeredTemplateSEAgetTemplate(String templateId)Return the attributes associated to a registered Template in the Smart ContractsbooleanisApproved(String templateAddress)Checks if an agreement template is approvedorg.web3j.protocol.core.methods.response.TransactionReceiptpropose(String templateId)Suggest an agreement template smart contract to include in the white listed agreement templatesorg.web3j.protocol.core.methods.response.TransactionReceiptrevoke(String templateId)Cancel the propsed/approved template or essentially de-whitelist the template.
-
-
-
Method Detail
-
propose
org.web3j.protocol.core.methods.response.TransactionReceipt propose(String templateId) throws EthereumException
Suggest an agreement template smart contract to include in the white listed agreement templates- Parameters:
templateId- Hex str, typically the Ethereum address of the deployed template (smart contract address)- Returns:
- TransactionReceipt tx receipt
- Throws:
EthereumException- EthereumException
-
approve
org.web3j.protocol.core.methods.response.TransactionReceipt approve(String templateId) throws EthereumException
Approve (whitelist) an already proposed template. Once a template is approved it can be used for creating agreements in Nevermined network- Parameters:
templateId- Hex str, typically the Ethereum address of the deployed template (smart contract address)- Returns:
- TransactionReceipt tx receipt
- Throws:
EthereumException- EthereumException
-
revoke
org.web3j.protocol.core.methods.response.TransactionReceipt revoke(String templateId) throws EthereumException
Cancel the propsed/approved template or essentially de-whitelist the template. This prevents the creation of any further agreements that are based on this template.- Parameters:
templateId- Hex str, typically the Ethereum address of the deployed template (smart contract address)- Returns:
- TransactionReceipt tx receipt
- Throws:
EthereumException- EthereumException
-
getListSize
BigInteger getListSize() throws EthereumException
Get the number of agreement templates registered- Returns:
- BigInteger number of templates
- Throws:
EthereumException- EthereumException
-
getTemplate
TemplateSEA getTemplate(String templateId) throws EthereumException
Return the attributes associated to a registered Template in the Smart Contracts- Parameters:
templateId- Hex str, typically the Ethereum address of the deployed template (smart contract address)- Returns:
- TemplateSEA
- Throws:
EthereumException- EthereumException
-
isApproved
boolean isApproved(String templateAddress) throws EthereumException
Checks if an agreement template is approved- Parameters:
templateAddress- Hex str the ethereum address of the deployed template (smart contract address)- Returns:
- boolean is the template approved?
- Throws:
EthereumException- EthereumException
-
-