geirm 00/12/12 15:43:00
Modified: src/java/org/apache/velocity Context.java
Log:
Moved the non-user (internal) elements out to keep it clear, and simply made it
extend the new InternalContext class.
Revision Changes Path
1.9 +3 -23 jakarta-velocity/src/java/org/apache/velocity/Context.java
Index: Context.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/Context.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Context.java 2000/12/05 05:09:13 1.8
+++ Context.java 2000/12/12 23:42:59 1.9
@@ -58,6 +58,7 @@
import java.io.Serializable;
import org.apache.velocity.util.ArrayIterator;
+import org.apache.velocity.InternalContext;
/**
* This class provides the storage location for all dynamic
@@ -68,9 +69,9 @@
* are stored in a Hashtable.
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: Context.java,v 1.8 2000/12/05 05:09:13 geirm Exp $
+ * @version $Id: Context.java,v 1.9 2000/12/12 23:42:59 geirm Exp $
*/
-public class Context implements Cloneable, Serializable
+public class Context extends InternalContext implements Cloneable, Serializable
{
/**
* Random access storage for context data.
@@ -78,11 +79,6 @@
protected Hashtable context;
/**
- * Current template name.
- */
- private String strCurrentTemplate = "<undef>";
-
- /**
* Constructs the context under which to execute the templating engine.
*/
public Context()
@@ -157,22 +153,6 @@
}
return clone;
- }
-
- /**
- * set/get the value of the current template during a render
- * Since the Context is effectively a visitor as it is sent
- * to all nodes during render(), lets take advantage of this.
- */
- public void setCurrentTemplateName( String s )
- {
- strCurrentTemplate = s;
- return;
- }
-
- public String getCurrentTemplateName()
- {
- return strCurrentTemplate;
}
}