You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/08/15 23:25:40 UTC
cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/pull TurbinePullService.java
dlr 01/08/15 14:25:40
Modified: src/java/org/apache/turbine Turbine.java
src/java/org/apache/turbine/modules ModuleLoader.java
src/java/org/apache/turbine/services/pull
TurbinePullService.java
Log:
Switched from Velocity's deprecated Configuration class to Commons ExtendedProperties.
Revision Changes Path
1.93 +7 -7 jakarta-turbine/src/java/org/apache/turbine/Turbine.java
Index: Turbine.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -u -r1.92 -r1.93
--- Turbine.java 2001/08/11 08:55:19 1.92
+++ Turbine.java 2001/08/15 21:25:40 1.93
@@ -78,8 +78,8 @@
import org.apache.commons.util.http.HttpUtils;
import org.apache.fulcrum.ServiceManager;
import org.apache.fulcrum.TurbineServices;
+import org.apache.commons.collections.ExtendedProperties;
import org.apache.log4j.Category;
-import org.apache.velocity.runtime.configuration.Configuration;
/**
* Turbine is the main servlet for the entire system. It is <code>final</code>
@@ -113,7 +113,7 @@
* @author <a href="mailto:krzewski@e-point.pl">Rafal Krzewski</a>
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
- * @version $Id: Turbine.java,v 1.92 2001/08/11 08:55:19 dlr Exp $
+ * @version $Id: Turbine.java,v 1.93 2001/08/15 21:25:40 dlr Exp $
*/
public class Turbine
extends HttpServlet
@@ -140,7 +140,7 @@
/**
* Turbine application configuration.
*/
- private static Configuration configuration;
+ private static ExtendedProperties configuration;
/**
* This init method will load the default resources from a
@@ -552,7 +552,7 @@
// This should eventually be a Configuration
// interface so that service and app configuration
// can be stored anywhere.
- configuration = new Configuration(propsPath);
+ configuration = new ExtendedProperties(propsPath);
serviceManager.setConfiguration(configuration);
@@ -577,7 +577,7 @@
moduleLoader.init();
// Set some system properties
- Configuration systemProperties = configuration.subset("system");
+ ExtendedProperties systemProperties = configuration.subset("system");
if (systemProperties != null)
{
@@ -745,9 +745,9 @@
/**
* Get the configuration for this turbine webapp.
*
- * @return Configuration
+ * @return Turbine configuration.
*/
- public static Configuration getConfiguration()
+ public static ExtendedProperties getConfiguration()
{
return configuration;
}
1.7 +7 -5 jakarta-turbine/src/java/org/apache/turbine/modules/ModuleLoader.java
Index: ModuleLoader.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/ModuleLoader.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -u -r1.6 -r1.7
--- ModuleLoader.java 2001/08/14 13:36:33 1.6
+++ ModuleLoader.java 2001/08/15 21:25:40 1.7
@@ -58,6 +58,7 @@
import java.util.List;
import java.util.Vector;
import java.util.Map;
+
import org.apache.turbine.RunData;
import org.apache.turbine.Turbine;
import org.apache.turbine.TurbineException;
@@ -66,13 +67,13 @@
import org.apache.commons.collections.FastHashMap;
import org.apache.turbine.util.Log;
-import org.apache.velocity.runtime.configuration.Configuration;
+import org.apache.commons.collections.ExtendedProperties;
/**
* Load modules for use in the view pipeline.
*
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: ModuleLoader.java,v 1.6 2001/08/14 13:36:33 jvanzyl Exp $
+ * @version $Id: ModuleLoader.java,v 1.7 2001/08/15 21:25:40 dlr Exp $
*/
public class ModuleLoader
{
@@ -114,7 +115,7 @@
*/
protected boolean scriptingEnabled;
- protected Configuration configuration;
+ protected ExtendedProperties configuration;
/**
* Default constructor.
@@ -151,7 +152,7 @@
/**
* Set the configuration for the module loader
*/
- public void setConfiguration(Configuration configuration)
+ public void setConfiguration(ExtendedProperties configuration)
{
this.configuration = configuration;
}
@@ -162,7 +163,8 @@
public void init()
throws TurbineException
{
- Configuration moduleTypes = configuration.subset("module.default");
+ ExtendedProperties moduleTypes =
+ configuration.subset("module.default");
if (moduleTypes == null)
{
1.37 +4 -8 jakarta-turbine/src/java/org/apache/turbine/services/pull/TurbinePullService.java
Index: TurbinePullService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/pull/TurbinePullService.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -u -r1.36 -r1.37
--- TurbinePullService.java 2001/08/05 21:24:26 1.36
+++ TurbinePullService.java 2001/08/15 21:25:40 1.37
@@ -59,6 +59,7 @@
import java.util.List;
import java.util.Vector;
import java.util.HashMap;
+
import org.apache.fulcrum.security.entity.User;
import org.apache.fulcrum.BaseService;
import org.apache.fulcrum.InitializationException;
@@ -70,12 +71,7 @@
import org.apache.turbine.TemplateContext;
import org.apache.turbine.modules.DefaultTemplateContext;
-//!! this has to go away. there should be an interface
-// for Configuration in the commons. i don't even like
-// this here but is required for placing the tools
-// in the context. maybe we can get rid of needing
-// this all together.
-import org.apache.velocity.runtime.configuration.Configuration;
+import org.apache.commons.collections.ExtendedProperties;
/**
* <p>
@@ -146,7 +142,7 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:sean@informage.net">Sean Legassick</a>
- * @version $Id: TurbinePullService.java,v 1.36 2001/08/05 21:24:26 jvanzyl Exp $
+ * @version $Id: TurbinePullService.java,v 1.37 2001/08/15 21:25:40 dlr Exp $
*/
public class TurbinePullService
extends BaseService
@@ -312,7 +308,7 @@
{
List classes = new ArrayList();
- Configuration toolResources =
+ ExtendedProperties toolResources =
getConfiguration().subset(keyPrefix);
// There might not be any tools for this prefix
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org