Class TemplatesImpl

    • Constructor Detail

      • TemplatesImpl

        public TemplatesImpl​(TemplatesManager templatesManager)
        Constructor
        Parameters:
        templatesManager - the templatesManager
    • Method Detail

      • propose

        public org.web3j.protocol.core.methods.response.TransactionReceipt propose​(String templateAddress)
                                                                            throws EthereumException
        Description copied from interface: TemplatesAPI
        Suggest an agreement template smart contract to include in the white listed agreement templates
        Specified by:
        propose in interface TemplatesAPI
        Parameters:
        templateAddress - Hex str, typically the Ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EthereumException
      • approve

        public org.web3j.protocol.core.methods.response.TransactionReceipt approve​(String templateAddress)
                                                                            throws EthereumException
        Description copied from interface: TemplatesAPI
        Approve (whitelist) an already proposed template. Once a template is approved it can be used for creating agreements in Nevermined network
        Specified by:
        approve in interface TemplatesAPI
        Parameters:
        templateAddress - Hex str, typically the Ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EthereumException
      • revoke

        public org.web3j.protocol.core.methods.response.TransactionReceipt revoke​(String templateAddress)
                                                                           throws EthereumException
        Description copied from interface: TemplatesAPI
        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.
        Specified by:
        revoke in interface TemplatesAPI
        Parameters:
        templateAddress - Hex str, typically the Ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EthereumException
      • isApproved

        public boolean isApproved​(String templateAddress)
                           throws EthereumException
        Description copied from interface: TemplatesAPI
        Checks if an agreement template is approved
        Specified by:
        isApproved in interface TemplatesAPI
        Parameters:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        boolean is the template approved?
        Throws:
        EthereumException - EthereumException
      • getTemplate

        public TemplateSEA getTemplate​(String templateAddress)
                                throws EthereumException
        Description copied from interface: TemplatesAPI
        Return the attributes associated to a registered Template in the Smart Contracts
        Specified by:
        getTemplate in interface TemplatesAPI
        Parameters:
        templateAddress - Hex str, typically the Ethereum address of the deployed template (smart contract address)
        Returns:
        TemplateSEA
        Throws:
        EthereumException - EthereumException