接口 ScriptingInvocationService

  • 所有已知子接口:
    ScriptingService
    所有已知实现类:
    ScriptRunner

    public interface ScriptingInvocationService
    Vault provides the scripting service to general users to execute a preset script by the vault owner.
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      <T> java.util.concurrent.CompletableFuture<T> callScript​(java.lang.String name, com.fasterxml.jackson.databind.JsonNode params, java.lang.String targetDid, java.lang.String targetAppDid, java.lang.Class<T> resultType)
      Invoke the execution of a specified script registered previously by the vault owner, where the script is defined with certain preset routines.
      <T> java.util.concurrent.CompletableFuture<T> downloadFile​(java.lang.String transactionId, java.lang.Class<T> resultType)
      Invoke the execution of the script to download a file in the streaming mode.
      <T> java.util.concurrent.CompletableFuture<T> downloadFileByHiveUrl​(java.lang.String hiveUrl, java.lang.Class<T> resultType)
      This is the compatible implementation for downloading file by the hive url which comes from v1 version SDK.
      <T> java.util.concurrent.CompletableFuture<T> uploadFile​(java.lang.String transactionId, java.lang.Class<T> resultType)
      Invoke the execution of the script to upload a file in the streaming mode.
    • 方法详细资料

      • callScript

        <T> java.util.concurrent.CompletableFuture<T> callScript​(java.lang.String name,
                                                                 com.fasterxml.jackson.databind.JsonNode params,
                                                                 java.lang.String targetDid,
                                                                 java.lang.String targetAppDid,
                                                                 java.lang.Class<T> resultType)
        Invoke the execution of a specified script registered previously by the vault owner, where the script is defined with certain preset routines. It's the general invocation method for external users to call.
        类型参数:
        T - String, byte[], JsonNode, Reader
        参数:
        name - The name of script to invoke.
        params - The parameters as input to the invocation.
        targetDid - The script owner's user did. Skipped when owner calls.
        targetAppDid - The script owner's application did. Skipped when owner calls.
        resultType - String, byte[], JsonNode, Reader
        返回:
        String, byte[], JsonNode, Reader
      • uploadFile

        <T> java.util.concurrent.CompletableFuture<T> uploadFile​(java.lang.String transactionId,
                                                                 java.lang.Class<T> resultType)
        Invoke the execution of the script to upload a file in the streaming mode. The upload works a bit differently from other executable queries because there are two steps to this executable. First, register a script on the vault, then you call this API actually to upload the file
        类型参数:
        T - Reader or InputStream class
        参数:
        transactionId - The streaming identifier to the upload process
        resultType - Reader or InputStream class
        返回:
        Reader or InputStream class
      • downloadFile

        <T> java.util.concurrent.CompletableFuture<T> downloadFile​(java.lang.String transactionId,
                                                                   java.lang.Class<T> resultType)
        Invoke the execution of the script to download a file in the streaming mode. The upload works a bit differently from other executable queries because there are two steps to this executable. First, register a script on the vault, then you call this API actually to download the file
        类型参数:
        T - Reader or InputStream class
        参数:
        transactionId - The streaming identifier to the upload process
        resultType - Reader or InputStream class
        返回:
        Reader or InputStream class
      • downloadFileByHiveUrl

        <T> java.util.concurrent.CompletableFuture<T> downloadFileByHiveUrl​(java.lang.String hiveUrl,
                                                                            java.lang.Class<T> resultType)
        This is the compatible implementation for downloading file by the hive url which comes from v1 version SDK. The hive url definition is as this format:
        hive://<targetDid>@<targetAppDid>/<scriptName>?params=<paramJsonStr>
        类型参数:
        T - Reader or InputStream class
        参数:
        hiveUrl - The hive url.
        resultType - Reader or InputStream class
        返回:
        Reader or InputStream instance