1 package org.apache.turbine.services.pull.tools;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.turbine.services.pull.ApplicationTool;
22
23 /***
24 * This class allows one to specify paths in the setPage method
25 * using '/' slash as opposed to the ',' used in TemplateLink.
26 * It is less efficient as the '/' are converted to ',' to avoid
27 * problems parsing the pathinfo after conversion in a web server.
28 *
29 * It is recommended that projects standardize on using the ','
30 * separator and use TemplateLink. But this class is available for
31 * those who do not mind the inefficiency.
32 *
33 * <p>
34 *
35 * This is an application pull tool for the template system. You should <b>not</b>
36 * use it in a normal application!
37 *
38 * @deprecated Use {@link org.apache.turbine.services.pull.tools.TemplateLink} instead and fix up your template references.
39 *
40 * @author <a href="jmcnally@collab.net">John D. McNally</a>
41 * @version $Id: TemplateLinkWithSlash.java 222043 2004-12-06 17:47:33Z painter $
42 */
43 public class TemplateLinkWithSlash
44 extends TemplateLink
45 implements ApplicationTool
46
47 {
48 /***
49 * Default constructor
50 * <p>
51 * The init method must be called before use.
52 */
53 public TemplateLinkWithSlash()
54 {
55 super();
56 }
57
58 /***
59 * Sets the template variable used by the Template Service.
60 * This method allows slashes '/' as the path separator.
61 *
62 * @param t A String with the template name.
63 * @return A TemplateLink.
64 */
65 public TemplateLink setPage(String template)
66 {
67 super.setPage( template.replace('/', ',') );
68 return this;
69 }
70 }
71
72