geirm 00/12/09 20:51:26
Modified: src/java/org/apache/velocity/runtime Runtime.java
Log:
Support for template-scope inline VMs. Altered VM factory wrapper routines, and
added new wrapper routine to dump a <cough> namespace.
Revision Changes Path
1.67 +14 -5
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.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- Runtime.java 2000/12/06 05:58:02 1.66
+++ Runtime.java 2000/12/10 04:51:25 1.67
@@ -154,7 +154,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jeff Bowden</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magusson Jr.</a>
- * @version $Id: Runtime.java,v 1.66 2000/12/06 05:58:02 geirm Exp $
+ * @version $Id: Runtime.java,v 1.67 2000/12/10 04:51:25 geirm Exp $
*/
public class Runtime implements RuntimeConstants
{
@@ -1046,9 +1046,9 @@
* @param strVMName Name of velocimacro requested
* @return VelocimacroProxy
*/
- public static Directive getVelocimacro( String strVMName )
+ public static Directive getVelocimacro( String strVMName, String
strTemplateName )
{
- return vmFactory_.getVelocimacro( strVMName );
+ return vmFactory_.getVelocimacro( strVMName, strTemplateName );
}
/**
@@ -1073,9 +1073,18 @@
* @param strName Name of velocimacro
* @return boolean True if VM by that name exists, false if not
*/
- public static boolean isVelocimacro( String strVMName )
+ public static boolean isVelocimacro( String strVMName, String strTemplateName )
{
- return vmFactory_.isVelocimacro( strVMName );
+ return vmFactory_.isVelocimacro( strVMName, strTemplateName );
+ }
+
+ /**
+ * tells the vmFactory to dump the specified namespace. This is to support
+ * clearing the VM list when in inline-VM-local-scope mode
+ */
+ public static boolean dumpVMNamespace( String strNamespace )
+ {
+ return vmFactory_.dumpVMNamespace( strNamespace );
}
/* --------------------------------------------------------------------