1 package org.apache.turbine.services.pull.tools; 2 3 /* 4 * Copyright 2001-2004 The Apache Software Foundation. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License") 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 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 } 71