|
TEMERITY | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectus.temerity.pipeline.ActionAgenda
public class ActionAgenda
The complete description of the information needed to execute a node action.
| Constructor Summary | |
|---|---|
ActionAgenda()
This constructor is required by the GlueDecoder to instantiate the class
when encountered during the reading of GLUE format files and should not be called
from user code. |
|
ActionAgenda(ActionAgenda agenda,
DoubleMap<OsType,String,String> envs)
Construct an action agenda which includes a cooked toolset environment. |
|
ActionAgenda(long jobID,
NodeID nodeID,
FileSeq primaryTarget,
Set<FileSeq> secondaryTargets,
Map<String,FileSeq> primarySources,
Map<String,Set<FileSeq>> secondarySources,
Map<String,ActionInfo> actionInfo,
String toolset)
Construct a new action agenda. |
|
| Method Summary | |
|---|---|
String |
evaluate(String source)
Replaces all references to environmental variables in the given source string with their values from agenda's Toolset environment. |
String |
evaluate(String source,
OsType os)
Replaces all references to environmental variables in the given source string with their values from agenda's Toolset environment. |
static String |
evaluateInEnvironment(String source,
Map<String,String> env)
Replaces all references to environmental variables in the given source string with their values from the given Toolset environment. |
void |
fromGlue(GlueDecoder decoder)
Restores the non-transient fields of the class from Glue. |
SortedMap<String,String> |
getEnvironment()
Get the environment for the current operating system under which the action is executed. |
SortedMap<String,String> |
getEnvironment(OsType os)
Get the environment for a specific operating system under which the action is executed. |
long |
getJobID()
Get the unique job identifier. |
NodeID |
getNodeID()
Gets the unique working version identifier of the target node. |
FileSeq |
getPrimarySource(String name)
Get the primary file sequence of the given source node. |
FileSeq |
getPrimaryTarget()
Get the primary file sequence to generate. |
SortedSet<FileSeq> |
getSecondarySources(String name)
Get the secondary file sequences of the given source node. |
SortedSet<FileSeq> |
getSecondaryTargets()
Get the secondary file sequences to generate. |
ActionInfo |
getSourceActionInfo(String name)
The action parameter information for a given source node. |
String |
getSourceName()
Get the fully resolved names of the first source node. |
Set<String> |
getSourceNames()
Get the fully resolved names of the source nodes. |
String |
getSubProcessOwner()
Get the name of the user which should own the process executing OS level process generated by the BaseAction.prep method. |
Path |
getTargetPath()
Get the abstract pathname of the directory where the target file generated by the Action should be written as accessed by the current operating system. |
Path |
getTargetPath(OsType os)
Get the abstract pathname of the directory where the target file generated by the Action should be written as accessed by the given operating system. |
TreeSet<FileSeq> |
getTargetSequences()
Get the primary and secondary file sequences to generate. |
String |
getToolset()
Get the name of the toolset environment. |
File |
getWorkingDir()
Deprecated. The working directory returned by this method is always the working area directory which will ultimately contain the target files generated by the Action. However, it is more useful to know the directory where target files should be written by the Action using getTargetPath which varies according to the
operating system used to execute the Action. |
File |
getWorkingDir(OsType os)
Deprecated. The working directory returned by this method is always the working area directory which will ultimately contain the target files generated by the Action. However, it is more useful to know the directory where target files should be written by the Action using getTargetPath which varies according to the
operating system used to execute the Action. |
Path |
getWorkingPath()
Deprecated. The working directory returned by this method is always the working area directory which will ultimately contain the target files generated by the Action. However, it is more useful to know the directory where target files should be written by the Action using getTargetPath which varies according to the
operating system used to execute the Action. |
Path |
getWorkingPath(OsType os)
Deprecated. The working directory returned by this method is always the working area directory which will ultimately contain the target files generated by the Action. However, it is more useful to know the directory where target files should be written by the Action using getTargetPath which varies according to the
operating system used to execute the Action. |
boolean |
hasSources()
Whether there are any source nodes. |
void |
toGlue(GlueEncoder encoder)
Saves the non-transient fields of this object as Glue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActionAgenda()
GlueDecoder to instantiate the class
when encountered during the reading of GLUE format files and should not be called
from user code.
public ActionAgenda(long jobID,
NodeID nodeID,
FileSeq primaryTarget,
Set<FileSeq> secondaryTargets,
Map<String,FileSeq> primarySources,
Map<String,Set<FileSeq>> secondarySources,
Map<String,ActionInfo> actionInfo,
String toolset)
jobID - The unique job identifier.nodeID - The unique working version identifier of the target node.primaryTarget - The primary file sequence to generate.secondaryTargets - The secondary file sequences to generate.primarySources - The primary file sequences indexed by fully resolved source node name.secondarySources - The secondary file sequences indexed by fully resolved source node name.actionInfo - The action parameter information for each source node linked to the target node
by a Dependency link and which has an action.toolset - The name of the toolset environment under which the action is executed.
public ActionAgenda(ActionAgenda agenda,
DoubleMap<OsType,String,String> envs)
agenda - The agenda to copy.envs - The cooked toolset environments indexed by operating system type.| Method Detail |
|---|
public long getJobID()
public NodeID getNodeID()
public TreeSet<FileSeq> getTargetSequences()
public FileSeq getPrimaryTarget()
public SortedSet<FileSeq> getSecondaryTargets()
public boolean hasSources()
public String getSourceName()
null if there are no sources.public Set<String> getSourceNames()
public FileSeq getPrimarySource(String name)
name - The fully resolved node name.public SortedSet<FileSeq> getSecondarySources(String name)
name - The fully resolved node name.public ActionInfo getSourceActionInfo(String name)
name - The fully resolved node name.
null if the given source does not have an action
or is linked to the target node by a Association/Reference link.public String getSubProcessOwner()
BaseAction.prep method.
On Unix and MacOS systems, this will be the same as the owner of the node. On Windows
systems, all Actions are run as the "pipeline" user. This method is provided as a
convenience to plugin developers for use in supplying the first argument to the
SubProcessHeavy constructor returned the prep method.
public String getToolset()
public SortedMap<String,String> getEnvironment()
throws PipelineException
PipelineException - If the current operating system is not supported by the toolset.public SortedMap<String,String> getEnvironment(OsType os)
null if not supported by the toolset.
public String evaluate(String source)
throws PipelineException
For each environmental variable, any references to that variable in the source will
be replaced with the value of the variable. There are two forms of reference to a
variable:
${VARIABLE_NAME}${VARIABLE_NAME+}Path class. This has the effect of converting all back slashes
"\" with forward slashes "/" in the environmental variable value.
Since Toolsets variable values should not contain references to other variables, the order in which the substitutions can be performed is arbitrary.
source - The string to evaluate.
PipelineException
public String evaluate(String source,
OsType os)
throws PipelineException
For each environmental variable, any references to that variable in the source will
be replaced with the value of the variable. There are two forms of reference to a
variable:
${VARIABLE_NAME}${VARIABLE_NAME+}Path class. This has the effect of converting all back slashes
"\" with forward slashes "/" in the environmental variable value.
Since Toolsets variable values should not contain references to other variables, the order in which the substitutions can be performed is arbitrary.
source - The string to evaluate.
PipelineException
public static String evaluateInEnvironment(String source,
Map<String,String> env)
For each environmental variable, any references to that variable in the source will
be replaced with the value of the variable. There are two forms of reference to a
variable:
${VARIABLE_NAME}${VARIABLE_NAME+}Path class. This has the effect of converting all back slashes
"\" with forward slashes "/" in the environmental variable value.
Since Toolsets variable values should not contain references to other variables, the order in which the substitutions can be performed is arbitrary.
source - The string to evaluate.env - The environment.
@Deprecated public Path getWorkingPath()
getTargetPath which varies according to the
operating system used to execute the Action.
@Deprecated public File getWorkingDir()
getTargetPath which varies according to the
operating system used to execute the Action.
@Deprecated public Path getWorkingPath(OsType os)
getTargetPath which varies according to the
operating system used to execute the Action.
@Deprecated public File getWorkingDir(OsType os)
getTargetPath which varies according to the
operating system used to execute the Action.
public Path getTargetPath()
When a Action is executed on a Unix or MacOS system, this target directory is the same as the working area directory which contains the target node of the Action. However, when the Action run on a Windows system, the target directory returned by this method is a temporary location writable by the "pipeline" user. After the Action is run, Pipeline will move the files in this temporary target directory to the working area directory containing the node and change their ownership to that of the owner of the node.
public Path getTargetPath(OsType os)
When a Action is executed on a Unix or MacOS system, this target directory is the same as the working area directory which contains the target node of the Action. However, when the Action run on a Windows system, the target directory returned by this method is a temporary location writable by the "pipeline" user. After the Action is run, Pipeline will move the files in this temporary target directory to the working area directory containing the node and change their ownership to that of the owner of the node.
public void toGlue(GlueEncoder encoder)
throws GlueException
GlueableGlueEncoder.encode for each
non-transient field of the parent object.
toGlue in interface Glueableencoder - [modified]
The object used to encode this object's fields into Glue format.
GlueException
public void fromGlue(GlueDecoder decoder)
throws GlueException
GlueableGlueDecoder.decode for each non-transient
field of the parent object.
fromGlue in interface Glueabledecoder - The object used to decode this object's fields from Glue format.
GlueException
|
TEMERITY | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||