| |
|
| java.lang.Object org.apache.velocity.texen.util.PropertiesUtil
PropertiesUtil | public class PropertiesUtil (Code) | | A property utility class for the texen text/code generator
Usually this class is only used from a Velocity context.
author: Leon Messerschmidt author: Stephane Bailliez version: $Id: PropertiesUtil.java 463298 2006-10-12 16:10:32Z henning $ |
Method Summary | |
public Properties | load(String propertiesFile) Load properties from either a file in the templatePath if there
is one or the classPath.
Parameters: propertiesFile - the properties file to load througheither the templatePath or the classpath. | protected Properties | loadFromClassPath(String propertiesName) Load a properties file from the classpath
Parameters: propertiesName - the properties file to load. | protected Properties | loadFromTemplatePath(String propertiesFile) Load a properties file from the templatePath defined in the
generator. |
load | public Properties load(String propertiesFile)(Code) | | Load properties from either a file in the templatePath if there
is one or the classPath.
Parameters: propertiesFile - the properties file to load througheither the templatePath or the classpath. a properties instance filled with the properties foundin the file or an empty instance if no file was found. |
loadFromClassPath | protected Properties loadFromClassPath(String propertiesName) throws Exception(Code) | | Load a properties file from the classpath
Parameters: propertiesName - the properties file to load. a properties instance loaded with the properties fromthe file. If no file can be found it returns an empty instance. throws: Exception - |
loadFromTemplatePath | protected Properties loadFromTemplatePath(String propertiesFile) throws Exception(Code) | | Load a properties file from the templatePath defined in the
generator. As the templatePath can contains multiple paths,
it will cycle through them to find the file. The first file
that can be successfully loaded is considered. (kind of
like the java classpath), it is done to clone the Velocity
process of loading templates.
Parameters: propertiesFile - the properties file to load. It must bea relative pathname. a properties instance loaded with the properties fromthe file. If no file can be found it returns an empty instance. throws: Exception - |
|
|
|