Return-Path: Delivered-To: apmail-jakarta-velocity-dev-archive@jakarta.apache.org Received: (qmail 75668 invoked by uid 500); 26 Mar 2001 04:18:55 -0000 Mailing-List: contact velocity-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: velocity-dev@jakarta.apache.org Delivered-To: mailing list velocity-dev@jakarta.apache.org Received: (qmail 75659 invoked by uid 500); 26 Mar 2001 04:18:53 -0000 Delivered-To: apmail-jakarta-velocity-cvs@apache.org Date: 26 Mar 2001 04:18:52 -0000 Message-ID: <20010326041852.75655.qmail@apache.org> From: jvanzyl@apache.org To: jakarta-velocity-cvs@apache.org Subject: cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime Runtime.java jvanzyl 01/03/25 20:18:52 Modified: src/java/org/apache/velocity/app Velocity.java src/java/org/apache/velocity/runtime Runtime.java Log: - adding clearProperty() to both the runtime and velocity helper class. Revision Changes Path 1.11 +11 -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.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Velocity.java 2001/03/25 22:58:19 1.10 +++ Velocity.java 2001/03/26 04:18:51 1.11 @@ -102,7 +102,7 @@ * @author Geir Magnusson Jr. * @author Christoph Reck * @author Jason van Zyl - * @version $Id: Velocity.java,v 1.10 2001/03/25 22:58:19 jvanzyl Exp $ + * @version $Id: Velocity.java,v 1.11 2001/03/26 04:18:51 jvanzyl Exp $ */ public class Velocity implements RuntimeConstants @@ -170,6 +170,16 @@ { Runtime.addProperty(key,value); } + + /** + * Clear a Velocity Runtime property. + * + * @param key of property to clear + */ + public static void clearProperty(String key) + { + Runtime.clearProperty(key); + } /** * Set an entire configuration at once. This is 1.105 +15 -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.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- Runtime.java 2001/03/25 22:57:55 1.104 +++ Runtime.java 2001/03/26 04:18:52 1.105 @@ -142,7 +142,7 @@ * @author Jason van Zyl * @author Jeff Bowden * @author Geir Magusson Jr. - * @version $Id: Runtime.java,v 1.104 2001/03/25 22:57:55 jvanzyl Exp $ + * @version $Id: Runtime.java,v 1.105 2001/03/26 04:18:52 jvanzyl Exp $ */ public class Runtime implements RuntimeConstants { @@ -347,6 +347,20 @@ } overridingProperties.addProperty( key, value ); + } + + /** + * Clear the values pertaining to a particular + * property. + * + * @param String key of property to clear + */ + public static void clearProperty(String key) + { + if (overridingProperties != null) + { + overridingProperties.clearProperty(key); + } } /**