Author: ssmiweve
Date: 2008-02-25 11:11:56 +0100 (Mon, 25 Feb 2008)
New Revision: 6165
Modified:
branches/2.16/core-api/src/main/java/no/sesat/search/view/velocity/VelocityEngineFactory.java
Log:
a little javadoc
Modified:
branches/2.16/core-api/src/main/java/no/sesat/search/view/velocity/VelocityEngineFactory.java
===================================================================
---
branches/2.16/core-api/src/main/java/no/sesat/search/view/velocity/VelocityEngineFactory.java
2008-02-25 10:10:59 UTC (rev 6164)
+++
branches/2.16/core-api/src/main/java/no/sesat/search/view/velocity/VelocityEngineFactory.java
2008-02-25 10:11:56 UTC (rev 6165)
@@ -108,12 +108,22 @@
// Static --------------------------------------------------------
+
+ /** Find the appropriate velocity Template by its name against a given
engine and site.
+ * Will throw a ResourceNotFoundException if not found.
+ *
+ * @param engine the VelocityEngine appropriate for the current site.
+ * @param site the current site.
+ * @param templateName the name of the template. must not contain ".vm"
suffix.
+ * @return returns the template.
+ * @throws org.apache.velocity.exception.ResourceNotFoundException if the
template was not found.
+ */
public static Template getTemplate(
final VelocityEngine engine,
final Site site,
final String templateName) throws ResourceNotFoundException{
- final String templateUrl = site.getTemplateDir() + "/" + templateName
+ ".vm";
+ final String templateUrl = site.getTemplateDir() + '/' + templateName
+ ".vm";
try {
return engine.getTemplate(templateUrl);
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits