1 package org.apache.turbine.util.template; 2 3 18 19 import org.apache.turbine.services.pull.ApplicationTool; 20 import org.apache.turbine.util.RelativeDynamicURI; 21 import org.apache.turbine.util.RunData; 22 23 37 public class RelativeTemplateLink 38 extends RelativeDynamicURI 39 implements ApplicationTool 40 { 41 42 private static final String TEMPLATE_KEY = "template"; 43 44 45 private String template = null; 46 47 52 public RelativeTemplateLink() 53 { 54 } 55 56 61 public RelativeTemplateLink(RunData data) 62 { 63 super(data); 64 } 65 66 73 public void init(Object data) 74 { 75 super.init((RunData) data); 79 } 80 81 84 public void refresh() 85 { 86 } 88 89 96 public RelativeTemplateLink setEncodeURLOff() 97 { 98 this.res = null; 99 return this; 100 } 101 102 108 public RelativeTemplateLink setPage(String template) 109 { 110 this.template = template; 111 addPathInfo(TEMPLATE_KEY, template); 112 return this; 113 } 114 115 121 public String getPage() 122 { 123 return template; 124 } 125 126 133 public String toString() 134 { 135 String output = super.toString(); 136 137 removePathInfo(); 140 removeQueryData(); 141 142 return output; 143 } 144 145 153 public String getURI() 154 { 155 return super.toString(); 156 } 157 } 158 | Popular Tags |