|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.generator.control.existingtargetstrategy.ReplaceTargetFileStrategy
public class ReplaceTargetFileStrategy
A handler which implements the strategy to replace existing target files.
Field Summary | |
---|---|
static String |
STRATEGY_NAME
The strategy name "replace". |
Constructor Summary | |
---|---|
ReplaceTargetFileStrategy()
|
Method Summary | |
---|---|
void |
afterGeneration(String outputDirKey,
String outputPath,
String encoding,
OutletResult generationResult,
UnitConfiguration unitConfiguration)
Processes the results of the generation. |
boolean |
beforeGeneration(String outputDirKey,
String outputPath,
String encoding,
UnitConfiguration unitConfiguration)
Will be called before the generation is started and decides whether the generation process for this file should proceed. |
String |
getStrategyName()
Returns the name of the existing target strategy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STRATEGY_NAME
Constructor Detail |
---|
public ReplaceTargetFileStrategy()
Method Detail |
---|
public boolean beforeGeneration(String outputDirKey, String outputPath, String encoding, UnitConfiguration unitConfiguration)
beforeGeneration
in interface ExistingTargetStrategy
outputDirKey
- the key for the output directory
into which the generated file should be written,
null for the default output directory.outputPath
- the path to which the output should be written,
relative to the output base directory.encoding
- The character encoding of the generated file,
or null for the platform default encoding.unitConfiguration
- the configuration of the current configuration
unit, not null.
public void afterGeneration(String outputDirKey, String outputPath, String encoding, OutletResult generationResult, UnitConfiguration unitConfiguration) throws GeneratorException
afterGeneration
in interface ExistingTargetStrategy
outputDirKey
- the key for the output directory
into which the generated file should be written,
null for the default output directory.outputPath
- the path to which the output should be written,
relative to the output base directory.encoding
- The character encoding of the generated file,
or null for the platform default encoding.generationResult
- the result of the generation, not null.unitConfiguration
- the configuration of the current configuration
unit, not null.
GeneratorException
- on an error.public String getStrategyName()
getStrategyName
in interface ExistingTargetStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |