Package com.dnanexus
Class ExecutableRunner<T extends DXExecution>
- java.lang.Object
-
- com.dnanexus.ExecutableRunner<T>
-
- Type Parameters:
T- the type of the execution that will be produced
public abstract class ExecutableRunner<T extends DXExecution> extends Object
Collects parameters for a new run of an executable. To obtain an instance, callDXExecutable.newRun().
-
-
Field Summary
Fields Modifier and Type Field Description protected DXEnvironmentenvprotected StringexecutableIdprotected static com.fasterxml.jackson.databind.ObjectMapperMAPPER
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExecutableRunner<T>addTags(Collection<String> tags)Adds the specified tags to the resulting execution.ExecutableRunner<T>delayWorkspaceDestruction()Delays the destruction of the workspace of the resulting job so it can be examined for debugging.ExecutableRunner<T>dependsOn(DXDataObject dataObject)Makes the resulting execution depend on the specified data object, so that the execution will not begin until the data object is closed.ExecutableRunner<T>dependsOn(DXExecution execution)Makes the resulting execution depend on the specified execution, so that the former will not begin until the latter has successfully completed.ExecutableRunner<T>inFolder(String folder)Deprecated.UsesetFolder(String)insteadExecutableRunner<T>inProject(DXProject project)Deprecated.UsesetProject(DXProject)insteadExecutableRunner<T>putAllProperties(Map<String,String> properties)Sets the specified properties on the execution to be created.ExecutableRunner<T>putProperty(String key, String value)Sets the specified property on the execution to be created.abstract Trun()Runs the executable.ExecutableRunner<T>setDetails(Object details)Sets the execution details to the JSON serialized value of the specified object.ExecutableRunner<T>setFolder(String folder)Sets the folder in which the execution's outputs will be deposited.ExecutableRunner<T>setInput(Object inputObject)Sets the input hash to the JSON serialized value of the specified object.ExecutableRunner<T>setName(String name)Sets the name of the resulting execution.ExecutableRunner<T>setProject(DXProject project)Sets the project context of the resulting execution.ExecutableRunner<T>setRawInput(com.fasterxml.jackson.databind.JsonNode inputHash)Sets the input hash to the specified JSON node.ExecutableRunner<T>withDetails(Object details)Deprecated.UsesetDetails(Object)insteadExecutableRunner<T>withInput(Object inputObject)Deprecated.UsesetInput(Object)insteadExecutableRunner<T>withName(String name)Deprecated.UsesetName(String)insteadExecutableRunner<T>withRawInput(com.fasterxml.jackson.databind.JsonNode inputHash)Deprecated.UsesetRawInput(JsonNode)instead
-
-
-
Field Detail
-
executableId
protected final String executableId
-
env
protected final DXEnvironment env
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Method Detail
-
addTags
public ExecutableRunner<T> addTags(Collection<String> tags)
Adds the specified tags to the resulting execution.- Parameters:
tags- tags to add- Returns:
- the same runner object
-
delayWorkspaceDestruction
public ExecutableRunner<T> delayWorkspaceDestruction()
Delays the destruction of the workspace of the resulting job so it can be examined for debugging.- Returns:
- the same runner object
-
dependsOn
public ExecutableRunner<T> dependsOn(DXDataObject dataObject)
Makes the resulting execution depend on the specified data object, so that the execution will not begin until the data object is closed.- Parameters:
dataObject- data object to depend on- Returns:
- the same runner object
-
dependsOn
public ExecutableRunner<T> dependsOn(DXExecution execution)
Makes the resulting execution depend on the specified execution, so that the former will not begin until the latter has successfully completed.- Parameters:
execution- execution to depend on- Returns:
- the same runner object
-
inFolder
@Deprecated public ExecutableRunner<T> inFolder(String folder)
Deprecated.UsesetFolder(String)insteadSets the folder in which the execution's outputs will be deposited.- Parameters:
folder- full path to folder (a String starting with "/")- Returns:
- the same runner object
-
inProject
@Deprecated public ExecutableRunner<T> inProject(DXProject project)
Deprecated.UsesetProject(DXProject)insteadSets the project context of the resulting execution.- Parameters:
project- project in which the executable will be run- Returns:
- the same runner object
-
putAllProperties
public ExecutableRunner<T> putAllProperties(Map<String,String> properties)
Sets the specified properties on the execution to be created.- Parameters:
properties- Map containing non-null keys and values which will be set as property keys and values respectively- Returns:
- the same
Builderobject
-
putProperty
public ExecutableRunner<T> putProperty(String key, String value)
Sets the specified property on the execution to be created.- Parameters:
key- property key to setvalue- property value to set- Returns:
- the same
Builderobject
-
run
public abstract T run()
Runs the executable.- Returns:
- the resulting execution object
-
setDetails
public ExecutableRunner<T> setDetails(Object details)
Sets the execution details to the JSON serialized value of the specified object.- Parameters:
details- user-supplied metadata- Returns:
- the same runner object
-
setFolder
public ExecutableRunner<T> setFolder(String folder)
Sets the folder in which the execution's outputs will be deposited.- Parameters:
folder- full path to folder (a String starting with "/")- Returns:
- the same runner object
-
setInput
public ExecutableRunner<T> setInput(Object inputObject)
Sets the input hash to the JSON serialized value of the specified object.- Parameters:
inputObject- object to be JSON serialized- Returns:
- the same runner object
-
setName
public ExecutableRunner<T> setName(String name)
Sets the name of the resulting execution.- Parameters:
name- job name- Returns:
- the same runner object
-
setProject
public ExecutableRunner<T> setProject(DXProject project)
Sets the project context of the resulting execution.- Parameters:
project- project in which the executable will be run- Returns:
- the same runner object
-
setRawInput
public ExecutableRunner<T> setRawInput(com.fasterxml.jackson.databind.JsonNode inputHash)
Sets the input hash to the specified JSON node.- Parameters:
inputHash-- Returns:
- the same runner object
-
withDetails
@Deprecated public ExecutableRunner<T> withDetails(Object details)
Deprecated.UsesetDetails(Object)insteadSets the execution details to the JSON serialized value of the specified object.- Parameters:
details- user-supplied metadata- Returns:
- the same runner object
-
withInput
@Deprecated public ExecutableRunner<T> withInput(Object inputObject)
Deprecated.UsesetInput(Object)insteadSets the input hash to the JSON serialized value of the specified object.- Parameters:
inputObject- object to be JSON serialized- Returns:
- the same runner object
-
withName
@Deprecated public ExecutableRunner<T> withName(String name)
Deprecated.UsesetName(String)insteadSets the name of the resulting execution.- Parameters:
name- job name- Returns:
- the same runner object
-
withRawInput
@Deprecated public ExecutableRunner<T> withRawInput(com.fasterxml.jackson.databind.JsonNode inputHash)
Deprecated.UsesetRawInput(JsonNode)insteadSets the input hash to the specified JSON node.- Parameters:
inputHash-- Returns:
- the same runner object
-
-