org.formaria.template
Class TemplateProcessor

java.lang.Object
  extended by org.formaria.template.TemplateProcessor
Direct Known Subclasses:
JavaTemplateProcessor, PropertiesTemplateProcessor, ResourceTemplateProcessor, XmlTemplateProcessor

public class TemplateProcessor
extends java.lang.Object

A basic processor for a parameterized resource

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from formaria.

$Revision: 1.2 $


Field Summary
static int APPLY_RESOURCE
           
static int COPY_FILE
           
protected  Project currentProject
           
protected  TemplateEngine engine
           
static int PROCESSING_INSTRUCTION
           
static int RENAME_ELEMENT
           
static int RENAME_FILE
           
protected  java.io.File sourceFile
           
protected  java.lang.String sourceFileName
           
protected  java.io.File targetFile
           
protected  java.lang.String targetFileName
           
 
Constructor Summary
TemplateProcessor(Project proj, TemplateEngine te)
           
 
Method Summary
 boolean copyFile()
           
 boolean process(java.lang.String sourceName, java.lang.String targetName, int processingType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPY_FILE

public static final int COPY_FILE
See Also:
Constant Field Values

RENAME_FILE

public static final int RENAME_FILE
See Also:
Constant Field Values

RENAME_ELEMENT

public static final int RENAME_ELEMENT
See Also:
Constant Field Values

APPLY_RESOURCE

public static final int APPLY_RESOURCE
See Also:
Constant Field Values

PROCESSING_INSTRUCTION

public static final int PROCESSING_INSTRUCTION
See Also:
Constant Field Values

sourceFile

protected java.io.File sourceFile

targetFile

protected java.io.File targetFile

sourceFileName

protected java.lang.String sourceFileName

targetFileName

protected java.lang.String targetFileName

engine

protected TemplateEngine engine

currentProject

protected Project currentProject
Constructor Detail

TemplateProcessor

public TemplateProcessor(Project proj,
                         TemplateEngine te)
Method Detail

process

public boolean process(java.lang.String sourceName,
                       java.lang.String targetName,
                       int processingType)

copyFile

public boolean copyFile()