1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="LayoutTemplateLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link LayoutTemplateLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       LayoutTemplateLocalService
39   * @generated
40   */
41  public class LayoutTemplateLocalServiceUtil {
42      public static java.lang.String getContent(
43          java.lang.String layoutTemplateId, boolean standard,
44          java.lang.String themeId) throws com.liferay.portal.SystemException {
45          return getService().getContent(layoutTemplateId, standard, themeId);
46      }
47  
48      public static com.liferay.portal.model.LayoutTemplate getLayoutTemplate(
49          java.lang.String layoutTemplateId, boolean standard,
50          java.lang.String themeId) {
51          return getService()
52                     .getLayoutTemplate(layoutTemplateId, standard, themeId);
53      }
54  
55      public static java.util.List<com.liferay.portal.model.LayoutTemplate> getLayoutTemplates() {
56          return getService().getLayoutTemplates();
57      }
58  
59      public static java.util.List<com.liferay.portal.model.LayoutTemplate> getLayoutTemplates(
60          java.lang.String themeId) {
61          return getService().getLayoutTemplates(themeId);
62      }
63  
64      public static java.lang.String getWapContent(
65          java.lang.String layoutTemplateId, boolean standard,
66          java.lang.String themeId) throws com.liferay.portal.SystemException {
67          return getService().getWapContent(layoutTemplateId, standard, themeId);
68      }
69  
70      public static java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.lang.Boolean>> init(
71          javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
72          com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
73          return getService().init(servletContext, xmls, pluginPackage);
74      }
75  
76      public static java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.lang.Boolean>> init(
77          java.lang.String servletContextName,
78          javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
79          com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
80          return getService()
81                     .init(servletContextName, servletContext, xmls, pluginPackage);
82      }
83  
84      public static void readLayoutTemplate(java.lang.String servletContextName,
85          javax.servlet.ServletContext servletContext,
86          java.util.Set<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.lang.Boolean>> layoutTemplateIds,
87          com.liferay.portal.kernel.xml.Element el, boolean standard,
88          java.lang.String themeId,
89          com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
90          getService()
91              .readLayoutTemplate(servletContextName, servletContext,
92              layoutTemplateIds, el, standard, themeId, pluginPackage);
93      }
94  
95      public static void uninstallLayoutTemplate(
96          java.lang.String layoutTemplateId, boolean standard) {
97          getService().uninstallLayoutTemplate(layoutTemplateId, standard);
98      }
99  
100     public static void uninstallLayoutTemplates(java.lang.String themeId) {
101         getService().uninstallLayoutTemplates(themeId);
102     }
103 
104     public static LayoutTemplateLocalService getService() {
105         if (_service == null) {
106             _service = (LayoutTemplateLocalService)PortalBeanLocatorUtil.locate(LayoutTemplateLocalService.class.getName());
107 
108             ReferenceRegistry.registerReference(LayoutTemplateLocalServiceUtil.class,
109                 "_service");
110             MethodCache.remove(LayoutTemplateLocalService.class);
111         }
112 
113         return _service;
114     }
115 
116     public void setService(LayoutTemplateLocalService service) {
117         MethodCache.remove(LayoutTemplateLocalService.class);
118 
119         _service = service;
120 
121         ReferenceRegistry.registerReference(LayoutTemplateLocalServiceUtil.class,
122             "_service");
123         MethodCache.remove(LayoutTemplateLocalService.class);
124     }
125 
126     private static LayoutTemplateLocalService _service;
127 }