Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.torque.generator.control.existingtargetstrategy
Interface ExistingTargetStrategy

All Known Implementing Classes:
  AppendToTargetFileStrategy, MergeTargetFileStrategy, ReplaceTargetFileStrategy, SkipExistingTargetFileStrategy

    public interface ExistingTargetStrategy

A handler which implements a strategy on how to deal with existing targets.

Version:
  $Id: ExistingTargetStrategy.java 1368426 2012-08-02 11:46:37Z tfischer $

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.

Method Detail

### beforeGeneration

    boolean beforeGeneration(String outputDirKey,
                             String outputPath,
                             String encoding,
                             UnitConfiguration unitConfiguration)
                             throws GeneratorException

  Will be called before the generation is started and decides whether the generation process for this file should proceed.

  Parameters:
    `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.
  Returns:
    true if generation should proceed, false if generation should be aborted.
  Throws:
    `GeneratorException` - on an error.

### afterGeneration

    void afterGeneration(String outputDirKey,
                         String outputPath,
                         String encoding,
                         OutletResult generationResult,
                         UnitConfiguration unitConfiguration)
                         throws GeneratorException

  Processes the results of the generation.

  Parameters:
    `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.
  Throws:
    `GeneratorException` - on an error.

### getStrategyName

    String getStrategyName()

  Returns the name of the existing target strategy.

  Returns:
    the strategy name, not null, must be different from the names of other strategies.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.