org.tigris.scarab.util.build
Class AntPropertyFileGenerator

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.tigris.scarab.util.build.AntPropertyFileGenerator
All Implemented Interfaces:
PropertyGetter

public class AntPropertyFileGenerator
extends org.apache.tools.ant.Task
implements PropertyGetter

This class is used as ant task backend for the generation of a property file by use of a template file.

Version:
$Id: AntPropertyFileGenerator.java 9421 2005-02-20 22:32:38Z jorgeuriarte $
Author:
Hussayn Dabbous

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
AntPropertyFileGenerator()
           
 
Method Summary
 void execute()
          Read the templateFile and behave according to following rule set: rule 1: Copy every line, which does NOT contain a property verbatim to the customFile.
 java.lang.Object getProperty(java.lang.String name, java.lang.Object def)
          This is the method by which the generator can retrieve property values.
 void setCustom(java.lang.String theCustomPath)
          Setter: set the path to the final property file.
 void setProperties(java.lang.String thePropertyFilePathes)
          Setter: set the path to the final property file.
 void setTemplate(java.lang.String theTemplatePath)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntPropertyFileGenerator

public AntPropertyFileGenerator()
Method Detail

setTemplate

public void setTemplate(java.lang.String theTemplatePath)

setCustom

public void setCustom(java.lang.String theCustomPath)
Setter: set the path to the final property file. Throws an exception, if the customFile exist, but can't be overwritten (due to permission settings).

Parameters:
theCustomPath -

setProperties

public void setProperties(java.lang.String thePropertyFilePathes)
Setter: set the path to the final property file. Throws an exception, if the customFile exist, but can't be overwritten (due to permission settings).


execute

public void execute()
Read the templateFile and behave according to following rule set:


getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    java.lang.Object def)
This is the method by which the generator can retrieve property values.

Specified by:
getProperty in interface PropertyGetter
Parameters:
name -
Returns:


Copyright © 2000-2004 Tigris.org. All Rights Reserved.