From 4310430f1c0149b5e89c7e7abbfba5343ac53a4f Mon Sep 17 00:00:00 2001 From: mdb Date: Sat, 28 Jun 2003 17:11:54 +0000 Subject: [PATCH] Added a couple of convenience methods. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1154 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../samskivert/velocity/InvocationContext.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/projects/samskivert/src/java/com/samskivert/velocity/InvocationContext.java b/projects/samskivert/src/java/com/samskivert/velocity/InvocationContext.java index 17b6e5b2..3ed43e34 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/InvocationContext.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/InvocationContext.java @@ -1,5 +1,5 @@ // -// $Id: InvocationContext.java,v 1.1 2001/10/31 09:44:22 mdb Exp $ +// $Id: InvocationContext.java,v 1.2 2003/06/28 17:11:54 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -72,6 +72,22 @@ public class InvocationContext extends VelocityContext return RuntimeSingleton.getTemplate(path); } + /** + * A convenience method for putting an int value into the context. + */ + public void put (String key, int value) + { + put(key, new Integer(value)); + } + + /** + * A convenience method for putting a boolean value into the context. + */ + public void put (String key, boolean value) + { + put(key, new Boolean(value)); + } + protected HttpServletRequest _req; protected HttpServletResponse _rsp; }