TEMERITY

us.temerity.pipeline
Class BaseAction

java.lang.Object
  extended by us.temerity.pipeline.Named
      extended by us.temerity.pipeline.PluginID
          extended by us.temerity.pipeline.BasePlugin
              extended by us.temerity.pipeline.BaseAction
All Implemented Interfaces:
Serializable, Cloneable, Comparable<PluginID>, Glueable
Direct Known Subclasses:
AirBakeAction, AirEnvCubeAction, AirEnvCubeAction, AirEnvMapAction, AirEnvMapAction, AirLightdomeAction, AirRenderAction, AirRenderAction, AirRenderAction, AirShaderAction, AirShaderAction, AirShaderDSAction, AirShaderDSAction, AirShaderLIFAction, AirShaderLIFAction, AirShaderRIBAction, AirShaderRIBAction, AirShadowAction, AirShadowAction, AirTextureAction, AirTextureAction, CatFilesAction, CatSequenceAction, CatSequenceAction, CatSequenceAction, CommonActionUtils, CompositeAction, CompositeAction, DLCatRIBAction, DLCatRIBAction, DLEnvCubeAction, DLEnvCubeAction, DLEnvMapAction, DLEnvMapAction, DLRenderAction, DLRenderAction, DLRenderAction, DLRenderAction, DLShaderAction, DLShaderAction, DLShadowAction, DLShadowAction, DLTextureAction, DLTextureAction, DsmToTifAction, DsmToTifAction, EnvCrossToSeqAction, ExtractSeqAction, GelEnvCubeAction, GelEnvMapAction, GelEnvProbeAction, GelRenderAction, GelShaderAction, GelShadowAction, GelShadowCubeAction, GelTextureAction, GelVolShadowAction, HdrToTifAction, HdrToTifAction, HfsBuildAction, HfsBuildAction, HfsBuildAction, HfsClipAction, HfsClipAction, HfsCompositeAction, HfsCompositeAction, HfsCompositeAction, HfsEnvCubeAction, HfsEnvCubeAction, HfsEnvMapAction, HfsEnvMapAction, HfsGConvertAction, HfsGConvertAction, HfsGenerateAction, HfsGenerateAction, HfsGenerateAction, HfsGEOAction, HfsGEOAction, HfsGEOAction, HfsGEOAction, HfsIConvertAction, HfsIConvertAction, HfsMantraAction, HfsMantraAction, HfsMantraAction, HfsMRayDSAction, HfsMRayDSAction, HfsOPLibsAction, HfsOPLibsAction, HfsOTLMergeAction, HfsOTLMergeAction, HfsRenderAction, HfsRenderAction, HfsRenderAction, HfsRManDSAction, HfsRManDSAction, HfsScriptAction, HfsScriptAction, HfsScriptAction, HfsSdExportAction, HfsVEXAction, HfsVEXAction, ImgCvtAction, ImgCvtAction, ImgCvtAction, JavaBuildAction, JavaUtilityAction, ListSourcesAction, LyxExportAction, MaxwellGlobalsAction, MaxwellRenderAction, MayaAnimExportAction, MayaAnimExportAction, MayaAnimExportAction, MayaAnimExportAction, MayaBuildAction, MayaBuildAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaCollateAction, MayaImportAction, MayaImportAction, MayaImportAction, MayaLqExportAction, MayaMelAction, MayaMelAction, MayaMelAction, MayaMelAction, MayaMiExportAction, MayaMiExportAction, MayaMiExportAction, MayaMiExportAction, MayaMiShaderAction, MayaMiShaderAction, MayaMiShaderAction, MayaMiShaderAction, MayaMiShaderAction, MayaMiShaderAction, MayaMRayRenderAction, MayaMRayRenderAction, MayaMRayRenderAction, MayaMxsExportAction, MayaPygExportAction, MayaReferenceAction, MayaReferenceAction, MayaReferenceAction, MayaReferenceAction, MayaReferenceAction, MayaReferenceAction, MayaRenderAction, MayaRenderAction, MayaRenderAction, MayaRenderAction, MayaRenderAction, MayaRenderAction, MayaRenderAction, MayaRenderAction, MayaRenderGlobalsAction, MayaRenderGlobalsAction, MayaRenderGlobalsAction, MayaSdExportAction, MayaShaderExportAction, MayaShaderExportAction, MayaShaderExportAction, MayaShaderExportAction, MRayCamOverrideAction, MRayInstGroupAction, MRayInstGroupAction, MRayMakeShaderAction, MRayRenderAction, MRayRenderAction, MRayRenderAction, MRayRenderAction, MRayRenderGlobalsAction, MRayRenderGlobalsAction, MRayRenderGlobalsAction, MRayRenderGlobalsAction, MRayRenderGlobalsAction, MRayRenderGlobalsAction, MRayShaderAction, MRayShaderIncludeAction, MRayTextureAction, PatchAction, PatchAction, PRBrickMakeAction, PRCatRIBAction, PREnvCubeAction, PREnvMapAction, PRPhotonMapAction, PRRenderAction, PRShaderAction, PRShadowAction, PRSubSurfDiffAAction, PRSubSurfDiffBAction, PRSubSurfDiffCAction, PRTextureAction, PxEnvCubeAction, PxEnvMapAction, PxRenderAction, PxShaderAction, PxShadowAction, PxTextureAction, RealFlowSimAction, ScriptAction, ScriptAction, ScriptAction, ShakeCompAction, ShakeCompAction, ShakeCompAction, ShakeQtAction, ShaveApplyCacheAction, ShaveCacheAction, ShaveCacheCopyAction, SwitchAction, SwitchAction, SwitchAction, SyflexApplyCacheAction, SyflexCacheAction, SyflexCacheAction, SyflexCacheCopyAction, TestAction, TestAction, TouchAction, TouchAction, TouchAction

public class BaseAction
extends BasePlugin

The superclass of all Pipeline node action plugins.

Actions are used by Pipeline to regenerate the files associated with non-leaf nodes in a consistent and reliable manner.

New kinds of actions can be written by subclassing this class. Due to the way plugins are loaded and communicated between applications, any fields added to a subclass will be reinitialized when the action is stored to disk or when it is sent over the network. Any data which must be retained by the action should be stored in an action parameter instead.

While new plugin subclass versions are being modified and tested the underDevelopment method should be called in the subclasses constructor to enable the plugin to be dynamically reloaded. Nodes which use one of these dynamically reloadable Action plugins cannot be Checked-In until the plugin is no longer under development.

Most Action plugins should be subclassed from CommonActionUtils instead of this class in order to get the benefit of the many helper methods useful for writing the new Action plugin class. This class is more bare bones and includes only the essentials required by all Action plugins.

See Also:
Serialized Form

Field Summary
 
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
  BaseAction()
          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.
  BaseAction(BaseAction action)
          Copy constructor.
protected BaseAction(String name, VersionID vid, String vendor, String desc)
          Construct with the given name, version, vendor and description.
 
Method Summary
protected  void addPreset(String name, ArrayList<String> choices)
          Add a named set of parameter preset choices to the action.
protected  void addPresetValues(String name, String choice, TreeMap<String,Comparable> values)
          Add the values of single valued parameters which should be set when a given preset choice is selected.
protected  void addSingleParam(ActionParam param)
          Add a single valued parameter to this Action.
static void chmod(int mode, File file)
          Deprecated. Since this method is not portable to all operation systems, it should be avoided in the prep method of portable Action plugins. The principle use of this method was in creating execuable bash(1) scripts. However, this really isn't needed even for bash(1) scripts since its just as easy to create a non-execuable script and pass it as the argument to the bash(1) executable instead.
protected  void cleanupLater(File file)
          Add the given file to the set of files which will be removed upon termination of the Java runtime.
 void clearAllLinkParams()
          Unset all single valued LinkActionParam parameters.
 void clearLinkParams(String source)
          Unset any single valued LinkActionParam parameters which are currently set to the given source node.
 Object clone()
          Return a deep copy of this object.
 File createTemp(ActionAgenda agenda, int mode, String suffix)
          Create a unique temporary file for the job with the given suffix and access permissions.
 File createTemp(ActionAgenda agenda, String suffix)
          Create a unique temporary file for the job with the given suffix.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 boolean equalSingleParams(BaseAction action)
          Indicates whether the single valued parameters of the given action equal to this actions single valued parameters.
 boolean equalSourceParams(BaseAction action)
          Indicates whether the per-source parameters of the given action equal to this actions per-source parameters for primary and secondary file sequences.
 void fromGlue(GlueDecoder decoder)
          Restores the non-transient fields of the class from Glue.
 TreeMap<String,ActionParam> getInitialSourceParams()
          Get an initial set of action parameters associated with an upstream node.
 PluginType getPluginType()
          Get which general type of plugin this is.
 List<String> getPresetChoices(String name)
          Get the choices for the given preset.
 SortedMap<String,Comparable> getPresetValues(String name, String choice)
          Get the preset values of single valued parameters set by a given preset choice.
 Set<FilePattern> getSecondarySequences(String source)
          Get the file patterns of all secondary sequences with per-source parameters for the given node.
 Set<String> getSecondarySourceNames()
          Get node names of the upstream nodes with secondary file sequence per-source parameters.
 ActionParam getSecondarySourceParam(String source, FilePattern fpat, String name)
          Get the named parameter for a secondary file sequence of an upstream node.
 Collection<ActionParam> getSecondarySourceParams(String source, FilePattern fpat)
          Get all of the per-source parameters associated with the given secondary file sequence of an upstream node.
 Comparable getSecondarySourceParamValue(String source, FilePattern fpat, String name)
          Get the value of the named parameter for a secondary file sequence of an upstream node.
 LayoutGroup getSingleLayout()
          Get the grouping of single valued parameters used to layout components which represent the parameters in the user interface.
 ActionParam getSingleParam(String name)
          Get the single valued parameter with the given name.
 Collection<ActionParam> getSingleParams()
          Get all of the single valued parameters.
 Comparable getSingleParamValue(String name)
          Get the value of the single valued parameter with the given name.
 List<String> getSourceLayout()
          Get the grouping of per-source parameters used to layout components which represent the parameters in the user interface.
 Set<String> getSourceNames()
          Get node names of the upstream nodes with primary file sequence per-source parameters.
 ActionParam getSourceParam(String source, String name)
          Get the named parameter for the primary file sequence of an upstream node.
 Collection<ActionParam> getSourceParams(String source)
          Get all of the per-source parameters associated with the primary file sequence of an upstream node.
 Comparable getSourceParamValue(String source, String name)
          Get the value of the named parameter for the primary file sequence of an upstream node.
static File getTempDir(ActionAgenda agenda)
          Get the root directory used to store temporary files created by the job.
static Path getTempPath(ActionAgenda agenda)
          Get the abstract pathname of the root directory used to store temporary files created by the job.
 boolean hasSecondarySourceParams(String source, FilePattern fpat)
          Whether this action has per-source parameters for a secondary sequence of the given node.
 boolean hasSingleParams()
          Does the action have any single valued parameters?
 boolean hasSourceParams(String source)
          Whether this action has per-source parameters for the primary sequence of the given node.
 void initSecondarySourceParams(String source, FilePattern fpat)
          Initialize a new set of parameters for a secondary file sequence of an upstream node.
 void initSourceParams(String source)
          Initialize a new set of parameters for the primary sequence of an upstream node.
 SubProcessHeavy prep(ActionAgenda agenda, File outFile, File errFile)
          Construct a SubProcessHeavy instance which when executed will fulfill the given action agenda.
 void removeAllSourceParams()
          Remove all per-source parameters from this action.
 void removeSecondarySourceParams(String source)
          Remove all of the per-source parameters associated with all secondary file sequence of the given upstream node.
 void removeSecondarySourceParams(String source, FilePattern fpat)
          Remove all of the per-source parameters associated with a secondary file sequence of the given upstream node.
 void removeSourceParams(String source)
          Remove all of the per-source parameters associated with the primary file sequence of the given upstream node.
 void setSecondarySourceParamValue(String source, FilePattern fpat, String name, Comparable value)
          Set the value of a per-source parameter for secondary file sequence of an upstream node.
protected  void setSingleLayout(LayoutGroup group)
          Sets the hierarchical grouping of parameters and presets which determine the layout of UI components.
 void setSingleParamValue(String name, Comparable value)
          Set the value of a single valued parameter.
 void setSingleParamValues(BaseAction action)
          Copy the values of all of the single valued parameters from the given action.
protected  void setSourceLayout(List<String> pnames)
          Specifies the ordering of per-source parameters in the user interface.
 void setSourceParamValue(String source, String name, Comparable value)
          Set the value of a per-source parameter for primary file sequence of an upstream node.
 void setSourceParamValues(BaseAction action)
          Copy the values of all of the per-source parameters from the given action.
 boolean supportsSourceParams()
          Whether this action supports per-source parameters.
 void toGlue(GlueEncoder encoder)
          Saves the non-transient fields of this object as Glue.
 
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
 

Constructor Detail

BaseAction

public BaseAction()
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.


BaseAction

protected BaseAction(String name,
                     VersionID vid,
                     String vendor,
                     String desc)
Construct with the given name, version, vendor and description.

Parameters:
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.

BaseAction

public BaseAction(BaseAction action)
Copy constructor.

Used internally to create a generic instances of plugin subclasses. This constructor should not be used in end user code!

Method Detail

getPluginType

public final PluginType getPluginType()
Get which general type of plugin this is.

Overrides:
getPluginType in class BasePlugin

hasSingleParams

public final boolean hasSingleParams()
Does the action have any single valued parameters?


addSingleParam

protected final void addSingleParam(ActionParam param)
Add a single valued parameter to this Action.

This method is used by subclasses in their constructors initialize the set of single valued parameters that they support.

Parameters:
param - The parameter to add.

getSingleParams

public final Collection<ActionParam> getSingleParams()
Get all of the single valued parameters.

The returned ArrayList may be empty if the action does not have any single valued parameters.

Returns:
The set of single valued parameters for this action.

getSingleParam

public final ActionParam getSingleParam(String name)
Get the single valued parameter with the given name.

Parameters:
name - The name of the parameter.
Returns:
The action parameter or null if no parameter with the given name exists.

getSingleParamValue

public final Comparable getSingleParamValue(String name)
                                     throws PipelineException
Get the value of the single valued parameter with the given name.

Parameters:
name - The name of the parameter.
Returns:
The action parameter value.
Throws:
PipelineException - If no single valued parameter with the given name exists.

setSingleParamValue

public final void setSingleParamValue(String name,
                                      Comparable value)
Set the value of a single valued parameter.

Parameters:
name - The name of the parameter.
value - The new value of the parameter.

setSingleParamValues

public final void setSingleParamValues(BaseAction action)
Copy the values of all of the single valued parameters from the given action.

Note that there is no requirement that the given action be the same plugin type or version. Any incompatible parameters will simply be ignored by the copy operation.

Parameters:
action - The action to use as the source of single valued parameter values.

clearLinkParams

public final void clearLinkParams(String source)
Unset any single valued LinkActionParam parameters which are currently set to the given source node.

Parameters:
source - The fully resolved dependency node name.

clearAllLinkParams

public final void clearAllLinkParams()
Unset all single valued LinkActionParam parameters.


supportsSourceParams

public boolean supportsSourceParams()
Whether this action supports per-source parameters.

Subclasses MUST override this method to return true if per-source paramters are allowed to be added to the action.


hasSourceParams

public final boolean hasSourceParams(String source)
Whether this action has per-source parameters for the primary sequence of the given node.

Parameters:
source - The fully resolved dependency node name.

hasSecondarySourceParams

public final boolean hasSecondarySourceParams(String source,
                                              FilePattern fpat)
Whether this action has per-source parameters for a secondary sequence of the given node.

Parameters:
source - The fully resolved dependency node name.
fpat - The file pattern of the secondary sequence of the upstream node.

initSourceParams

public final void initSourceParams(String source)
Initialize a new set of parameters for the primary sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.

initSecondarySourceParams

public final void initSecondarySourceParams(String source,
                                            FilePattern fpat)
Initialize a new set of parameters for a secondary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
fpat - The file pattern of the secondary sequence of the upstream node.

getInitialSourceParams

public TreeMap<String,ActionParam> getInitialSourceParams()
Get an initial set of action parameters associated with an upstream node.

Subclasses which support per-source parameters MUST override this method to provide a means for initializing parameters for dependencies. The returned table cannot be (null) or empty if hasSourceParams(java.lang.String) has been overridden to return (true).


getSourceNames

public final Set<String> getSourceNames()
Get node names of the upstream nodes with primary file sequence per-source parameters.


getSecondarySourceNames

public final Set<String> getSecondarySourceNames()
Get node names of the upstream nodes with secondary file sequence per-source parameters.


getSecondarySequences

public final Set<FilePattern> getSecondarySequences(String source)
Get the file patterns of all secondary sequences with per-source parameters for the given node.

Parameters:
source - The fully resolved node name of the upstream node.

getSourceParamValue

public final Comparable getSourceParamValue(String source,
                                            String name)
                                     throws PipelineException
Get the value of the named parameter for the primary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
name - The name of the parameter.
Returns:
The action parameter value.
Throws:
PipelineException - If no parameter with the given name exists for the given upstream node.

getSourceParam

public final ActionParam getSourceParam(String source,
                                        String name)
Get the named parameter for the primary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
name - The name of the parameter.
Returns:
The action parameter or null if no parameter with the given name exists for the given source.

getSourceParams

public final Collection<ActionParam> getSourceParams(String source)
Get all of the per-source parameters associated with the primary file sequence of an upstream node.

The returned Collection may be empty if the upstream node does not have any parameters associated with its primary file sequence.

Parameters:
source - The fully resolved node name of the upstream node.
Returns:
The set of parameters for the given upstream node.

getSecondarySourceParamValue

public final Comparable getSecondarySourceParamValue(String source,
                                                     FilePattern fpat,
                                                     String name)
                                              throws PipelineException
Get the value of the named parameter for a secondary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
fpat - The secondary sequence file pattern.
name - The name of the parameter.
Returns:
The action parameter value.
Throws:
PipelineException - If no parameter with the given name exists for the given secondary file sequence of the upstream node.

getSecondarySourceParam

public final ActionParam getSecondarySourceParam(String source,
                                                 FilePattern fpat,
                                                 String name)
Get the named parameter for a secondary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
fpat - The secondary sequence file pattern.
name - The name of the parameter.
Returns:
The action parameter or null if no parameter with the given name exists for given secondary file sequence of the upstream node.

getSecondarySourceParams

public final Collection<ActionParam> getSecondarySourceParams(String source,
                                                              FilePattern fpat)
Get all of the per-source parameters associated with the given secondary file sequence of an upstream node.

The returned Collection may be empty if the upstream node does not have any parameters associated with the given secondary file sequence.

Parameters:
source - The fully resolved node name of the upstream node.
fpat - The secondary sequence file pattern.
Returns:
The set of parameters for the given upstream node.

setSourceParamValue

public final void setSourceParamValue(String source,
                                      String name,
                                      Comparable value)
Set the value of a per-source parameter for primary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
name - The name of the parameter.
value - The new value of the parameter.

setSecondarySourceParamValue

public final void setSecondarySourceParamValue(String source,
                                               FilePattern fpat,
                                               String name,
                                               Comparable value)
Set the value of a per-source parameter for secondary file sequence of an upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
fpat - The file pattern of the secondary sequence of the upstream node.
name - The name of the parameter.
value - The new value of the parameter.

setSourceParamValues

public final void setSourceParamValues(BaseAction action)
Copy the values of all of the per-source parameters from the given action.

For each source, if the given action has parameters for the source then this action will reinitialize its per-source parameters for that source. Any parameters are compatable will then be copied from the given action to this action.

Note that there is no requirement that the given action be the same plugin type or version. Any incompatible parameters will simply be ignored by the copy operation.

Parameters:
action - The action from which to copy per-source parameters.

removeSourceParams

public final void removeSourceParams(String source)
Remove all of the per-source parameters associated with the primary file sequence of the given upstream node.

Parameters:
source - The fully resolved node name of the upstream node.

removeSecondarySourceParams

public final void removeSecondarySourceParams(String source,
                                              FilePattern fpat)
Remove all of the per-source parameters associated with a secondary file sequence of the given upstream node.

Parameters:
source - The fully resolved node name of the upstream node.
fpat - The file pattern of the secondary sequence of the upstream node.

removeSecondarySourceParams

public final void removeSecondarySourceParams(String source)
Remove all of the per-source parameters associated with all secondary file sequence of the given upstream node.

Parameters:
source - The fully resolved node name of the upstream node.

removeAllSourceParams

public final void removeAllSourceParams()
Remove all per-source parameters from this action.

Parameters associated with both primary and secondary file sequences of all upstream nodes will be removed.


addPreset

protected final void addPreset(String name,
                               ArrayList<String> choices)
Add a named set of parameter preset choices to the action.

This method is used by subclasses in their constructors initialize the presets for single valued parameters that they support.

Parameters:
name - The name of the preset.
choices - The names of the possible preset choices.

addPresetValues

protected final void addPresetValues(String name,
                                     String choice,
                                     TreeMap<String,Comparable> values)
Add the values of single valued parameters which should be set when a given preset choice is selected.

This method is used by subclasses in their constructors to specify the parameter values set by a preset choice after first adding the preset using the addPreset method.

Parameters:
name - The name of the preset.
choice - The name of the preset choice which causes the parameter to be set.
values - The value assiged to each singled valued parameter indexed by parameter name.

getPresetChoices

public final List<String> getPresetChoices(String name)
Get the choices for the given preset.

Parameters:
name - The name of the preset.
Returns:
The names of the choices or null if no preset exists.

getPresetValues

public final SortedMap<String,Comparable> getPresetValues(String name,
                                                          String choice)
Get the preset values of single valued parameters set by a given preset choice.

Parameters:
name - The name of the preset.
choice - The name of the preset choice which causes the parameter to be set.
Returns:
The parameter values indexed by parameter name or null if no preset choice exists.

setSingleLayout

protected final void setSingleLayout(LayoutGroup group)
Sets the hierarchical grouping of parameters and presets which determine the layout of UI components.

The given layouts must contain an entry for all single valued parameters and presets defined for the action exactly once. A collapsible drawer component will be created for each layout group which contains a field for each parameter or preset entry in the order specified by the group. All null entries will cause additional space to be added between the UI fields. Each layout subgroup will be represented by its own drawer nested within the drawer for the parent layout group.

This method should be called by subclasses in their constructor after intializing all single valued parameters with the addSingleParam method and adding any preset choices with addPreset method.

Parameters:
group - The layout group.

getSingleLayout

public final LayoutGroup getSingleLayout()
Get the grouping of single valued parameters used to layout components which represent the parameters in the user interface.

If no single valued parameter group has been previously specified, a group will be created which contains all single valued parameters in alphabetical order.


setSourceLayout

protected final void setSourceLayout(List<String> pnames)
Specifies the ordering of per-source parameters in the user interface.

The specified list of parameters names must contains all per-source parameters defined for the action exactly once. A table will be constructed for the per-source parameters with a row for each source node and a column for each per-source parameter. The order of the parameters within the list will determine the ordering of the columns from left to right. Parameter entries may not be null for per-source parameters.

This method should be called by subclasses in their constructor if they have overriden the supportsSourceParams to return true and have implemented the getInitialSourceParams method.

Parameters:
pnames - The ordered per-source parameter names.

getSourceLayout

public final List<String> getSourceLayout()
Get the grouping of per-source parameters used to layout components which represent the parameters in the user interface.

If no per-source parameter group has been previously specified, a group will be created which contains all per-source parameters in alphabetical order.


prep

public SubProcessHeavy prep(ActionAgenda agenda,
                            File outFile,
                            File errFile)
                     throws PipelineException
Construct a SubProcessHeavy instance which when executed will fulfill the given action agenda.

Parameters:
agenda - The agenda to be accomplished by the action.
outFile - The file to which all STDOUT output is redirected.
errFile - The file to which all STDERR output is redirected.
Returns:
The SubProcess which will fulfill the agenda.
Throws:
PipelineException - If unable to prepare a SubProcess due to illegal, missing or imcompatable information in the action agenda or a general failure of the prep method code.

chmod

@Deprecated
public static final void chmod(int mode,
                                          File file)
                        throws IOException
Deprecated. Since this method is not portable to all operation systems, it should be avoided in the prep method of portable Action plugins. The principle use of this method was in creating execuable bash(1) scripts. However, this really isn't needed even for bash(1) scripts since its just as easy to create a non-execuable script and pass it as the argument to the bash(1) executable instead.

Change file access permissions.

See the manpage for chmod(2) for details about the legal values for mode.

Parameters:
mode - The access mode bitmask.
file - The fully resolved path to the file to change.
Throws:
IOException - If unable to change the mode of the given file.

cleanupLater

protected final void cleanupLater(File file)
Add the given file to the set of files which will be removed upon termination of the Java runtime.

Parameters:
file - The temporary file to cleanup.

getTempPath

public static final Path getTempPath(ActionAgenda agenda)
Get the abstract pathname of the root directory used to store temporary files created by the job.

Parameters:
agenda - The agenda to be accomplished by the action.

getTempDir

public static final File getTempDir(ActionAgenda agenda)
Get the root directory used to store temporary files created by the job.

Parameters:
agenda - The agenda to be accomplished by the action.

createTemp

public final File createTemp(ActionAgenda agenda,
                             String suffix)
                      throws PipelineException
Create a unique temporary file for the job with the given suffix.

If successful, the temporary file will be added to the set of files which will be removed upon termination of the Java runtime (see @{link #cleanupLater cleanupLater}).

Parameters:
agenda - The agenda to be accomplished by the action.
suffix - The filename suffix of the temporary file.
Returns:
The temporary file.
Throws:
IOException - If unable to create the temporary file.
PipelineException

createTemp

public final File createTemp(ActionAgenda agenda,
                             int mode,
                             String suffix)
                      throws PipelineException
Create a unique temporary file for the job with the given suffix and access permissions.

If successful, the temporary file will be added to the set of files which will be removed upon termination of the Java runtime (see @{link #cleanupLater cleanupLater}).

This method is not supported by the Windows operating system since it relies on the NativeFileSys.chmod method.

Parameters:
agenda - The agenda to be accomplished by the action.
mode - The access mode bitmask.
suffix - The filename suffix of the temporary file.
Returns:
The temporary file.
Throws:
IOException - If unable to create the temporary file.
PipelineException

equals

public final boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class BasePlugin
Parameters:
obj - The reference object with which to compare.

equalSingleParams

public final boolean equalSingleParams(BaseAction action)
Indicates whether the single valued parameters of the given action equal to this actions single valued parameters.


equalSourceParams

public final boolean equalSourceParams(BaseAction action)
Indicates whether the per-source parameters of the given action equal to this actions per-source parameters for primary and secondary file sequences.


clone

public final Object clone()
Return a deep copy of this object.

Overrides:
clone in class Named

toGlue

public final void toGlue(GlueEncoder encoder)
                  throws GlueException
Description copied from interface: Glueable
Saves the non-transient fields of this object as Glue. Typically, the implementation will call GlueEncoder.encode for each non-transient field of the parent object.

Specified by:
toGlue in interface Glueable
Overrides:
toGlue in class PluginID
Parameters:
encoder - [modified] The object used to encode this object's fields into Glue format.
Throws:
GlueException

fromGlue

public final void fromGlue(GlueDecoder decoder)
                    throws GlueException
Description copied from interface: Glueable
Restores the non-transient fields of the class from Glue. Typically, the implementation will call GlueDecoder.decode for each non-transient field of the parent object.

Specified by:
fromGlue in interface Glueable
Overrides:
fromGlue in class PluginID
Parameters:
decoder - The object used to decode this object's fields from Glue format.
Throws:
GlueException

TEMERITY