You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by wg...@apache.org on 2005/01/15 08:01:10 UTC

svn commit: r125252 - /jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java

Author: wglass
Date: Fri Jan 14 23:01:10 2005
New Revision: 125252

URL: http://svn.apache.org/viewcvs?view=rev&rev=125252
Log:
Added method resourceExists to be parallel with Velocity.resourceExists
http://issues.apache.org/bugzilla/show_bug.cgi?id=32111
Modified:
   jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java

Modified: jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java
Url: http://svn.apache.org/viewcvs/jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java?view=diff&rev=125252&p1=jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java&r1=125251&p2=jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java&r2=125252
==============================================================================
--- jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java	(original)
+++ jakarta/velocity/trunk/src/java/org/apache/velocity/app/VelocityEngine.java	Fri Jan 14 23:01:10 2005
@@ -63,7 +63,7 @@
  * call init().
  * </p>
  *
- * @version $Id: VelocityEngine.java,v 1.9 2004/04/29 23:02:55 geirm Exp $
+ * @version $Id$
  */
 public class VelocityEngine implements RuntimeConstants
 {
@@ -526,7 +526,7 @@
     }
 
     /**
-     *   Determines if a template is accessable via the currently 
+     *   Determines if a resource is accessable via the currently 
      *   configured resource loaders.
      *   <br><br>
      *   Note that the current implementation will <b>not</b>
@@ -537,12 +537,21 @@
      *   The previous implementation exhibited extreme lazyness and
      *   sloth, and the author has been flogged.
      *
-     *   @param templateName  name of the temlpate to search for
+     *   @param resourceName  name of the resource to search for
      *   @return true if found, false otherwise
      */
-    public boolean templateExists( String templateName )
+    public boolean resourceExists(String resourceName)
     {
-        return (ri.getLoaderNameForResource(templateName) != null);
+        return (ri.getLoaderNameForResource(resourceName) != null);
+    }
+
+    /**
+     * @see #resourceExists(String)
+     * @deprecated Use resourceExists(String) instead.
+     */
+    public boolean templateExists(String resourceName)
+    {
+        return resourceExists(resourceName);
     }
     
     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org