org.javagen.agile.core.emitter
Class DefaultArtifact

java.lang.Object
  extended by org.javagen.agile.core.emitter.DefaultArtifact
All Implemented Interfaces:
Artifact

public class DefaultArtifact
extends Object
implements Artifact

Output file name and path are bound using passed in context and NanoTemplate engine.

Author:
Richard Easterling

Field Summary
protected  String fileNameProperty
           
protected  String outputDirectoryProperty
           
 
Constructor Summary
DefaultArtifact()
           
DefaultArtifact(String outputDirectoryProperty, String fileNameProperty)
           
 
Method Summary
 File outputDirectory(Context context)
          Given a context determine the base output directory for this artifact.
 File outputFileName(Context context)
          Given a context determine the file name for this artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputDirectoryProperty

protected String outputDirectoryProperty

fileNameProperty

protected String fileNameProperty
Constructor Detail

DefaultArtifact

public DefaultArtifact()

DefaultArtifact

public DefaultArtifact(String outputDirectoryProperty,
                       String fileNameProperty)
Method Detail

outputFileName

public File outputFileName(Context context)
Description copied from interface: Artifact
Given a context determine the file name for this artifact.

Specified by:
outputFileName in interface Artifact
Parameters:
context - typically a composite of leaf, parent and emitter contexts.
Returns:
concatination of file name and file extension if it exists

outputDirectory

public File outputDirectory(Context context)
Description copied from interface: Artifact
Given a context determine the base output directory for this artifact. Common template key examples are: outputDirectoryTemplate, outputTestDirectoryTemplate and outputResourceDirectoryTemplate.

Specified by:
outputDirectory in interface Artifact
Parameters:
context - typically a composite of leaf, parent and emitter contexts.
Returns:
output directory.


Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.