Klasse ReplaceTargetFileStrategy
java.lang.Object
org.apache.torque.generator.control.existingtargetstrategy.ReplaceTargetFileStrategy
- Alle implementierten Schnittstellen:
ExistingTargetStrategy
- Bekannte direkte Unterklassen:
SkipExistingTargetFileStrategy
A handler which implements the strategy to replace existing target files.
- Version:
- $Id: ReplaceTargetFileStrategy.java 1917241 2024-04-21 13:29:41Z tv $
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
afterGeneration
(String outputDirKey, String outputPath, Charset charSet, OutletResult generationResult, UnitConfiguration unitConfiguration) Processes the results of the generation.boolean
beforeGeneration
(String outputDirKey, String outputPath, Charset charSet, UnitConfiguration unitConfiguration) Will be called before the generation is started and decides whether the generation process for this file should proceed.Returns the name of the existing target strategy.
-
Felddetails
-
STRATEGY_NAME
The strategy name "replace".- Siehe auch:
-
-
Konstruktordetails
-
ReplaceTargetFileStrategy
public ReplaceTargetFileStrategy()
-
-
Methodendetails
-
beforeGeneration
public boolean beforeGeneration(String outputDirKey, String outputPath, Charset charSet, UnitConfiguration unitConfiguration) Will be called before the generation is started and decides whether the generation process for this file should proceed.- Angegeben von:
beforeGeneration
in SchnittstelleExistingTargetStrategy
- Parameter:
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.charSet
- The character encoding of the generated file, or null for the platform default encoding.unitConfiguration
- the configuration of the current configuration unit, not null.- Gibt zurück:
- true always.
-
afterGeneration
public void afterGeneration(String outputDirKey, String outputPath, Charset charSet, OutletResult generationResult, UnitConfiguration unitConfiguration) throws GeneratorException Processes the results of the generation.- Angegeben von:
afterGeneration
in SchnittstelleExistingTargetStrategy
- Parameter:
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.charSet
- 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.- Löst aus:
GeneratorException
- on an error.
-
getStrategyName
Returns the name of the existing target strategy.- Angegeben von:
getStrategyName
in SchnittstelleExistingTargetStrategy
- Gibt zurück:
- "replace"
-