Interface TemplatesAPI

  • All Known Implementing Classes:
    TemplatesImpl

    public interface TemplatesAPI
    Exposes 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.TransactionReceipt approve​(String templateAddress)
      Approve (whitelist) an already proposed template.
      BigInteger getListSize()
      Get the number of agreement templates registered
      TemplateSEA getTemplate​(String templateAddress)
      Return the attributes associated to a registered Template in the Smart Contracts
      boolean isApproved​(String templateAddress)
      Checks if an agreement template is approved
      org.web3j.protocol.core.methods.response.TransactionReceipt propose​(String templateAddress)
      Suggest an agreement template smart contract to include in the white listed agreement templates
      org.web3j.protocol.core.methods.response.TransactionReceipt revoke​(String templateAddress)
      Cancel the propsed/approved template or essentially de-whitelist the template.
    • Method Detail

      • propose

        org.web3j.protocol.core.methods.response.TransactionReceipt propose​(String templateAddress)
                                                                     throws EthereumException
        Suggest an agreement template smart contract to include in the white listed agreement templates
        Parameters:
        templateAddress - Hex str 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 templateAddress)
                                                                     throws EthereumException
        Approve (whitelist) an already proposed template. Once a template is approved it can be used for creating agreements in Ocean Protocol keeper network
        Parameters:
        templateAddress - Hex str 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 templateAddress)
                                                                    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:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        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
      • getTemplate

        TemplateSEA getTemplate​(String templateAddress)
                         throws EthereumException
        Return the attributes associated to a registered Template in the Smart Contracts
        Parameters:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        TemplateSEA
        Throws:
        EthereumException - EthereumException