[tools/model] Fix configuration
git-svn-id: https://svn.apache.org/repos/asf/velocity/tools/branches/model@1858050 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java b/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
index 0b3b629..90e8311 100644
--- a/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
+++ b/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
@@ -47,8 +47,6 @@
"/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 @@
// 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 @@
}
/**
- * <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.
diff --git a/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java b/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
index 6b7cb24..b11010c 100644
--- a/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
+++ b/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
@@ -124,12 +124,6 @@
"/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 @@
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)