jvanzyl     01/03/25 14:58:19

  Modified:    src/java/org/apache/velocity/app Velocity.java
  Log:
  - adding support for setConfiguration() and addProperty().
  
  Revision  Changes    Path
  1.10      +26 -1     jakarta-velocity/src/java/org/apache/velocity/app/Velocity.java
  
  Index: Velocity.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/app/Velocity.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Velocity.java     2001/03/19 17:19:36     1.9
  +++ Velocity.java     2001/03/25 22:58:19     1.10
  @@ -66,6 +66,7 @@
   import org.apache.velocity.context.InternalContextAdapterImpl;
   import org.apache.velocity.runtime.Runtime;
   import org.apache.velocity.runtime.RuntimeConstants;
  +import org.apache.velocity.runtime.configuration.Configuration;
   import org.apache.velocity.runtime.parser.ParserTreeConstants;
   import org.apache.velocity.runtime.parser.node.SimpleNode;
   import org.apache.velocity.runtime.directive.VelocimacroProxy;
  @@ -101,7 +102,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
    * @author <a href="[EMAIL PROTECTED]">Christoph Reck</a>
    * @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: Velocity.java,v 1.9 2001/03/19 17:19:36 geirm Exp $
  + * @version $Id: Velocity.java,v 1.10 2001/03/25 22:58:19 jvanzyl Exp $
    */
   
   public class Velocity implements RuntimeConstants
  @@ -157,6 +158,30 @@
       public static void setProperty(String key, Object value)
       {
           Runtime.setProperty(key,value);
  +    }
  +
  +    /**
  +     * Add a Velocity Runtime property.
  +     *
  +     * @param String key
  +     * @param Object value
  +     */
  +    public static void addProperty(String key, Object value)
  +    {
  +        Runtime.addProperty(key,value);
  +    }
  +
  +    /**
  +     * Set an entire configuration at once. This is
  +     * useful in cases where the parent application uses
  +     * the Configuration class and the velocity configuration
  +     * is a subset of the parent application's configuration.
  +     *
  +     * @param Configuration configuration
  +     */
  +    public static void setConfiguration(Configuration configuration)
  +    {
  +        Runtime.setConfiguration(configuration);
       }
   
       /**
  
  
  

Reply via email to