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 import org.apache.turbine.services.pull.ApplicationTool;
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 *
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 * <p>
32 *
33 * This is an application pull tool for the template system. You should <b>not</b>
34 * use it in a normal application!
35 *
36 * @deprecated Use {@link org.apache.turbine.services.pull.tools.TemplateLink} instead and fix up your template references.
37 *
38 * @author <a href="jmcnally@collab.net">John D. McNally</a>
39 * @version $Id: TemplateLinkWithSlash.java,v 1.3.2.2 2004/05/20 03:06:51 seade Exp $
40 */
41 public class TemplateLinkWithSlash
42 extends TemplateLink
43 implements ApplicationTool
44
45 {
46 /***
47 * Default constructor
48 * <p>
49 * The init method must be called before use.
50 */
51 public TemplateLinkWithSlash()
52 {
53 super();
54 }
55
56 /***
57 * Sets the template variable used by the Template Service.
58 * This method allows slashes '/' as the path separator.
59 *
60 * @param t A String with the template name.
61 * @return A TemplateLink.
62 */
63 public TemplateLink setPage(String template)
64 {
65 super.setPage( template.replace('/', ',') );
66 return this;
67 }
68 }
69
70