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