Class StagingRepositoryClient.StagingContext

    • Field Detail

      • contextId

        protected java.lang.String contextId
    • Constructor Detail

      • StagingContext

        public StagingContext​(ControllerCredentials credentials,
                              java.lang.String contextId)
    • Method Detail

      • uploadFile

        public java.lang.String uploadFile​(java.io.File file)
        Uploads the local file provided as argument to the StagingRepositoryClient.StagingContext
        Parameters:
        file - the local file to be uploaded
        Returns:
        the handle to the uploaded file
      • upload

        public java.lang.String upload​(java.io.InputStream stream,
                                       java.lang.String resourceName)
        Uploads the resource provided as stream to the StagingRepositoryClient.StagingContext
        Parameters:
        stream - the stream of the resource to be uploaded
        resourceName - the name of the resource
        Returns:
        the handle to the uploaded resource
      • run

        public PlanRunnerResult run()
        Runs the uploaded plan in an isolated mode. The plan will only be able to access the artefacts uploaded to this context
        Returns:
        the PlanRunnerResult of the execution
      • run

        public PlanRunnerResult run​(java.util.Map<java.lang.String,​java.lang.String> executionParameters)
        Runs the uploaded plan in an isolated mode using the provided parameters. The plan will only be able to access the artefacts uploaded to this context
        Parameters:
        executionParameters - a list of key-value parameters. these parameters correspond to the parameters that can be selected in UI when starting an execution
        Returns:
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class AbstractRemoteClient