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