1 package org.apache.turbine.services.template; 2 3 18 19 import org.apache.turbine.services.TurbineServices; 20 21 import org.apache.turbine.util.RunData; 22 23 30 public abstract class TurbineTemplate 31 { 32 38 public static TemplateService getService() 39 { 40 return (TemplateService) TurbineServices 41 .getInstance().getService(TemplateService.SERVICE_NAME); 42 } 43 44 49 public static final boolean isCaching() 50 { 51 return getService().isCaching(); 52 } 53 54 59 public static final String getDefaultExtension() 60 { 61 return getService().getDefaultExtension(); 62 } 63 64 71 public static final String getExtension(String template) 72 { 73 return getService().getExtension(template); 74 } 75 76 82 public static final String getDefaultTemplate() 83 { 84 return getService().getDefaultTemplate(); 85 } 86 87 93 public static final String getDefaultPage() 94 { 95 return getService().getDefaultPage(); 96 } 97 98 104 public static final String getDefaultScreen() 105 { 106 return getService().getDefaultScreen(); 107 } 108 109 115 public static final String getDefaultLayout() 116 { 117 return getService().getDefaultLayout(); 118 } 119 120 126 public static final String getDefaultNavigation() 127 { 128 return getService().getDefaultNavigation(); 129 } 130 131 137 public static final String getDefaultLayoutTemplate() 138 { 139 return getService().getDefaultLayoutTemplate(); 140 } 141 142 150 public static final String getDefaultPageName(String template) 151 { 152 return getService().getDefaultPageName(template); 153 } 154 155 163 public static final String getDefaultScreenName(String template) 164 { 165 return getService().getDefaultScreenName(template); 166 } 167 168 176 public static final String getDefaultLayoutName(String template) 177 { 178 return getService().getDefaultLayoutName(template); 179 } 180 181 189 public static final String getDefaultNavigationName(String template) 190 { 191 return getService().getDefaultNavigationName(template); 192 } 193 194 202 public static final String getDefaultLayoutTemplateName(String template) 203 { 204 return getService().getDefaultLayoutTemplateName(template); 205 } 206 207 214 public static final String getDefaultPageName(RunData data) 215 { 216 return getService().getDefaultPageName(data); 217 } 218 219 226 public static final String getDefaultLayoutName(RunData data) 227 { 228 return getService().getDefaultLayoutName(data); 229 } 230 231 238 public static final String getScreenName(String name) 239 throws Exception 240 { 241 return getService().getScreenName(name); 242 } 243 244 252 public static final String getLayoutName(String template) 253 throws Exception 254 { 255 return getService().getLayoutName(template); 256 } 257 258 266 public static final String getNavigationName(String template) 267 throws Exception 268 { 269 return getService().getNavigationName(template); 270 } 271 272 279 public static final String getScreenTemplateName(String key) 280 throws Exception 281 { 282 return getService().getScreenTemplateName(key); 283 } 284 285 292 public static final String getLayoutTemplateName(String name) 293 throws Exception 294 { 295 return getService().getLayoutTemplateName(name); 296 } 297 298 305 public static final String getNavigationTemplateName(String key) 306 throws Exception 307 { 308 return getService().getNavigationTemplateName(key); 309 } 310 311 320 public static final String [] translateTemplatePaths(String [] templatePaths) 321 { 322 return getService().translateTemplatePaths(templatePaths); 323 } 324 325 334 public static final boolean templateExists(String template, String [] templatePaths) 335 { 336 return getService().templateExists(template, templatePaths); 337 } 338 339 345 public static final void registerTemplateEngineService(TemplateEngineService service) 346 { 347 getService().registerTemplateEngineService(service); 348 } 349 350 357 public static final TemplateEngineService getTemplateEngineService(String template) 358 { 359 return getService().getTemplateEngineService(template); 360 } 361 } 362 | Popular Tags |