velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1855176 - in /velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main: java/org/apache/velocity/context/ java/org/apache/velocity/runtime/ java/org/apache/velocity/runtime/directive/ java/org/apache/velocity/runtime/resource/ j...
Date Sun, 10 Mar 2019 22:22:33 GMT
Author: cbrisson
Date: Sun Mar 10 22:22:32 2019
New Revision: 1855176

URL: http://svn.apache.org/viewvc?rev=1855176&view=rev
Log:
[engine][VELOCITY-909] Propagate propnames changes thorough javadoc; some more related code
fixes

Modified:
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
    velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
Sun Mar 10 22:22:32 2019
@@ -164,7 +164,7 @@ public abstract class AbstractContext ex
         /*
          * We always use string interning here:
          * 1) speed is generally less critical when populating the context than during parsing
or rendering
-         * 2) a context key is very likely to be used several times, or even a lot of times,
in the template (but does it save memory if runtime.string.interning is false?)
+         * 2) a context key is very likely to be used several times, or even a lot of times,
in the template (but does it save memory if runtime.string_interning is false?)
          * 3) last but not least: we don't have access to RuntimeServices from here, the
reengineering would be painful...
          */
         return internalPut(key.intern(), value);

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
Sun Mar 10 22:22:32 2019
@@ -123,7 +123,34 @@ public interface DeprecatedRuntimeConsta
      */
     String OLD_RESOURCE_LOADER_CHECK_INTERVAL = "modificationCheckInterval";
 
-    /** The default character encoding for the templates. Used by the parser in processing
the input streams. */
+    /**
+     * Datasource loader datasource url
+     * @deprecated see {@link RuntimeConstants#DS_RESOURCE_LOADER_DATASOURCE}
+     */
+    String OLD_DS_RESOURCE_LOADER_DATASOURCE = "ds.resource.loader.resource.datasource";
+
+    /**
+     * Datasource loader template key column
+     * @deprecated see {@link RuntimeConstants#DS_RESOURCE_LOADER_KEY_COLUMN}
+     */
+    String OLD_DS_RESOURCE_LOADER_KEY_COLUMN = "ds.resource.loader.resource.keycolumn";
+
+    /**
+     * Datasource loader template content column
+     * @deprecated see {@link RuntimeConstants#DS_RESOURCE_LOADER_TEMPLATE_COLUMN}
+     */
+    String OLD_DS_RESOURCE_LOADER_TEMPLATE_COLUMN = "ds.resource.loader.resource.templatecolumn";
+
+    /**
+     * Datasource loader template timestamp column
+     * @deprecated see {@link RuntimeConstants#DS_RESOURCE_LOADER_TIMESTAMP_COLUMN}
+     */
+    String OLD_DS_RESOURCE_LOADER_TIMESTAMP_COLUMN = "ds.resource.loader.resource.timestampcolumn";
+
+    /**
+     * The default character encoding for the templates. Used by the parser in processing
the input streams.
+     * @deprecated see {@link RuntimeConstants#INPUT_ENCODING}
+     */
     String OLD_INPUT_ENCODING = "input.encoding";
 
     /**

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
Sun Mar 10 22:22:32 2019
@@ -167,7 +167,7 @@ public interface RuntimeConstants extend
     /**
      * Key used to retrieve the names of the resource loaders to be used. In a properties
file they may appear as the following:
      *
-     * <p>resource.loader = file,classpath</p>
+     * <p>resource.loaders = file,classpath</p>
      */
     String RESOURCE_LOADERS = "resource.loaders";
 
@@ -211,6 +211,31 @@ public interface RuntimeConstants extend
      */
     String RESOURCE_LOADER_CHECK_INTERVAL = "modification_check_interval";
 
+    /**
+     * Datasource loader datasource url
+     */
+    String DS_RESOURCE_LOADER_DATASOURCE = "resource.loader.ds.resource.datasource_url";
+
+    /**
+     * Datasource loader templates table
+     */
+    String DS_RESOURCE_LOADER_TABLE = "resource.loader.ds.resource.table";
+
+    /**
+     * Datasource loader template key column
+     */
+    String DS_RESOURCE_LOADER_KEY_COLUMN = "resource.loader.ds.resource.key_column";
+
+    /**
+     * Datasource loader template content column
+     */
+    String DS_RESOURCE_LOADER_TEMPLATE_COLUMN = "resource.loader.ds.resource.template_column";
+
+    /**
+     * Datasource loader template timestamp column
+     */
+    String DS_RESOURCE_LOADER_TIMESTAMP_COLUMN = "resource.loader.ds.resource.timestamp_column";
+
     /** The default character encoding for the templates. Used by the parser in processing
the input streams. */
     String INPUT_ENCODING = "resource.default_encoding";
 
@@ -224,25 +249,25 @@ public interface RuntimeConstants extend
      */
 
     /**
-     * The <code>eventhandler.referenceinsertion.class</code> property specifies
a list of the
+     * The <code>event_handler.reference_insertion.class</code> property specifies
a list of the
      * {@link org.apache.velocity.app.event.ReferenceInsertionEventHandler} implementations
to use.
      */
     String EVENTHANDLER_REFERENCEINSERTION = "event_handler.reference_insertion.class";
 
     /**
-     * The <code>eventhandler.methodexception.class</code> property specifies
a list of the
+     * The <code>event_handler.method_exception.class</code> property specifies
a list of the
      * {@link org.apache.velocity.app.event.MethodExceptionEventHandler} implementations
to use.
      */
     String EVENTHANDLER_METHODEXCEPTION = "event_handler.method_exception.class";
 
     /**
-     * The <code>eventhandler.include.class</code> property specifies a list
of the
+     * The <code>event_handler.include.class</code> property specifies a list
of the
      * {@link org.apache.velocity.app.event.IncludeEventHandler} implementations to use.
      */
     String EVENTHANDLER_INCLUDE = "event_handler.include.class";
 
     /**
-     * The <code>eventhandler.invalidreferences.class</code> property specifies
a list of the
+     * The <code>event_handler.invalid_references.class</code> property specifies
a list of the
      * {@link org.apache.velocity.app.event.InvalidReferenceEventHandler} implementations
to use.
      */
     String EVENTHANDLER_INVALIDREFERENCES = "event_handler.invalid_references.class";

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
Sun Mar 10 22:22:32 2019
@@ -1543,7 +1543,7 @@ public class RuntimeInstance implements
     /**
      * Returns a <code>Template</code> from the resource manager.
      * This method assumes that the character encoding of the
-     * template is set by the <code>input.encoding</code>
+     * template is set by the <code>resource.default_encoding</code>
      * property. The default is UTF-8.
      *
      * @param name The file name of the desired template.

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
Sun Mar 10 22:22:32 2019
@@ -269,7 +269,7 @@ public class RuntimeSingleton implements
     /**
      * Returns a <code>Template</code> from the resource manager.
      * This method assumes that the character encoding of the
-     * template is set by the <code>input.encoding</code>
+     * template is set by the <code>resource.default_encoding</code>
      * property. The default is UTF-8.
      *
      * @param name The file name of the desired template.

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
Sun Mar 10 22:22:32 2019
@@ -55,7 +55,7 @@ import java.util.List;
  *    content.
  *
  *  2) There is a limited parse depth.  It is set as a property
- *    "directive.parse.max.depth = 10" by default.  This 10 deep
+ *    "directive.parse.max_depth = 10" by default.  This 10 deep
  *    limit is a safety feature to prevent infinite loops.
  * </pre>
  *

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
Sun Mar 10 22:22:32 2019
@@ -69,7 +69,7 @@ public class ResourceManagerImpl
      * This is a list of the template input stream source initializers, basically properties
for a particular template stream
      * source. The order in this list reflects numbering of the properties i.e.
      *
-     * <p>&lt;loader-id&gt;.resource.loader.&lt;property&gt; = &lt;value&gt;</p>
+     * <p>resource.loader.&lt;loader-id&gt;.&lt;property&gt; = &lt;value&gt;</p>
      */
     private final List<ExtProperties> sourceInitializerList = new ArrayList<>();
 
@@ -127,9 +127,9 @@ public class ResourceManagerImpl
                 resourceLoader = ResourceLoaderFactory.getLoader(rsvc, loaderClass);
             } else
             {
-                String msg = "Unable to find '" +
+                String msg = "Unable to find 'resource.loader." +
                     configuration.getString(RuntimeConstants.RESOURCE_LOADER_IDENTIFIER)
+
-                    ".resource.loader.class' specification in configuration." +
+                    ".class' specification in configuration." +
                     " This is a critical value.  Please adjust configuration.";
                 log.error(msg);
                 throw new VelocityException(msg);
@@ -215,7 +215,7 @@ public class ResourceManagerImpl
             /*
              * The loader id might look something like the following:
              *
-             * file.resource.loader
+             * resource.loader.file
              *
              * The loader id is the prefix used for all properties
              * pertaining to a particular loader.

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
Sun Mar 10 22:22:32 2019
@@ -46,10 +46,10 @@ import java.io.Reader;
  *  other than specifying this as the loader to use.  For example
  *  the following is all that the loader needs to be functional:
  *  <br>
- *  <br>
- *  resource.loader = class
- *  class.resource.loader.class =
- *    org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
+ *  <pre><code>
+ *  resource.loaders = class
+ *  resource.loader.class.class =org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
+  * </code></pre>
  *  <br>
  *  <br>
  *  To use, put your template directories, jars

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
Sun Mar 10 22:22:32 2019
@@ -21,6 +21,7 @@ package org.apache.velocity.runtime.reso
 
 import org.apache.velocity.exception.ResourceNotFoundException;
 import org.apache.velocity.exception.VelocityException;
+import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.runtime.resource.Resource;
 import org.apache.velocity.util.ExtProperties;
 
@@ -40,84 +41,86 @@ import java.sql.SQLException;
 import java.sql.Timestamp;
 
 /**
- * <P>This is a simple template file loader that loads templates
- * from a DataSource instead of plain files.
+ * <p>This is a simple template file loader that loads templates
+ * from a DataSource instead of plain files.</p>
  *
- * <P>It can be configured with a datasource name, a table name,
+ * <p>It can be configured with a datasource name, a table name,
  * id column (name), content column (the template body) and a
- * datetime column (for last modification info).
+ * datetime column (for last modification info).</p>
  * <br>
+ * <p>Example configuration snippet for velocity.properties:</p>
  * <br>
- * Example configuration snippet for velocity.properties:
- * <br>
- * <br>
- * resource.loader = file, ds <br>
- * <br>
- * ds.resource.loader.public.name = DataSource <br>
- * ds.resource.loader.description = Velocity DataSource Resource Loader <br>
- * ds.resource.loader.class = org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader
<br>
- * ds.resource.loader.resource.datasource = java:comp/env/jdbc/Velocity <br>
- * ds.resource.loader.resource.table = tb_velocity_template <br>
- * ds.resource.loader.resource.keycolumn = id_template <br>
- * ds.resource.loader.resource.templatecolumn = template_definition <br>
- * ds.resource.loader.resource.timestampcolumn = template_timestamp <br>
- * ds.resource.loader.cache = false <br>
- * ds.resource.loader.modificationCheckInterval = 60 <br>
- * <br>
- * <P>Optionally, the developer can instantiate the DataSourceResourceLoader and set
the DataSource via code in
- * a manner similar to the following:
- * <BR>
- * <BR>
- * DataSourceResourceLoader ds = new DataSourceResourceLoader();<BR>
- * ds.setDataSource(DATASOURCE);<BR>
- * Velocity.setProperty("ds.resource.loader.instance",ds);<BR>
- * <P> The property <code>ds.resource.loader.class</code> should be left
out, otherwise all the other
- * properties in velocity.properties would remain the same.
- * <BR>
- * <BR>
+ * <pre><code>
+ * resource.loaders = file, ds
  *
- * Example WEB-INF/web.xml: <br>
- * <br>
- *  <resource-ref> <br>
- *   <description>Velocity template DataSource</description> <br>
- *   <res-ref-name>jdbc/Velocity</res-ref-name> <br>
- *   <res-type>javax.sql.DataSource</res-type> <br>
- *   <res-auth>Container</res-auth> <br>
- *  </resource-ref> <br>
- * <br>
+ * resource.loader.ds.description = Velocity DataSource Resource Loader <br>
+ * resource.loader.ds.class = org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader
<br>
+ * resource.loader.ds.resource.datasource_url = java:comp/env/jdbc/Velocity <br>
+ * resource.loader.ds.resource.table = tb_velocity_template <br>
+ * resource.loader.ds.resource.key_column = id_template <br>
+ * resource.loader.ds.resource.template_column = template_definition <br>
+ * resource.loader.ds.resource.timestamp_column = template_timestamp <br>
+ * resource.loader.ds.cache = false <br>
+ * resource.loader.ds.modification_check_interval = 60 <br>
+ * </code></pre>
+ * <p>Optionally, the developer can instantiate the DataSourceResourceLoader and set
the DataSource via code in
+ * a manner similar to the following:</p>
+ * <br>
+ * <pre><code>
+ * DataSourceResourceLoader ds = new DataSourceResourceLoader();
+ * ds.setDataSource(DATASOURCE);
+ * Velocity.setProperty("resource.loader.ds.instance",ds);
+ * </code></pre>
+ * <p> The property <code>resource.loader.ds.class</code> should be left
out, otherwise all the other
+ * properties in velocity.properties would remain the same.</p>
+ * <br>
+ * <p>Example WEB-INF/web.xml:</p>
+ * <br>
+ * <pre><code>
+ *  &lt;resource-ref&gt;
+ *   &lt;description&gt;Velocity template DataSource&lt;/description&gt;
+ *   &lt;res-ref-name&gt;jdbc/Velocity&lt;/res-ref-name&gt;
+ *   &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
+ *   &lt;res-auth&gt;Container&lt;/res-auth&gt;
+ *  &lt;/resource-ref&gt;
+ * </code></pre>
  *  <br>
  * and Tomcat 4 server.xml file: <br>
- *  [...] <br>
- *  <Context path="/exampleVelocity" docBase="exampleVelocity" debug="0"> <br>
- *  [...] <br>
- *   <ResourceParams name="jdbc/Velocity"> <br>
- *    <parameter> <br>
- *      <name>driverClassName</name> <br>
- *      <value>org.hsql.jdbcDriver</value> <br>
- *    </parameter> <br>
- *    <parameter> <br>
- *     <name>driverName</name> <br>
- *     <value>jdbc:HypersonicSQL:database</value> <br>
- *    </parameter> <br>
- *    <parameter> <br>
- *     <name>user</name> <br>
- *     <value>database_username</value> <br>
- *    </parameter> <br>
- *    <parameter> <br>
- *     <name>password</name> <br>
- *     <value>database_password</value> <br>
- *    </parameter> <br>
- *   </ResourceParams> <br>
- *  [...] <br>
- *  </Context> <br>
- *  [...] <br>
- * <br>
- *  Example sql script:<br>
- *  CREATE TABLE tb_velocity_template ( <br>
- *  id_template varchar (40) NOT NULL , <br>
- *  template_definition text (16) NOT NULL , <br>
- *  template_timestamp datetime NOT NULL  <br>
- *  ) <br>
+ * <pre><code>
+ *  [...]
+ *  &lt;Context path="/exampleVelocity" docBase="exampleVelocity" debug="0"&gt;
+ *  [...]
+ *   &lt;ResourceParams name="jdbc/Velocity"&gt;
+ *    &lt;parameter&gt;
+ *      &lt;name&gt;driverClassName&lt;/name&gt;
+ *      &lt;value&gt;org.hsql.jdbcDriver&lt;/value&gt;
+ *    &lt;/parameter&gt;
+ *    &lt;parameter&gt;
+ *     &lt;name&gt;driverName&lt;/name&gt;
+ *     &lt;value&gt;jdbc:HypersonicSQL:database&lt;/value&gt;
+ *    &lt;/parameter&gt;
+ *    &lt;parameter&gt;
+ *     &lt;name&gt;user&lt;/name&gt;
+ *     &lt;value&gt;database_username&lt;/value&gt;
+ *    &lt;/parameter&gt;
+ *    &lt;parameter&gt;
+ *     &lt;name&gt;password&lt;/name&gt;
+ *     &lt;value&gt;database_password&lt;/value&gt;
+ *    &lt;/parameter&gt;
+ *   &lt;/ResourceParams&gt;
+ *  [...]
+ *  &lt;/Context&gt;
+ *  [...]
+ * </code></pre>
+ * <br>
+ *  <p>Example sql script:</p>
+ * <pre><code>
+ *  CREATE TABLE tb_velocity_template (
+ *    id_template varchar (40) NOT NULL ,
+ *    template_definition text (16) NOT NULL ,
+ *    template_timestamp datetime NOT NULL
+ *  );
+ * </code></pre>
  *
  * @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
  * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
@@ -181,11 +184,11 @@ public class DataSourceResourceLoader ex
      */
     public void init(ExtProperties configuration)
     {
-        dataSourceName  = StringUtils.trim(configuration.getString("resource.datasource"));
+        dataSourceName  = StringUtils.trim(configuration.getString("datasource_url"));
         tableName       = StringUtils.trim(configuration.getString("resource.table"));
-        keyColumn       = StringUtils.trim(configuration.getString("resource.keycolumn"));
-        templateColumn  = StringUtils.trim(configuration.getString("resource.templatecolumn"));
-        timestampColumn = StringUtils.trim(configuration.getString("resource.timestampcolumn"));
+        keyColumn       = StringUtils.trim(configuration.getString("resource.key_column"));
+        templateColumn  = StringUtils.trim(configuration.getString("resource.template_column"));
+        timestampColumn = StringUtils.trim(configuration.getString("resource.timestamp_column"));
 
         if (dataSource != null)
         {

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
Sun Mar 10 22:22:32 2019
@@ -46,14 +46,14 @@ import java.util.Map;
  * You simply add the JarResourceLoader to the configuration via
  * </p>
  * <p><pre>
- *    resource.loader = jar
- *    jar.resource.loader.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader
- *    jar.resource.loader.path = list of JAR &lt;URL&gt;s
+ *    resource.loaders = jar
+ *    resource.loader.jar.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader
+ *    resource.loader.jar.path = list of JAR &lt;URL&gt;s
  * </pre></p>
  *
  * <p> So for example, if you had a jar file on your local filesystem, you could simply
do
  *    <pre>
- *    jar.resource.loader.path = jar:file:/opt/myfiles/jar1.jar
+ *    resource.loader.jar.path = jar:file:/opt/myfiles/jar1.jar
  *    </pre>
  * </p>
  * <p> Note that jar specification for the <code>.path</code> configuration
property

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
Sun Mar 10 22:22:32 2019
@@ -49,10 +49,11 @@ import java.util.Map;
  * if not provided, the factory will fall back on using
  * {@link StringResourceRepositoryImpl} as the default.
  * <pre>
- * resource.loader = string
- * string.resource.loader.description = Velocity StringResource loader
- * string.resource.loader.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader
- * string.resource.loader.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepositoryImpl
+ * resource.loaders = string
+ * resource.loader.string.description = Velocity StringResource loader
+ * resource.loader.string.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader
+ * resource.loader.string.repository.name = MyRepositoryName (optional, to avoid using the
default repository)
+ * resource.loader.string.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepositoryImpl
  * </pre>
  * Resources can be added to the repository like this:
  * <pre><code>
@@ -66,7 +67,7 @@ import java.util.Map;
  * After this, the templates can be retrieved as usual.
  * <br>
  * <p>If there will be multiple StringResourceLoaders used in an application,
- * you should consider specifying a 'string.resource.loader.repository.name = foo'
+ * you should consider specifying a 'resource.loader.string.repository.name = foo'
  * property in order to keep you string resources in a non-default repository.
  * This can help to avoid conflicts between different frameworks or components
  * that are using StringResourceLoader.
@@ -78,7 +79,7 @@ import java.util.Map;
  * </p>
  * <p>If you have concerns about memory leaks or for whatever reason do not wish
  * to have your string repository stored statically as a class member, then you
- * should set 'string.resource.loader.repository.static = false' in your properties.
+ * should set 'resource.loader.string.repository.static = false' in your properties.
  * This will tell the resource loader that the string repository should be stored
  * in the Velocity application attributes.  To retrieve the repository, do:
  * <pre><code>
@@ -103,7 +104,7 @@ import java.util.Map;
  *   repo.magicallyAddSomeStringResources();
  *   velocityEngine.setApplicationAttribute("foo", repo);
  * </code></pre>
- * Then, assuming the 'string.resource.loader.repository.name' property is
+ * Then, assuming the 'resource.loader.string.repository.name' property is
  * set to 'some.name', the StringResourceLoader will use that already created
  * repository, rather than creating a new one.
  * </p>

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
Sun Mar 10 22:22:32 2019
@@ -732,11 +732,11 @@ public class ExtProperties extends Depre
      * exists then the value stated here will be added
      * to the configuration entry. For example, if
      *
-     * <code>resource.loader = file</code>
+     * <code>resource.loaders = file</code>
      *
      * is already present in the configuration and you
      *
-     * <code>addProperty("resource.loader", "classpath")</code>
+     * <code>addProperty("resource.loaders", "classpath")</code>
      *
      * Then you will end up with a Vector like the
      * following:

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
Sun Mar 10 22:22:32 2019
@@ -23,7 +23,7 @@ import java.util.Iterator;
 
 /**
  * <p>
- * When the runtime.introspection.uberspect configuration property contains several
+ * When the introspector.uberspect.class configuration property contains several
  * uberspector class names, it means those uberspectors will be chained. When an
  * uberspector in the list other than the leftmost does not implement ChainableUberspector,
  * then this utility class is used to provide a basic default chaining where the

Modified: velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties
URL: http://svn.apache.org/viewvc/velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties?rev=1855176&r1=1855175&r2=1855176&view=diff
==============================================================================
--- velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties
(original)
+++ velocity/engine/branches/VELOCITY-909/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties
Sun Mar 10 22:22:32 2019
@@ -136,7 +136,7 @@ velocimacro.arguments.preserve_literals
 # if an attempt is made to call a non-existing property on an object
 # or if the object is null.
 # ----------------------------------------------------------------------------
-runtime.references.strict.enable = false
+runtime.strict_mode.enable = false
 
 # ----------------------------------------------------------------------------
 # INTERPOLATION



Mime
View raw message