Class SmartContractOperation

java.lang.Object
pt.unl.fct.di.novasys.babel.protocols.storage.operations.common.CommonOperation
pt.unl.fct.di.novasys.babel.protocols.storage.operations.SmartContractOperation

public class SmartContractOperation extends CommonOperation
An operation issued to blockchain storage layer, realized internally by a smart contract. This class receives an operation type (e.g., CREATE, UPDATE, READ, etc.) and a Map of pairs (String,String) representing the key of the object and its associated values (represented as a string value).
  • Constructor Details

    • SmartContractOperation

      public SmartContractOperation(CommonOperationType type, Map<String,String> args)
      Creates a blockchain operation with a specific operation type, and the arguments (containing the values) to be passed on to the smart contract.
      Parameters:
      type - the type of the operation
      args - arguments of the operation
  • Method Details

    • getArgs

      public Map<String,String> getArgs()
      Gets all of the arguments to be applied on the smart contract.
      Returns:
      the arguments to be applied on the smart contract.
    • getArgsIdentifiers

      public Set<String> getArgsIdentifiers()
      Gets the argument keys (i.e., the identifiers of the objects in the smart contract).
      Returns:
      the argument keys (i.e., the identifiers of the objects in the smart contract).
    • getArgsValues

      public List<String> getArgsValues()
      Gets the values associated with the argument keys.
      Returns:
      the values associated with the argument keys.