geirm       01/05/10 20:59:44

  Modified:    src/java/org/apache/velocity/runtime/resource/loader
                        ClasspathResourceLoader.java
                        DataSourceResourceLoader.java
                        FileResourceLoader.java JarHolder.java
                        JarResourceLoader.java ResourceLoader.java
  Log:
  Converted from Configuration to ExtendedProperties.  Should be no functional
  change.
  
  Revision  Changes    Path
  1.5       +4 -3      
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
  
  Index: ClasspathResourceLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClasspathResourceLoader.java      2001/03/20 23:01:08     1.4
  +++ ClasspathResourceLoader.java      2001/05/11 03:59:40     1.5
  @@ -59,8 +59,9 @@
   import org.apache.velocity.runtime.Runtime;
   import org.apache.velocity.runtime.resource.Resource;
   import org.apache.velocity.exception.ResourceNotFoundException;
  -import org.apache.velocity.runtime.configuration.Configuration;
   
  +import org.apache.commons.collections.ExtendedProperties;
  +
   /**
    *  ClasspathResourceLoader is a simple loader that will load
    *  templates from the classpath.
  @@ -104,7 +105,7 @@
    *  work just fine.
    *  
    * @author <a href="mailto:[EMAIL PROTECTED]";>Geir Magnusson Jr.</a>
  - * @version $Id: ClasspathResourceLoader.java,v 1.4 2001/03/20 23:01:08 jon Exp $
  + * @version $Id: ClasspathResourceLoader.java,v 1.5 2001/05/11 03:59:40 geirm Exp $
    */
   public class ClasspathResourceLoader extends ResourceLoader
   {
  @@ -112,7 +113,7 @@
       /**
        *  This is abstract in the base class, so we need it
        */
  -    public void init(Configuration configuration)
  +    public void init( ExtendedProperties configuration)
       {
           Runtime.info("ClasspathResourceLoader : initialization starting.");
           Runtime.info("ClasspathResourceLoader : initialization complete.");
  
  
  
  1.7       +4 -3      
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
  
  Index: DataSourceResourceLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DataSourceResourceLoader.java     2001/03/20 00:55:03     1.6
  +++ DataSourceResourceLoader.java     2001/05/11 03:59:41     1.7
  @@ -64,11 +64,12 @@
   import javax.naming.InitialContext;
   
   import org.apache.velocity.runtime.Runtime;
  -import org.apache.velocity.runtime.configuration.Configuration;
   import org.apache.velocity.runtime.resource.Resource;
   
   import org.apache.velocity.exception.ResourceNotFoundException;
   
  +import org.apache.commons.collections.ExtendedProperties;
  +
   /**
    * This is a simple template file loader that loads templates
    * from a DataSource instead of plain files.
  @@ -94,7 +95,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>David Kinnvall</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Paulo Gaspar</a>
  - * @version $Id: DataSourceResourceLoader.java,v 1.6 2001/03/20 00:55:03 jon Exp $
  + * @version $Id: DataSourceResourceLoader.java,v 1.7 2001/05/11 03:59:41 geirm Exp $
    */
   public class DataSourceResourceLoader extends ResourceLoader
   {
  @@ -106,7 +107,7 @@
        private InitialContext ctx;
        private DataSource dataSource;
   
  -     public void init(Configuration configuration)
  +     public void init( ExtendedProperties configuration)
        {
            dataSourceName  = configuration.getString("resource.datasource");
            tableName       = configuration.getString("resource.table");
  
  
  
  1.12      +4 -3      
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
  
  Index: FileResourceLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FileResourceLoader.java   2001/03/23 04:18:50     1.11
  +++ FileResourceLoader.java   2001/05/11 03:59:41     1.12
  @@ -65,19 +65,20 @@
   import java.util.Vector;
   
   import org.apache.velocity.util.StringUtils;
  -import org.apache.velocity.runtime.configuration.Configuration;
   import org.apache.velocity.runtime.Runtime;
   import org.apache.velocity.runtime.resource.Resource;
   
   import org.apache.velocity.exception.ResourceNotFoundException;
   
  +import org.apache.commons.collections.ExtendedProperties;
  +
   /**
    * This is a simple template file loader.
    * Currently it only supports a  single path to templates.
    * That'll change once we decide how we want to do configuration
    * 
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  - * @version $Id: FileResourceLoader.java,v 1.11 2001/03/23 04:18:50 jvanzyl Exp $
  + * @version $Id: FileResourceLoader.java,v 1.12 2001/05/11 03:59:41 geirm Exp $
    */
   public class FileResourceLoader extends ResourceLoader
   {
  @@ -93,7 +94,7 @@
        */
       private Hashtable templatePaths = new Hashtable();
   
  -    public void init(Configuration configuration)
  +    public void init( ExtendedProperties configuration)
       {
           Runtime.info("FileResourceLoader : initialization starting.");
           
  
  
  
  1.5       +1 -2      
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/JarHolder.java
  
  Index: JarHolder.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/JarHolder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JarHolder.java    2001/03/20 00:55:04     1.4
  +++ JarHolder.java    2001/05/11 03:59:41     1.5
  @@ -66,7 +66,6 @@
   
   import org.apache.velocity.util.StringUtils;
   import org.apache.velocity.runtime.Runtime;
  -import org.apache.velocity.runtime.configuration.Configuration;
   import org.apache.velocity.runtime.resource.Resource;
   
   import org.apache.velocity.exception.ResourceNotFoundException;
  @@ -75,7 +74,7 @@
    * A small wrapper around a Jar
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dave Bryson</a>
  - * @version $Id: JarHolder.java,v 1.4 2001/03/20 00:55:04 jon Exp $
  + * @version $Id: JarHolder.java,v 1.5 2001/05/11 03:59:41 geirm Exp $
    */
   public class JarHolder
   {
  
  
  
  1.10      +4 -3      
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
  
  Index: JarResourceLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JarResourceLoader.java    2001/04/30 11:03:14     1.9
  +++ JarResourceLoader.java    2001/05/11 03:59:41     1.10
  @@ -71,16 +71,17 @@
   
   import org.apache.velocity.util.StringUtils;
   import org.apache.velocity.runtime.Runtime;
  -import org.apache.velocity.runtime.configuration.Configuration;
   import org.apache.velocity.runtime.resource.Resource;
   
   import org.apache.velocity.exception.ResourceNotFoundException;
   
  +import org.apache.commons.collections.ExtendedProperties;
  +
   /**
    * ResourceLoader to load templates from multiple Jar files.
    * 
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dave Bryson</a>
  - * @version $Id: JarResourceLoader.java,v 1.9 2001/04/30 11:03:14 geirm Exp $
  + * @version $Id: JarResourceLoader.java,v 1.10 2001/05/11 03:59:41 geirm Exp $
    */
   public class JarResourceLoader extends ResourceLoader
   {
  @@ -101,7 +102,7 @@
       /**
        * Called by Velocity to initialize the loader
        */
  -    public void init(Configuration configuration)
  +    public void init( ExtendedProperties configuration)
       {
           Vector paths = configuration.getVector("resource.path");
           Runtime.info("PATHS SIZE= " + paths.size() );
  
  
  
  1.10      +5 -4      
jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java
  
  Index: ResourceLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ResourceLoader.java       2001/03/20 17:28:38     1.9
  +++ ResourceLoader.java       2001/05/11 03:59:42     1.10
  @@ -58,18 +58,19 @@
   import java.util.Map;
   
   import org.apache.velocity.runtime.Runtime;
  -import org.apache.velocity.runtime.configuration.Configuration;
   import org.apache.velocity.runtime.resource.Resource;
   
   import org.apache.velocity.exception.ResourceNotFoundException;
   
  +import org.apache.commons.collections.ExtendedProperties;
  +
   /**
    * This is abstract class the all text resource loaders should
    * extend.
    * 
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Geir Magnusson Jr.</a>
  - * @version $Id: ResourceLoader.java,v 1.9 2001/03/20 17:28:38 geirm Exp $
  + * @version $Id: ResourceLoader.java,v 1.10 2001/05/11 03:59:42 geirm Exp $
    */
   public abstract class ResourceLoader
   {
  @@ -96,7 +97,7 @@
        * loaders and must be called to set up common
        * properties shared by all resource loaders
        */
  -    public void commonInit(Configuration configuration)
  +    public void commonInit( ExtendedProperties configuration)
       {
           /*
            *  these two properties are not required for all loaders.
  @@ -120,7 +121,7 @@
        * Initialize the template loader with a
        * a resources class.
        */
  -    public abstract void init(Configuration configuration);
  +    public abstract void init( ExtendedProperties configuration);
   
       /** 
        * Get the InputStream that the Runtime will parse
  
  
  

Reply via email to