com.ptc.windchill.structconf
Class TargetFileBearingCommand

java.lang.Object
  extended bycom.ptc.windchill.structconf.StructConfManagerCommand
      extended bycom.ptc.windchill.structconf.TargetFileBearingCommand
Direct Known Subclasses:
SetPropertiesFromFile, SetSiteProperty

public abstract class TargetFileBearingCommand
extends StructConfManagerCommand

Command to instruct the StructConfManager to change the site-specific value of the named property to the specified value.


Field Summary
private  String targetFile_
           
 
Fields inherited from class com.ptc.windchill.structconf.StructConfManagerCommand
 
Constructor Summary
TargetFileBearingCommand()
           
 
Method Summary
private  File getAbsoluteTargetFile()
           
protected  File getTargetFile(String property_name)
          The target file for the current command.
protected  boolean hasTargetFile()
           
 void setTargetFile(String target_file)
           
 
Methods inherited from class com.ptc.windchill.structconf.StructConfManagerCommand
execute, execute, getCollector, getDeclarativeUpdater, getManager, getSiteUpdater, getUpdater, getUpdater, requiresSaveImmediatelyAfter, setRequiresSaveImmediatelyAfter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetFile_

private String targetFile_
Constructor Detail

TargetFileBearingCommand

public TargetFileBearingCommand()
Method Detail

setTargetFile

public void setTargetFile(String target_file)

hasTargetFile

protected final boolean hasTargetFile()

getAbsoluteTargetFile

private File getAbsoluteTargetFile()

getTargetFile

protected final File getTargetFile(String property_name)
                            throws StructConfManagerException
The target file for the current command. If #setTargetFile(java.io.File) was called with a non-null File, then a canonicalized value for this File will be returned. Otherwise, the provided property name will be used to try and determine the target file from the TargetFileContentsCollector. If the property currently has more than one target file (which is a problem), then the first will be returned. If the property isn't currently mapped to a target file, then null will be returned.

Returns:
null if no target file set, or an absolutely qualified file if it is
Throws:
StructConfManagerException