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 is exactly the same thing as TemplateLink but it returns a
23 * relative link on toString(). Everything else is identical. This class is
24 * here for legacy purposes if you used the old org.apache.turbine.util.template.RelativeLink
25 * class and have lots of templates which you don't want to rewrite.
26 *
27 * <p>
28 * For new Code please use TemplateLink and get a relative Link with $link.RelativeLink and
29 * the URI without resetting the query_data and path_info with $link.RelativeURI
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} with the
37 * {@link org.apache.turbine.services.pull.tools.TemplateLink#getRelativeLink} method.
38 *
39 * @author <a href="jmcnally@collab.net">John D. McNally</a>
40 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
41 * @version $Id: RelativeTemplateLink.java,v 1.3.2.2 2004/05/20 03:06:51 seade Exp $
42 */
43 public class RelativeTemplateLink
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 RelativeTemplateLink()
54 {
55 super();
56 }
57
58 /***
59 * Returns the URI. After rendering the URI, it clears the
60 * pathInfo and QueryString portions of the TemplateURI. Equivalent
61 * to the getRelativeLink() method of this class.
62 *
63 * @return A String with the URI in the form
64 * /Turbine/template/index.wm/hello/world
65 */
66 public String toString()
67 {
68 return getRelativeLink();
69 }
70 }