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 is exactly the same thing as TemplateLink but it returns a
21 * relative link on toString(). Everything else is identical. This class is
22 * here for legacy purposes if you used the old org.apache.turbine.util.template.RelativeLink
23 * class and have lots of templates which you don't want to rewrite.
24 *
25 * <p>
26 * For new Code please use TemplateLink and get a relative Link with $link.RelativeLink and
27 * the URI without resetting the query_data and path_info with $link.RelativeURI
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} with the
35 * {@link org.apache.turbine.services.pull.tools.TemplateLink#getRelativeLink} method.
36 *
37 * @author <a href="jmcnally@collab.net">John D. McNally</a>
38 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
39 * @version $Id: RelativeTemplateLink.java 264148 2005-08-29 14:21:04Z henning $
40 */
41 public class RelativeTemplateLink
42 extends TemplateLink
43 {
44 /***
45 * Default constructor
46 * <p>
47 * The init method must be called before use.
48 */
49 public RelativeTemplateLink()
50 {
51 super();
52 }
53
54 /***
55 * Returns the URI. After rendering the URI, it clears the
56 * pathInfo and QueryString portions of the TemplateURI. Equivalent
57 * to the getRelativeLink() method of this class.
58 *
59 * @return A String with the URI in the form
60 * /Turbine/template/index.wm/hello/world
61 */
62 public String toString()
63 {
64 return getRelativeLink();
65 }
66 }