KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > services > TemplateLocator


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

16
17 package org.apache.jetspeed.services;
18
19 import org.apache.jetspeed.services.template.TemplateLocatorService;
20 import org.apache.turbine.services.TurbineServices;
21 import org.apache.turbine.util.RunData;
22
23 import java.util.Locale JavaDoc;
24
25 /**
26  * <P>This is a commodity static accessor class around the
27  * <code>TemplateLocatorService</code> interface</P>
28  *
29  * @see org.apache.jetspeed.services.template.TemplateLocatorService
30  *
31  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
32  * @author <a HREF="mailto:paulsp@apache.org">Paul Spencer</a>
33  * @author <a HREF="mailto:kimptoc_mail@yahoo.com">Chris Kimpton</a>
34  * @version $Id: TemplateLocator.java,v 1.5 2004/02/23 04:00:57 jford Exp $
35  */

36 public class TemplateLocator
37 {
38     /**
39      * Commodity method for getting a reference to the service
40      * singleton
41      */

42     private static TemplateLocatorService getService()
43     {
44         return (TemplateLocatorService)TurbineServices
45                 .getInstance()
46                 .getService(TemplateLocatorService.SERVICE_NAME);
47     }
48
49     /**
50      * @see TemplateLocatorService#locateScreenTemplate
51      */

52     public static String JavaDoc locateScreenTemplate(RunData data, String JavaDoc template)
53     {
54         return getService().locateScreenTemplate(data, template);
55     }
56
57     /**
58      * @see TemplateLocatorService#locateLayoutTemplate
59      */

60     public static String JavaDoc locateLayoutTemplate(RunData data, String JavaDoc template)
61     {
62         return getService().locateLayoutTemplate(data, template);
63     }
64
65     /**
66      * @see TemplateLocatorService#locatePortletTemplate
67      */

68     public static String JavaDoc locatePortletTemplate(RunData data, String JavaDoc template)
69     {
70         return getService().locatePortletTemplate(data, template);
71     }
72
73     /**
74      * @see TemplateLocatorService#locateControlTemplate
75      */

76     public static String JavaDoc locateControlTemplate(RunData data, String JavaDoc template)
77     {
78         return getService().locateControlTemplate(data, template);
79     }
80
81     /**
82      * @see TemplateLocatorService#locateControllerTemplate
83      */

84     public static String JavaDoc locateControllerTemplate(RunData data, String JavaDoc template)
85     {
86         return getService().locateControllerTemplate(data, template);
87     }
88
89     /**
90      * @see TemplateLocatorService#locateNavigationTemplate
91      */

92     public static String JavaDoc locateNavigationTemplate(RunData data, String JavaDoc template)
93     {
94         return getService().locateNavigationTemplate(data, template);
95     }
96
97     /**
98      * @see TemplateLocatorService#locateEmailTemplate
99      */

100     public static String JavaDoc locateEmailTemplate(RunData data, String JavaDoc template)
101     {
102         return getService().locateEmailTemplate(data, template);
103     }
104
105
106     /**
107      * @see TemplateLocatorService#locateEmailTemplate
108      */

109     public static String JavaDoc locateEmailTemplate(RunData data, String JavaDoc template, Locale JavaDoc locale)
110     {
111         return getService().locateEmailTemplate(data, template, locale);
112     }
113
114     /**
115      * @see TemplateLocatorService#locateParameterTemplate
116      */

117     public static String JavaDoc locateParameterTemplate(RunData data, String JavaDoc template)
118     {
119         return getService().locateParameterTemplate(data, template);
120     }
121
122 }
123
Popular Tags