Package step.client.repository
Class StagingRepositoryClient.StagingContext
- java.lang.Object
-
- step.client.AbstractRemoteClient
-
- step.client.repository.StagingRepositoryClient.StagingContext
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- StagingRepositoryClient
public static class StagingRepositoryClient.StagingContext extends AbstractRemoteClient
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
contextId
-
Fields inherited from class step.client.AbstractRemoteClient
client, cookies, credentials
-
-
Constructor Summary
Constructors Constructor Description StagingContext(ControllerCredentials credentials, java.lang.String contextId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
PlanRunnerResult
run()
Runs the uploaded plan in an isolated mode.PlanRunnerResult
run(java.util.Map<java.lang.String,java.lang.String> executionParameters)
Runs the uploaded plan in an isolated mode using the provided parameters.java.lang.String
upload(java.io.InputStream stream, java.lang.String resourceName)
Uploads the resource provided as stream to theStagingRepositoryClient.StagingContext
java.lang.String
uploadFile(java.io.File file)
Uploads the local file provided as argument to theStagingRepositoryClient.StagingContext
void
uploadPlan(Plan plan)
Uploads a Plan to theStagingRepositoryClient.StagingContext
-
Methods inherited from class step.client.AbstractRemoteClient
executeRequest, notImplemented, requestBuilder, requestBuilder
-
-
-
-
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 theStagingRepositoryClient.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 theStagingRepositoryClient.StagingContext
- Parameters:
stream
- the stream of the resource to be uploadedresourceName
- the name of the resource- Returns:
- the handle to the uploaded resource
-
uploadPlan
public void uploadPlan(Plan plan)
Uploads a Plan to theStagingRepositoryClient.StagingContext
- Parameters:
plan
-
-
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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classAbstractRemoteClient
-
-