henning 2003/03/12 06:29:23
Modified: src/java/org/apache/turbine/services/template
TemplateService.java TurbineTemplate.java
TurbineTemplateService.java
Log:
Deprecate the various path translation methods. They don't belong in the
template service but in the template engines
Revision Changes Path
1.8 +4 -1
jakarta-turbine-2/src/java/org/apache/turbine/services/template/TemplateService.java
Index: TemplateService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/TemplateService.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TemplateService.java 11 Mar 2003 10:47:39 -0000 1.7
+++ TemplateService.java 12 Mar 2003 14:29:13 -0000 1.8
@@ -301,6 +301,8 @@
*
* @param templatePaths An array of template paths.
* @return An array of translated template paths.
+ * @deprecated Each template engine service should know how to translate
+ * a request onto a file.
*/
String[] translateTemplatePaths(String[] templatePaths);
@@ -311,6 +313,7 @@
*
* @param template The template to check for the existance of.
* @param templatePaths The paths to check for the template.
+ * @deprecated Use templateExists from the various Templating Engines
*/
boolean templateExists(String template,
String[] templatePaths);
1.7 +4 -1
jakarta-turbine-2/src/java/org/apache/turbine/services/template/TurbineTemplate.java
Index: TurbineTemplate.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/TurbineTemplate.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TurbineTemplate.java 9 Mar 2003 03:06:33 -0000 1.6
+++ TurbineTemplate.java 12 Mar 2003 14:29:14 -0000 1.7
@@ -339,6 +339,8 @@
*
* @param templatePaths An array of template paths.
* @return An array of translated template paths.
+ * @deprecated Each template engine service should know how to translate
+ * a request onto a file.
*/
public static final String[] translateTemplatePaths(String[] templatePaths)
{
@@ -352,6 +354,7 @@
*
* @param template The template to check for the existance of.
* @param templatePaths The paths to check for the template.
+ * @deprecated Use templateExists from the various Templating Engines
*/
public static final boolean templateExists(String template, String[]
templatePaths)
{
1.12 +7 -6
jakarta-turbine-2/src/java/org/apache/turbine/services/template/TurbineTemplateService.java
Index: TurbineTemplateService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/TurbineTemplateService.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TurbineTemplateService.java 11 Mar 2003 10:48:00 -0000 1.11
+++ TurbineTemplateService.java 12 Mar 2003 14:29:14 -0000 1.12
@@ -588,14 +588,16 @@
return ((TemplateMapper)
mapperRegistry[LAYOUT_TEMPLATE_KEY]).getMappedName(template);
}
- /* ====================================== FIXME! ==============================
*/
-
/**
* Translates the supplied template paths into their Turbine-canonical
- * equivalent (probably absolute paths).
+ * equivalent (probably absolute paths). This is used if the templating
+ * engine (e.g. JSP) does not provide any means to load a page but
+ * the page path is passed to the servlet container.
*
* @param templatePaths An array of template paths.
* @return An array of translated template paths.
+ * @deprecated Each template engine service should know how to translate
+ * a request onto a file.
*/
public String[] translateTemplatePaths(String[] templatePaths)
{
@@ -613,6 +615,7 @@
*
* @param template The template to check for the existance of.
* @param templatePaths The paths to check for the template.
+ * @deprecated Use templateExists from the various Templating Engines
*/
public boolean templateExists(String template,
String[] templatePaths)
@@ -626,8 +629,6 @@
}
return false;
}
-
- /* ====================================== FIXME! ==============================
*/
/**
* Registers the provided template engine for use by the
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]