|
TEMERITY | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectus.temerity.pipeline.Named
us.temerity.pipeline.PluginID
us.temerity.pipeline.BasePlugin
us.temerity.pipeline.BaseAction
us.temerity.pipeline.plugin.CommonActionUtils
public class CommonActionUtils
Superclass of most Action plugins which augments BaseAction with many commonly useful helper methods.
This class provides convenience methods for accessing and validating Action parameters,
constructing node target/source related file system paths, creating subprocesses and other
common operations performed inside the prep method of most Actions.
| Field Summary | |
|---|---|
static String |
aExtraOptions
|
| Fields inherited from class us.temerity.pipeline.BasePlugin |
|---|
pDescription |
| Fields inherited from class us.temerity.pipeline.PluginID |
|---|
pVendor, pVersionID |
| Fields inherited from class us.temerity.pipeline.Named |
|---|
pName |
| Constructor Summary | |
|---|---|
protected |
CommonActionUtils(String name,
VersionID vid,
String vendor,
String desc)
Construct with the given name, version, vendor and description. |
| Method Summary | |
|---|---|
protected void |
addExtraOptionsParam()
Adds an additional command-line options parameter to the action. |
protected void |
addExtraOptionsParamToLayout(LayoutGroup layout)
Add the parameter created by the addExtraOptionsParam
method to the given parameter layout group. |
SubProcessHeavy |
createScriptSubProcess(ActionAgenda agenda,
File script,
File outFile,
File errFile)
A convienence method for creating the SubProcessHeavy instance to be returned
by the prep method when generating a temporary script to execute some
OS-specific commands. |
SubProcessHeavy |
createSubProcess(ActionAgenda agenda,
String program,
ArrayList<String> args,
File outFile,
File errFile)
A convienence method for creating the SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner. |
SubProcessHeavy |
createSubProcess(ActionAgenda agenda,
String program,
ArrayList<String> args,
Map<String,String> env,
File outFile,
File errFile)
A convienence method for creating the SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner. |
SubProcessHeavy |
createSubProcess(ActionAgenda agenda,
String program,
ArrayList<String> args,
Map<String,String> env,
File dir,
File outFile,
File errFile)
A convienence method for creating the SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner. |
SubProcessHeavy |
createSubProcess(ActionAgenda agenda,
String program,
File outFile,
File errFile)
A convienence method for creating the SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner. |
SubProcessHeavy |
createTempCopySubProcess(ActionAgenda agenda,
File temp,
Path target,
File outFile,
File errFile)
A convienence method for creating the SubProcessHeavy instance to be returned
by the prep method when simply copying a single temporary file created in
the prep method to the target location. |
File |
createTempScript(ActionAgenda agenda)
Create a unique temporary script file appropriate for the current operating system type. |
static String |
escPath(Path path)
Convert an abstract file system path into an OS specific path string with any backslashes escaped. |
static String |
escPath(String str)
Escape any backslashes in the given file system path string. |
ArrayList<String> |
getExtraOptionsArgs()
Get any additional command-line arguments specified using the action parameter created by the addExtraOptionsParam method. |
Path |
getPrimarySourcePath(String pname,
ActionAgenda agenda,
Collection<String> suffixes,
String desc)
Get the abstract path to the single primary file associated with a source node specified by the given parameter. |
Path |
getPrimarySourcePath(String pname,
ActionAgenda agenda,
String desc)
Get the abstract path to the single primary file associated with a source node specified by the given parameter. |
Path |
getPrimarySourcePath(String pname,
ActionAgenda agenda,
String suffix,
String desc)
Get the abstract path to the single primary file associated with a source node specified by the given parameter. |
ArrayList<Path> |
getPrimarySourcePaths(String pname,
ActionAgenda agenda,
Collection<String> suffixes,
String desc)
Get the abstract paths to the primary files associated with a source node specified by the given parameter. |
ArrayList<Path> |
getPrimarySourcePaths(String pname,
ActionAgenda agenda,
String desc)
Get the abstract paths to the primary files associated with a source node specified by the given parameter. |
ArrayList<Path> |
getPrimarySourcePaths(String pname,
ActionAgenda agenda,
String suffix,
String desc)
Get the abstract paths to the primary files associated with a source node specified by the given parameter. |
Path |
getPrimaryTargetPath(ActionAgenda agenda,
Collection<String> suffixes,
String desc)
Get the abstract path to the single primary file associated with a target node. |
Path |
getPrimaryTargetPath(ActionAgenda agenda,
String desc)
Get the abstract path to the single primary file associated with a target node. |
Path |
getPrimaryTargetPath(ActionAgenda agenda,
String suffix,
String desc)
Get the abstract path to the single primary file associated with a target node. |
ArrayList<Path> |
getPrimaryTargetPaths(ActionAgenda agenda,
Collection<String> suffixes,
String desc)
Get the abstract paths to the primary files associated with a target node. |
ArrayList<Path> |
getPrimaryTargetPaths(ActionAgenda agenda,
String desc)
Get the abstract paths to the primary files associated with a target node. |
ArrayList<Path> |
getPrimaryTargetPaths(ActionAgenda agenda,
String suffix,
String desc)
Get the abstract paths to the primary files associated with a target node. |
boolean |
getSecondarySourceBooleanParamValue(String source,
FilePattern fpat,
String name)
Get the value of the single valued non-null secondary source Boolean parameter with the given name. |
double |
getSecondarySourceDoubleParamValue(String source,
FilePattern fpat,
String name)
Get the value of the single valued non-null secondary source Double parameter with the given name. |
double |
getSecondarySourceDoubleParamValue(String source,
FilePattern fpat,
String name,
Range<Double> range)
Get the bounds checked value of the single valued non-null secondary source Double parameter with the given name. |
int |
getSecondarySourceEnumParamIndex(String source,
FilePattern fpat,
String name)
Get the selected index of the single valued secondary source Enum parameter with the given name. |
int |
getSecondarySourceIntegerParamValue(String source,
FilePattern fpat,
String name)
Get the value of the single valued non-null secondary source Integer parameter with the given name. |
int |
getSecondarySourceIntegerParamValue(String source,
FilePattern fpat,
String name,
Range<Integer> range)
Get the bounds checked value of the single valued non-null secondary source Integer parameter with the given name. |
long |
getSecondarySourceLongParamValue(String source,
FilePattern fpat,
String name)
Get the value of the single valued non-null secondary source Long parameter with the given name. |
long |
getSecondarySourceLongParamValue(String source,
FilePattern fpat,
String name,
Range<Long> range)
Get the bounds checked value of the single valued non-null secondary source Long parameter with the given name. |
boolean |
getSecondarySourceOptionalBooleanParamValue(String source,
FilePattern fpat,
String name)
Get the value of the single valued secondary source Boolean parameter with the given name. |
String |
getSecondarySourceStringParamValue(String source,
FilePattern fpat,
String name)
Get the value of the single valued secondary source String parameter with the given name. |
String |
getSecondarySourceStringParamValue(String source,
FilePattern fpat,
String name,
boolean allowsNull)
Get the value of the single valued secondary source String parameter with the given name. |
boolean |
getSingleBooleanParamValue(String name)
Get the value of the single valued non-null Boolean parameter with the given name. |
double |
getSingleDoubleParamValue(String name)
Get the value of the single valued non-null Double parameter with the given name. |
double |
getSingleDoubleParamValue(String name,
Range<Double> range)
Get the bounds checked value of the single valued non-null Double parameter with the given name. |
int |
getSingleEnumParamIndex(String name)
Get the selected index of the single valued Enum parameter with the given name. |
int |
getSingleIntegerParamValue(String name)
Get the value of the single valued non-null Integer parameter with the given name. |
int |
getSingleIntegerParamValue(String name,
Range<Integer> range)
Get the bounds checked value of the single valued non-null Integer parameter with the given name. |
long |
getSingleLongParamValue(String name)
Get the value of the single valued non-null Long parameter with the given name. |
long |
getSingleLongParamValue(String name,
Range<Long> range)
Get the bounds checked value of the single valued non-null Long parameter with the given name. |
boolean |
getSingleOptionalBooleanParamValue(String name)
Get the value of the single valued Boolean parameter with the given name. |
String |
getSingleStringParamValue(String name)
Get the value of the single valued String parameter with the given name. |
String |
getSingleStringParamValue(String name,
boolean allowsNull)
Get the value of the single valued String parameter with the given name. |
Tuple2d |
getSingleTuple2dParamValue(String name)
Get the value of the single valued non-null Tuple2d parameter with the given name. |
Tuple2d |
getSingleTuple2dParamValue(String name,
boolean allowsNull)
Get the value of the single valued Tuple2d parameter with the given name. |
Tuple2d |
getSingleTuple2dParamValue(String name,
Range<Tuple2d> range,
boolean allowsNull)
Get the bounds checked value of the single valued Tuple2d parameter with the given name. |
Tuple2i |
getSingleTuple2iParamValue(String name)
Get the value of the single valued non-null Tuple2i parameter with the given name. |
Tuple2i |
getSingleTuple2iParamValue(String name,
boolean allowsNull)
Get the value of the single valued Tuple2i parameter with the given name. |
Tuple2i |
getSingleTuple2iParamValue(String name,
Range<Tuple2i> range,
boolean allowsNull)
Get the bounds checked value of the single valued Tuple2i parameter with the given name. |
Tuple3d |
getSingleTuple3dParamValue(String name)
Get the value of the single valued non-null Tuple3d parameter with the given name. |
Tuple3d |
getSingleTuple3dParamValue(String name,
boolean allowsNull)
Get the value of the single valued Tuple3d parameter with the given name. |
Tuple3d |
getSingleTuple3dParamValue(String name,
Range<Tuple3d> range,
boolean allowsNull)
Get the bounds checked value of the single valued Tuple3d parameter with the given name. |
Tuple3i |
getSingleTuple3iParamValue(String name)
Get the value of the single valued non-null Tuple3i parameter with the given name. |
Tuple3i |
getSingleTuple3iParamValue(String name,
boolean allowsNull)
Get the value of the single valued Tuple3i parameter with the given name. |
Tuple3i |
getSingleTuple3iParamValue(String name,
Range<Tuple3i> range,
boolean allowsNull)
Get the bounds checked value of the single valued Tuple3i parameter with the given name. |
Tuple4d |
getSingleTuple4dParamValue(String name)
Get the value of the single valued non-null Tuple4d parameter with the given name. |
Tuple4d |
getSingleTuple4dParamValue(String name,
boolean allowsNull)
Get the value of the single valued Tuple4d parameter with the given name. |
Tuple4d |
getSingleTuple4dParamValue(String name,
Range<Tuple4d> range,
boolean allowsNull)
Get the bounds checked value of the single valued Tuple4d parameter with the given name. |
boolean |
getSourceBooleanParamValue(String source,
String name)
Get the value of the single valued non-null source Boolean parameter with the given name. |
double |
getSourceDoubleParamValue(String source,
String name)
Get the value of the single valued non-null source Double parameter with the given name. |
double |
getSourceDoubleParamValue(String source,
String name,
Range<Double> range)
Get the bounds checked value of the single valued non-null source Double parameter with the given name. |
int |
getSourceEnumParamIndex(String source,
String name)
Get the selected index of the single valued source Enum parameter with the given name. |
int |
getSourceIntegerParamValue(String source,
String name)
Get the value of the single valued non-null source Integer parameter with the given name. |
int |
getSourceIntegerParamValue(String source,
String name,
Range<Integer> range)
Get the bounds checked value of the single valued non-null source Integer parameter with the given name. |
long |
getSourceLongParamValue(String source,
String name)
Get the value of the single valued non-null source Long parameter with the given name. |
long |
getSourceLongParamValue(String source,
String name,
Range<Long> range)
Get the bounds checked value of the single valued non-null source Long parameter with the given name. |
boolean |
getSourceOptionalBooleanParamValue(String source,
String name)
Get the value of the single valued source Boolean parameter with the given name. |
String |
getSourceStringParamValue(String source,
String name)
Get the value of the single valued source String parameter with the given name. |
String |
getSourceStringParamValue(String source,
String name,
boolean allowsNull)
Get the value of the single valued source String parameter with the given name. |
static Path |
getWorkingNodeFilePath(ActionAgenda agenda,
String name,
FileSeq fseq)
Get the abstract working area file system path to the first file in the given node file sequence. |
static Path |
getWorkingNodeFilePath(ActionAgenda agenda,
String name,
Path file)
Get the abstract working area file system path to the given node file. |
static Path |
getWorkingNodeFilePath(NodeID nodeID,
Path file)
Get the abstract working area file system path to the given node file. |
static Path |
getWorkingNodeFilePath(NodeID nodeID,
String file)
Get the abstract working area file system path to the given node file. |
static ArrayList<Path> |
getWorkingNodeFilePaths(ActionAgenda agenda,
String name,
FileSeq fseq)
Get the abstract working area file system paths in the given node file sequence. |
| Methods inherited from class us.temerity.pipeline.BasePlugin |
|---|
addSupport, compareTo, getDescription, getFullMessage, getPluginID, getResource, getResources, getResourceSize, getSupports, isUnderDevelopment, removeSupport, setSupports, supports, toString, underDevelopment |
| Methods inherited from class us.temerity.pipeline.PluginID |
|---|
getVendor, getVersionID |
| Methods inherited from class us.temerity.pipeline.Named |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String aExtraOptions
| Constructor Detail |
|---|
protected CommonActionUtils(String name,
VersionID vid,
String vendor,
String desc)
name - The short name of the action.vid - The action plugin revision number.vendor - The name of the plugin vendor.desc - A short description of the action.| Method Detail |
|---|
public static final ArrayList<Path> getWorkingNodeFilePaths(ActionAgenda agenda,
String name,
FileSeq fseq)
agenda - The agenda to be accomplished by the action.name - The unique node name.fseq - The file sequence associated with the node.
public static final Path getWorkingNodeFilePath(ActionAgenda agenda,
String name,
FileSeq fseq)
agenda - The agenda to be accomplished by the action.name - The unique node name.fseq - The file sequence associated with the node.
public static final Path getWorkingNodeFilePath(ActionAgenda agenda,
String name,
Path file)
agenda - The agenda to be accomplished by the action.name - The unique node name.file - The name of the file relative to the directory containing the node.
public static final Path getWorkingNodeFilePath(NodeID nodeID,
Path file)
nodeID - The unique working version identifier.file - The name of the file relative to the directory containing the node.
public static final Path getWorkingNodeFilePath(NodeID nodeID,
String file)
nodeID - The unique working version identifier.file - The name of the file relative to the directory containing the node.
public final File createTempScript(ActionAgenda agenda)
throws PipelineException
On Unix/MacOS this will be an bash(1) script, while on Windows the script will
be a BAT file suitable for evaluation by "Cmd". The returned script file is suitable
for use as with the createScriptSubProcess method.
agenda - The agenda to be accomplished by the action.
PipelineExceptionprotected final void addExtraOptionsParam()
The following single valued parameters is added:
This method should be called in the subclass constructor before specifying parameter layouts.
protected final void addExtraOptionsParamToLayout(LayoutGroup layout)
addExtraOptionsParam
method to the given parameter layout group.
public final ArrayList<String> getExtraOptionsArgs()
throws PipelineException
addExtraOptionsParam method.
PipelineException
public final int getSingleEnumParamIndex(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists.
public final boolean getSingleBooleanParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists.
public final boolean getSingleOptionalBooleanParamValue(String name)
throws PipelineException
If null value is treated as false.
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists.
public final long getSingleLongParamValue(String name)
throws PipelineException
This method can be used to retrieve ByteSizeActionParam values.
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final long getSingleLongParamValue(String name,
Range<Long> range)
throws PipelineException
This method can also be used to retrieve ByteSizeActionParam values.
name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final int getSingleIntegerParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final int getSingleIntegerParamValue(String name,
Range<Integer> range)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final Tuple2i getSingleTuple2iParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final Tuple2i getSingleTuple2iParamValue(String name,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists or
the value is null and allowsNull is false.
public final Tuple2i getSingleTuple2iParamValue(String name,
Range<Tuple2i> range,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final Tuple3i getSingleTuple3iParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final Tuple3i getSingleTuple3iParamValue(String name,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists or
the value is null and allowsNull is false.
public final Tuple3i getSingleTuple3iParamValue(String name,
Range<Tuple3i> range,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final double getSingleDoubleParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final double getSingleDoubleParamValue(String name,
Range<Double> range)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final Tuple2d getSingleTuple2dParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final Tuple2d getSingleTuple2dParamValue(String name,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists or
the value is null and allowsNull is false.
public final Tuple2d getSingleTuple2dParamValue(String name,
Range<Tuple2d> range,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final Tuple3d getSingleTuple3dParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final Tuple3d getSingleTuple3dParamValue(String name,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists or
the value is null and allowsNull is false.
public final Tuple3d getSingleTuple3dParamValue(String name,
Range<Tuple3d> range,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final Tuple4d getSingleTuple4dParamValue(String name)
throws PipelineException
name - The name of the parameter.
PipelineException - If no single valued parameter with the given name exists or
the value is null.
public final Tuple4d getSingleTuple4dParamValue(String name,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists or
the value is null and allowsNull is false.
public final Tuple4d getSingleTuple4dParamValue(String name,
Range<Tuple4d> range,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.range - The valid range values for the parameter.allowsNull - Whether this parameter can have a null value.
PipelineException - If no single valued parameter with the given name exists,
the value is null or is out-of-bounds.
public final String getSingleStringParamValue(String name,
boolean allowsNull)
throws PipelineException
name - The name of the parameter.allowsNull - Whether this parameter can have a null or empty value.
null if the value is null or the empty string.
PipelineException - If no single valued parameter with the given name exists or (optionally)
if the value is null or empty.
public final String getSingleStringParamValue(String name)
throws PipelineException
name - The name of the parameter.
null if the value is null or the empty string.
PipelineException - If no single valued parameter with the given name exists
public final int getSourceEnumParamIndex(String source,
String name)
throws PipelineException
source - The name of the source.name - The name of the parameter.
PipelineException - If no single valued source parameter with the given name exists.
public final boolean getSourceBooleanParamValue(String source,
String name)
throws PipelineException
source - The name of the source.name - The name of the parameter.
PipelineException - If no single valued source parameter with the given name exists.
public final boolean getSourceOptionalBooleanParamValue(String source,
String name)
throws PipelineException
If null value is treated as false.
source - The name of the source.name - The name of the parameter.
PipelineException - If no single valued source parameter with the given name exists.
public final long getSourceLongParamValue(String source,
String name)
throws PipelineException
This method can be used to retrieve ByteSizeActionParam values.
source - The name of the source.name - The name of the parameter.
PipelineException - If no single valued source parameter with the given name exists or
the value is null.
public final long getSourceLongParamValue(String source,
String name,
Range<Long> range)
throws PipelineException
This method can also be used to retrieve ByteSizeActionParam values.
source - The name of the source.name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued source parameter with the given name exists,
the value is null or is out-of-bounds.
public final int getSourceIntegerParamValue(String source,
String name)
throws PipelineException
source - The name of the source.name - The name of the parameter.
PipelineException - If no single valued source parameter with the given name exists or
the value is null.
public final int getSourceIntegerParamValue(String source,
String name,
Range<Integer> range)
throws PipelineException
source - The name of the source.name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued source parameter with the given name exists,
the value is null or is out-of-bounds.
public final double getSourceDoubleParamValue(String source,
String name)
throws PipelineException
source - The name of the source.name - The name of the parameter.
PipelineException - If no single valued source parameter with the given name exists or
the value is null.
public final double getSourceDoubleParamValue(String source,
String name,
Range<Double> range)
throws PipelineException
source - The name of the source.name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued source parameter with the given name exists,
the value is null or is out-of-bounds.
public final String getSourceStringParamValue(String source,
String name,
boolean allowsNull)
throws PipelineException
source - The name of the source.name - The name of the parameter.allowsNull - Whether this parameter can have a null or empty value.
null if the value is null or the empty string.
PipelineException - If no single valued source parameter with the given name exists or (optionally)
if the value is null or empty.
public final String getSourceStringParamValue(String source,
String name)
throws PipelineException
source - The name of the source.name - The name of the parameter.
null if the value is null or the empty string.
PipelineException - If no single valued source parameter with the given name exists
public final int getSecondarySourceEnumParamIndex(String source,
FilePattern fpat,
String name)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists.
public final boolean getSecondarySourceBooleanParamValue(String source,
FilePattern fpat,
String name)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists.
public final boolean getSecondarySourceOptionalBooleanParamValue(String source,
FilePattern fpat,
String name)
throws PipelineException
If null value is treated as false.
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists.
public final long getSecondarySourceLongParamValue(String source,
FilePattern fpat,
String name)
throws PipelineException
This method can be used to retrieve ByteSizeActionParam values.
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists or
the value is null.
public final long getSecondarySourceLongParamValue(String source,
FilePattern fpat,
String name,
Range<Long> range)
throws PipelineException
This method can also be used to retrieve ByteSizeActionParam values.
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists,
the value is null or is out-of-bounds.
public final int getSecondarySourceIntegerParamValue(String source,
FilePattern fpat,
String name)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists or
the value is null.
public final int getSecondarySourceIntegerParamValue(String source,
FilePattern fpat,
String name,
Range<Integer> range)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists,
the value is null or is out-of-bounds.
public final double getSecondarySourceDoubleParamValue(String source,
FilePattern fpat,
String name)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists or
the value is null.
public final double getSecondarySourceDoubleParamValue(String source,
FilePattern fpat,
String name,
Range<Double> range)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.range - The valid range values for the parameter.
PipelineException - If no single valued secondary source parameter with the given name exists,
the value is null or is out-of-bounds.
public final String getSecondarySourceStringParamValue(String source,
FilePattern fpat,
String name,
boolean allowsNull)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.allowsNull - Whether this parameter can have a null or empty value.
null if the value is null or the empty string.
PipelineException - If no single valued secondary source parameter with the given name exists or
(optionally) if the value is null or empty.
public final String getSecondarySourceStringParamValue(String source,
FilePattern fpat,
String name)
throws PipelineException
source - The name of the source.fpat - The FilePattern of the Secondary Sequence.name - The name of the parameter.
null if the value is null or the empty string.
PipelineException - If no single valued secondary source parameter with the given name exists.public static final String escPath(String str)
public static final String escPath(Path path)
public final ArrayList<Path> getPrimaryTargetPaths(ActionAgenda agenda,
String desc)
throws PipelineException
agenda - The agenda to be accomplished by the action.desc - A brief description of the type of files expected (used to generate error messages).
PipelineException
public final ArrayList<Path> getPrimaryTargetPaths(ActionAgenda agenda,
String suffix,
String desc)
throws PipelineException
agenda - The agenda to be accomplished by the action.suffix - The allowable filename suffix.desc - A brief description of the type of files expected (used to generate error messages).
PipelineException
public final ArrayList<Path> getPrimaryTargetPaths(ActionAgenda agenda,
Collection<String> suffixes,
String desc)
throws PipelineException
agenda - The agenda to be accomplished by the action.suffixes - The allowable filename suffixes.desc - A brief description of the type of files expected (used to generate error messages).
PipelineException
public final Path getPrimaryTargetPath(ActionAgenda agenda,
String desc)
throws PipelineException
agenda - The agenda to be accomplished by the action.desc - A brief description of the type of file expected (used to generate error messages).
PipelineException
public final Path getPrimaryTargetPath(ActionAgenda agenda,
String suffix,
String desc)
throws PipelineException
agenda - The agenda to be accomplished by the action.suffix - The allowable filename suffix.desc - A brief description of the type of file expected (used to generate error messages).
PipelineException
public final Path getPrimaryTargetPath(ActionAgenda agenda,
Collection<String> suffixes,
String desc)
throws PipelineException
agenda - The agenda to be accomplished by the action.suffixes - The allowable filename suffixes.desc - A brief description of the type of file expected (used to generate error messages).
PipelineException
public final ArrayList<Path> getPrimarySourcePaths(String pname,
ActionAgenda agenda,
String desc)
throws PipelineException
pname - The name of the single valued parameter which names the source node.agenda - The agenda to be accomplished by the action.desc - A brief description of the type of files expected (used to generate error messages).
null if none was specified.
PipelineException
public final ArrayList<Path> getPrimarySourcePaths(String pname,
ActionAgenda agenda,
String suffix,
String desc)
throws PipelineException
pname - The name of the single valued parameter which names the source node.agenda - The agenda to be accomplished by the action.suffix - The allowable filename suffix.desc - A brief description of the type of files expected (used to generate error messages).
null if none was specified.
PipelineException
public final ArrayList<Path> getPrimarySourcePaths(String pname,
ActionAgenda agenda,
Collection<String> suffixes,
String desc)
throws PipelineException
pname - The name of the single valued parameter which names the source node.agenda - The agenda to be accomplished by the action.suffixes - The allowable filename suffixes.desc - A brief description of the type of files expected (used to generate error messages).
null if none was specified.
PipelineException
public final Path getPrimarySourcePath(String pname,
ActionAgenda agenda,
String desc)
throws PipelineException
pname - The name of the single valued parameter which names the source node.agenda - The agenda to be accomplished by the action.desc - A brief description of the type of file expected (used to generate error messages).
null if none was specified.
PipelineException
public final Path getPrimarySourcePath(String pname,
ActionAgenda agenda,
String suffix,
String desc)
throws PipelineException
pname - The name of the single valued parameter which names the source node.agenda - The agenda to be accomplished by the action.suffix - The allowable filename suffix.desc - A brief description of the type of file expected (used to generate error messages).
null if none was specified.
PipelineException
public final Path getPrimarySourcePath(String pname,
ActionAgenda agenda,
Collection<String> suffixes,
String desc)
throws PipelineException
pname - The name of the single valued parameter which names the source node.agenda - The agenda to be accomplished by the action.suffixes - The allowable filename suffixes.desc - A brief description of the type of file expected (used to generate error messages).
null if none was specified.
PipelineException
public final SubProcessHeavy createSubProcess(ActionAgenda agenda,
String program,
File outFile,
File errFile)
throws PipelineException
SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner.The caller is reponsible for handling any differences in program name and arguments between the different operating system types, but this method will handle specifying the process owner, title, environment and working directory.
When run on a Unix or MacOS system, the working directory is the working area directory
containing the target node. On Windows, the working directory is always the local
temporary directory since many Windows programs fail if the working directory in on a
network share. The caller is responsible for making any target file paths relative
to the working directory on Unix/MacOS and absolute on Windows. The correct path for
target files can be obtained using the ActionAgenda.getTargetPath method.
agenda - The agenda to be accomplished by the Action.program - The name of program to execute as an OS level subprocess.outFile - The file to which all STDOUT output is redirected.errFile - The file to which all STDERR output is redirected.
PipelineException
public final SubProcessHeavy createSubProcess(ActionAgenda agenda,
String program,
ArrayList<String> args,
File outFile,
File errFile)
throws PipelineException
SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner.The caller is reponsible for handling any differences in program name and arguments between the different operating system types, but this method will handle specifying the process owner, title, environment and working directory.
When run on a Unix or MacOS system, the working directory is the working area directory
containing the target node. On Windows, the working directory is always the local
temporary directory since many Windows programs fail if the working directory in on a
network share. The caller is responsible for making any target file paths relative
to the working directory on Unix/MacOS and absolute on Windows. The correct path for
target files can be obtained using the ActionAgenda.getTargetPath method.
agenda - The agenda to be accomplished by the Action.program - The name of program to execute as an OS level subprocess.args - The command line arguments of the program to execute or
null for an empty argument list.outFile - The file to which all STDOUT output is redirected.errFile - The file to which all STDERR output is redirected.
PipelineException
public final SubProcessHeavy createSubProcess(ActionAgenda agenda,
String program,
ArrayList<String> args,
Map<String,String> env,
File outFile,
File errFile)
throws PipelineException
SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner.
The caller is reponsible for handling any differences in program name and arguments
between the different operating system types, but this method will handle specifying
the process owner, title, environment and working directory. The default Toolset
generated environment can be overridden if specified using a non-null env
parameter.
When run on a Unix or MacOS system, the working directory is the working area directory
containing the target node. On Windows, the working directory is always the local
temporary directory since many Windows programs fail if the working directory in on a
network share. The caller is responsible for making any target file paths relative
to the working directory on Unix/MacOS and absolute on Windows. The correct path for
target files can be obtained using the ActionAgenda.getTargetPath method.
agenda - The agenda to be accomplished by the Action.program - The name of program to execute as an OS level subprocess.args - The command line arguments of the program to execute or
null for an empty argument list.env - The environment under which the OS level process is run or
null to use the environment defined by the ActionAgenda.outFile - The file to which all STDOUT output is redirected.errFile - The file to which all STDERR output is redirected.
PipelineException
public final SubProcessHeavy createSubProcess(ActionAgenda agenda,
String program,
ArrayList<String> args,
Map<String,String> env,
File dir,
File outFile,
File errFile)
throws PipelineException
SubProcessHeavy instance to be returned
by the prep method in a mostly OS-independent manner.
The caller is reponsible for handling any differences in program name and arguments
between the different operating system types, but this method will handle specifying
the process owner, title, environment. The default Toolset generated environment can
be overridden if specified using a non-null env parameter.
agenda - The agenda to be accomplished by the Action.program - The name of program to execute as an OS level subprocess.args - The command line arguments of the program to execute or
null for an empty argument list.env - The environment under which the OS level process is run or
null to use the environment defined by the ActionAgenda.dir - The working directory where the subprocess is run.outFile - The file to which all STDOUT output is redirected.errFile - The file to which all STDERR output is redirected.
PipelineException
public final SubProcessHeavy createScriptSubProcess(ActionAgenda agenda,
File script,
File outFile,
File errFile)
throws PipelineException
SubProcessHeavy instance to be returned
by the prep method when generating a temporary script to execute some
OS-specific commands.
If running on Unix or MacOS, the supplied script must be a bash(1) shell script while on
Windows the script must be an executable BAT/CMD file. The Action is reposible for
making sure that the contents of these scripts are portable. This method simply takes
care of the common wrapper code needed to instantiate a SubProcessHeavy to run
the script.
agenda - The agenda to be accomplished by the Action.script - The temporary script file to execute.outFile - The file to which all STDOUT output is redirected.errFile - The file to which all STDERR output is redirected.
PipelineException
public final SubProcessHeavy createTempCopySubProcess(ActionAgenda agenda,
File temp,
Path target,
File outFile,
File errFile)
throws PipelineException
SubProcessHeavy instance to be returned
by the prep method when simply copying a single temporary file created in
the prep method to the target location.
agenda - The agenda to be accomplished by the Action.temp - The temporary file to copy.target - The abtract path to the location of the target file.outFile - The file to which all STDOUT output is redirected.errFile - The file to which all STDERR output is redirected.
PipelineException
|
TEMERITY | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||