org.apache.torque.generator.configuration.controller
Class Output

java.lang.Object
  extended by org.apache.torque.generator.configuration.controller.Output

public class Output
extends Object

The configuration for an output (typically one or more files).


Constructor Summary
Output(QualifiedName name)
          Constructor.
 
Method Summary
 OutletReference getContentOutlet()
          Returns the reference to the outlet which should produce the content.
 String getEncoding()
          Returns the character encoding of the generated file(s).
 String getExistingTargetStrategy()
          Returns the strategy how existing target files should be handled.
 String getFilename()
          Returns the name of the file to generate.
 Outlet getFilenameOutlet()
          Returns the reference to the outlet which should produce the file name.
 QualifiedName getName()
          Returns the name by which this output can be identified.
 String getOutputDirKey()
          Returns the key for the output directory into which the output is written.
 SourceProcessConfiguration getSourceProcessConfiguration()
          Returns how the sources should be post-processed before generation.
 SourceProvider getSourceProvider()
          Returns the source provider which provides the input for generating the output file's contents.
 void setContentOutlet(OutletReference contentOutlet)
          Sets the reference to the outlet which should produce the content.
 void setEncoding(String encoding)
          Sets the character encoding of the generated file(s).
 void setExistingTargetStrategy(String existingTargetStrategy)
          Sets the strategy how existing target files should be handled.
 void setFilename(String filename)
          Sets the name of the file to generate.
 void setFilenameOutlet(Outlet filenameOutlet)
          Sets the reference to the outlet which should produce the file name.
 void setOutputDirKey(String outputKeyDir)
          Sets the key for the output directory into which the output is written.
 void setSourceProcessConfiguration(SourceProcessConfiguration sourceProcessConfiguration)
          Sets how the sources should be post-processed before generation.
 void setSourceProvider(SourceProvider sourceProvider)
          Sets the source provider which provides the input for generating the output file's contents.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Output

public Output(QualifiedName name)
Constructor.

Parameters:
name - the name by which this output can be identified.
Method Detail

getName

public QualifiedName getName()
Returns the name by which this output can be identified.

Returns:
the name by which this output can be identified, not null.

getSourceProvider

public SourceProvider getSourceProvider()
Returns the source provider which provides the input for generating the output file's contents.

Returns:
the source provider which provides the input for generation.

setSourceProvider

public void setSourceProvider(SourceProvider sourceProvider)
Sets the source provider which provides the input for generating the output file's contents.

Parameters:
sourceProvider - the source provider which provides the input for generation.

getSourceProcessConfiguration

public SourceProcessConfiguration getSourceProcessConfiguration()
Returns how the sources should be post-processed before generation.

Returns:
the information about post-processing the sources.

setSourceProcessConfiguration

public void setSourceProcessConfiguration(SourceProcessConfiguration sourceProcessConfiguration)
Sets how the sources should be post-processed before generation.

Parameters:
sourceProcessConfiguration - the information about post-processing the sources.

setFilename

public void setFilename(String filename)
Sets the name of the file to generate. This is also used to store the generated filename if it was generated using the filenameOutlet.

Parameters:
filename - the name of the file to generate.

getFilename

public String getFilename()
Returns the name of the file to generate. Either this name was given explicitly or it was set using the filenameOutlet.

Returns:
the name of the file to generate.

getContentOutlet

public OutletReference getContentOutlet()
Returns the reference to the outlet which should produce the content.

Returns:
the reference to the outlet responsible for producing the content.

setContentOutlet

public void setContentOutlet(OutletReference contentOutlet)
Sets the reference to the outlet which should produce the content.

Parameters:
contentOutlet - the reference to the outlet responsible for producing the content.

getFilenameOutlet

public Outlet getFilenameOutlet()
Returns the reference to the outlet which should produce the file name. If this attribute is set, it takes precedence over a set filename.

Returns:
the reference to the outlet responsible for producing the file name, or null if the file name is explicitly given.

setFilenameOutlet

public void setFilenameOutlet(Outlet filenameOutlet)
Sets the reference to the outlet which should produce the file name.

Parameters:
filenameOutlet - the reference to the outlet responsible for producing the file name.

getExistingTargetStrategy

public String getExistingTargetStrategy()
Returns the strategy how existing target files should be handled.

Returns:
the strategy name.

setExistingTargetStrategy

public void setExistingTargetStrategy(String existingTargetStrategy)
Sets the strategy how existing target files should be handled.

Parameters:
existingTargetStrategy - the strategy name.

getOutputDirKey

public String getOutputDirKey()
Returns the key for the output directory into which the output is written.

Returns:
the key for the output directory, or null for the default output directory.

setOutputDirKey

public void setOutputDirKey(String outputKeyDir)
Sets the key for the output directory into which the output is written.

Parameters:
outputKeyDir - the key for the output directory, or null for the default output directory.

getEncoding

public String getEncoding()
Returns the character encoding of the generated file(s).

Returns:
The character encoding of the generated file, or null for the platform default encoding.

setEncoding

public void setEncoding(String encoding)
Sets the character encoding of the generated file(s).

Parameters:
encoding - The character encoding of the generated file, or null for the platform default encoding.

toString

public String toString()

Overrides:
toString in class Object


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