jvanzyl 00/12/19 15:57:22
Modified: src/java/org/apache/velocity/runtime RuntimeConstants.java
src/java/org/apache/velocity/runtime/resource
ResourceManager.java
src/java/org/apache/velocity/test VelocityTestSuite.java
src/java/org/apache/velocity/texen/ant TexenTask.java
Log:
- Update the name of the Runtime.FILE_TEMPLATE_PATH to
Runtime.FILE_RESOURCE_LOADER_PATH. Changed all the velocity
tools that depend on this property as well.
Revision Changes Path
1.10 +14 -2
jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeConstants.java
Index: RuntimeConstants.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeConstants.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- RuntimeConstants.java 2000/12/19 16:14:42 1.9
+++ RuntimeConstants.java 2000/12/19 23:57:17 1.10
@@ -110,8 +110,20 @@
/** Include paths property used by Runtime for #included content */
public final static String INCLUDE_PATHS = "include.path";
- public static final String FILE_TEMPLATE_PATH = "file.resource.path";
- public static final String FILE_TEMPLATE_CACHE = "file.cache";
+ //public static final String FILE_TEMPLATE_PATH = "file.resource.path";
+ //public static final String FILE_TEMPLATE_CACHE = "file.cache";
+
+ /**
+ * The public handle for setting the base path of the standard
+ * FileResourceLoader.
+ */
+ public static final String FILE_RESOURCE_LOADER_PATH = "file.resource.path";
+
+ /**
+ * The public handle for turning the caching on in the
+ * FileResourceLoader.
+ */
+ public static final String FILE_RESOURCE_LOADER_CACHING = "file.cache";
public static final String RUNTIME_LOG_REFERENCE_LOG_INVALID =
"runtime.log.reference.log_invalid";
1.5 +5 -5
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
Index: ResourceManager.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ResourceManager.java 2000/12/19 21:46:50 1.4
+++ ResourceManager.java 2000/12/19 23:57:20 1.5
@@ -71,7 +71,7 @@
* Runtime.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: ResourceManager.java,v 1.4 2000/12/19 21:46:50 jvanzyl Exp $
+ * @version $Id: ResourceManager.java,v 1.5 2000/12/19 23:57:20 jvanzyl Exp $
*/
public class ResourceManager
{
@@ -102,8 +102,8 @@
* that clients of velocity can set properties of
* a template source stream with its public name.
* So for example, a client could set the
- * File.template.path property and this would
- * change the template.path property for the
+ * File.resource.path property and this would
+ * change the resource.path property for the
* file template stream source.
*/
private static Hashtable sourceInitializerMap = new Hashtable();
@@ -168,8 +168,8 @@
* Make a Map of the public names for the sources
* to the sources property identifier so that external
* clients can set source properties. For example:
- * File.template.path would get translated into
- * template.loader.1.template.path and the translated
+ * File.resource.path would get translated into
+ * template.loader.1.resource.path and the translated
* name would be used to set the property.
*/
if (property.equalsIgnoreCase("public.name"))
1.12 +4 -3
jakarta-velocity/src/java/org/apache/velocity/test/VelocityTestSuite.java
Index: VelocityTestSuite.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/VelocityTestSuite.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- VelocityTestSuite.java 2000/12/19 16:12:43 1.11
+++ VelocityTestSuite.java 2000/12/19 23:57:20 1.12
@@ -72,7 +72,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: VelocityTestSuite.java,v 1.11 2000/12/19 16:12:43 jvanzyl Exp $
+ * @version $Id: VelocityTestSuite.java,v 1.12 2000/12/19 23:57:20 jvanzyl Exp $
*/
public class VelocityTestSuite extends TestSuite
{
@@ -85,7 +85,7 @@
* Path for templates. This property will override the
* value in the default velocity properties file.
*/
- private final static String FILE_TEMPLATE_PATH = "../test/templates";
+ private final static String FILE_RESOURCE_LOADER_PATH = "../test/templates";
private Properties testProperties;
@@ -99,7 +99,8 @@
try
{
Runtime.setDefaultProperties();
- Runtime.setSourceProperty(Runtime.FILE_TEMPLATE_PATH,
FILE_TEMPLATE_PATH);
+ Runtime.setSourceProperty(
+ Runtime.FILE_RESOURCE_LOADER_PATH, FILE_RESOURCE_LOADER_PATH);
Runtime.init();
testProperties = new Properties();
1.11 +3 -2
jakarta-velocity/src/java/org/apache/velocity/texen/ant/TexenTask.java
Index: TexenTask.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/texen/ant/TexenTask.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TexenTask.java 2000/11/24 16:52:45 1.10
+++ TexenTask.java 2000/12/19 23:57:21 1.11
@@ -79,7 +79,7 @@
* An ant task for generating output by using Velocity
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: TexenTask.java,v 1.10 2000/11/24 16:52:45 jvanzyl Exp $
+ * @version $Id: TexenTask.java,v 1.11 2000/12/19 23:57:21 jvanzyl Exp $
*/
public class TexenTask extends Task
@@ -272,7 +272,8 @@
// This is strictly to allow vel to compile for now.
// I need a new way to set what was the template path
// now that templates streams can come from anywhere.
- Runtime.setSourceProperty(Runtime.FILE_TEMPLATE_PATH, templatePath);
+ Runtime.setSourceProperty(
+ Runtime.FILE_RESOURCE_LOADER_PATH, templatePath);
Runtime.init();
// Create the text generator.