geirm       00/11/11 22:37:00

  Modified:    src/java/org/apache/velocity/runtime Runtime.java
  Log:
  Added getInt() property accessor method.
  
  Revision  Changes    Path
  1.38      +19 -1     
jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
  
  Index: Runtime.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Runtime.java      2000/11/08 03:22:41     1.37
  +++ Runtime.java      2000/11/12 06:37:00     1.38
  @@ -84,6 +84,7 @@
   import org.apache.velocity.runtime.directive.Foreach;
   import org.apache.velocity.runtime.directive.Dummy;
   import org.apache.velocity.runtime.directive.Include;
  +import org.apache.velocity.runtime.directive.Parse;
   
   import org.apache.velocity.util.*;
   import org.apache.velocity.runtime.configuration.VelocityResources;
  @@ -145,7 +146,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jeff Bowden</a>
  - * @version $Id: Runtime.java,v 1.37 2000/11/08 03:22:41 jon Exp $
  + * @version $Id: Runtime.java,v 1.38 2000/11/12 06:37:00 geirm Exp $
    */
   public class Runtime
   {
  @@ -415,6 +416,7 @@
           directives.put("foreach", new Foreach());
           directives.put("dummy", new Dummy());
           directives.put("include", new Include() );
  +        directives.put("parse", new Parse() );
           parser.setDirectives(directives);
           return parser;
       }
  @@ -451,6 +453,22 @@
               error(e);
               return null;
           }            
  +    }
  +
  +    /**
  +     *  Get an integer property with a default value
  +     */
  +    public static int getInt( String property, int iDef )
  +    {
  +        return VelocityResources.getInt( property, iDef );
  +    }
  +
  +    /**
  +     *  Get an integer property 
  +     */
  +    public static int getInt( String property )
  +    {
  +        return VelocityResources.getInt( property  );
       }
   
       /**
  
  
  

Reply via email to