| org.tigris.scarab.util.build.AntPropertyFileGenerator
AntPropertyFileGenerator | public class AntPropertyFileGenerator extends Task implements PropertyGetter(Code) | | This class is used as ant task backend for the generation
of a property file by use of a template file.
author: Hussayn Dabbous version: $Id: AntPropertyFileGenerator.java 9421 2005-02-20 22:32:38Z jorgeuriarte $ |
Method Summary | |
public 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.
- rule 2: Retrieve the current online value of each
property found in the templateFile and generate an
appropriate name/value pair in the customFile.
- rule 3: If a property value starts with a "${" in
the templateFile, keep the value as is.
| public Object | getProperty(String name, Object def) This is the method by which the generator can retrieve
property values. | public void | setCustom(String theCustomPath) Setter: set the path to the final property file. | public void | setProperties(String thePropertyFilePathes) Setter: set the path to the final property file. | public void | setTemplate(String theTemplatePath) |
execute | public void execute()(Code) | | 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.
- rule 2: Retrieve the current online value of each
property found in the templateFile and generate an
appropriate name/value pair in the customFile.
- rule 3: If a property value starts with a "${" in
the templateFile, keep the value as is. By this we
can propagate ${variables} to the customFile, which
will be resolved during startup of Scarab.
|
getProperty | public Object getProperty(String name, Object def)(Code) | | This is the method by which the generator can retrieve
property values.
Parameters: name - |
setCustom | public void setCustom(String theCustomPath)(Code) | | 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(String thePropertyFilePathes)(Code) | | 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 - |
setTemplate | public void setTemplate(String theTemplatePath)(Code) | | |
|
|