Author: cbrisson
Date: Wed Apr 24 14:05:23 2019
New Revision: 1858050

URL: http://svn.apache.org/viewvc?rev=1858050&view=rev
Log:
[tools/model] Fix configuration

Modified:
    
velocity/tools/branches/model/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
    
velocity/tools/branches/model/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java

Modified: 
velocity/tools/branches/model/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
URL: 
http://svn.apache.org/viewvc/velocity/tools/branches/model/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java?rev=1858050&r1=1858049&r2=1858050&view=diff
==============================================================================
--- 
velocity/tools/branches/model/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
 (original)
+++ 
velocity/tools/branches/model/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
 Wed Apr 24 14:05:23 2019
@@ -47,8 +47,6 @@ public class ConfigurationUtils
         "/org/apache/velocity/tools/generic/tools.xml";
     public static final String VIEW_DEFAULTS_PATH =
         "/org/apache/velocity/tools/view/tools.xml";
-    public static final String MODEL_DEFAULTS_PATH =
-        "/org/apache/velocity/tools/model/tools.xml";
 
     public static final String AUTOLOADED_XML_PATH = "tools.xml";
     public static final String AUTOLOADED_PROPS_PATH = "tools.properties";
@@ -85,9 +83,6 @@ public class ConfigurationUtils
         // view tools may not be available
         config.read(VIEW_DEFAULTS_PATH, false);
 
-        // model tools may not be available
-        config.read(MODEL_DEFAULTS_PATH, false);
-
         // defaults should *always* be clean!
         clean(config);
         return config;
@@ -128,26 +123,6 @@ public class ConfigurationUtils
     }
 
     /**
-     * <p>Returns a {@link FactoryConfiguration} including all default
-     * "velocity-tools-view" and "velocity-tools-model" tools available as 
well as the default "GenericTools".</p>
-     * @return all default tools {@link FactoryConfiguration}
-     * @throws ConfigurationException if a tools.xml is not found at the 
{@link #VIEW_DEFAULTS_PATH}.
-     */
-    public static FactoryConfiguration getModelView()
-    {
-        FileFactoryConfiguration config =
-            new 
XmlFactoryConfiguration("ConfigurationUtils.getVelocityView()");
-        config.read(GENERIC_DEFAULTS_PATH);
-        config.read(VIEW_DEFAULTS_PATH);
-        config.read(MODEL_DEFAULTS_PATH);
-
-        // defaults should *always* be clean!
-        clean(config);
-        return config;
-    }
-
-
-    /**
      * Returns a {@link FactoryConfiguration} loaded from the path specified
      * in the "org.apache.velocity.tools" system property (if any).
      * If no such property has been set {@code null} will be returned.

Modified: 
velocity/tools/branches/model/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
URL: 
http://svn.apache.org/viewvc/velocity/tools/branches/model/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java?rev=1858050&r1=1858049&r2=1858050&view=diff
==============================================================================
--- 
velocity/tools/branches/model/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
 (original)
+++ 
velocity/tools/branches/model/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
 Wed Apr 24 14:05:23 2019
@@ -124,12 +124,6 @@ public class VelocityView extends ViewTo
         "/org/apache/velocity/tools/view/velocity.properties";
 
     /**
-     * Optional Model Runtime properties.
-     */
-    public static final String MODEL_PROPERTIES_PATH =
-        "/org/apache/velocity/tools/model/velocity.properties";
-
-    /**
      * This is the string that is looked for when getInitParameter is
      * called ("org.apache.velocity.properties").
      */
@@ -341,13 +335,6 @@ public class VelocityView extends ViewTo
         Properties defaultProperties = getProperties(DEFAULT_PROPERTIES_PATH, 
true);
         velocity.setProperties(defaultProperties);
 
-        // load model properties, if present in the classpath
-        Properties modelProperties = getProperties(MODEL_PROPERTIES_PATH, 
false);
-        if (modelProperties != null)
-        {
-            velocity.setProperties(modelProperties);
-        }
-
         // check for application-wide user props in the context init params
         String appPropsPath = servletContext.getInitParameter(PROPERTIES_KEY);
         if (appPropsPath != null)


Reply via email to