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="ThemeLocalServiceUtil.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 ThemeLocalService} 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       ThemeLocalService
39   * @generated
40   */
41  public class ThemeLocalServiceUtil {
42      public static com.liferay.portal.model.ColorScheme getColorScheme(
43          long companyId, java.lang.String themeId,
44          java.lang.String colorSchemeId, boolean wapTheme)
45          throws com.liferay.portal.SystemException {
46          return getService()
47                     .getColorScheme(companyId, themeId, colorSchemeId, wapTheme);
48      }
49  
50      public static com.liferay.portal.model.Theme getTheme(long companyId,
51          java.lang.String themeId, boolean wapTheme)
52          throws com.liferay.portal.SystemException {
53          return getService().getTheme(companyId, themeId, wapTheme);
54      }
55  
56      public static java.util.List<com.liferay.portal.model.Theme> getThemes(
57          long companyId) {
58          return getService().getThemes(companyId);
59      }
60  
61      public static java.util.List<com.liferay.portal.model.Theme> getThemes(
62          long companyId, long groupId, long userId, boolean wapTheme)
63          throws com.liferay.portal.SystemException {
64          return getService().getThemes(companyId, groupId, userId, wapTheme);
65      }
66  
67      public static java.util.List<com.liferay.portal.model.Theme> getWARThemes() {
68          return getService().getWARThemes();
69      }
70  
71      public static java.util.List<java.lang.String> init(
72          javax.servlet.ServletContext servletContext,
73          java.lang.String themesPath, boolean loadFromServletContext,
74          java.lang.String[] xmls,
75          com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
76          return getService()
77                     .init(servletContext, themesPath, loadFromServletContext,
78              xmls, pluginPackage);
79      }
80  
81      public static java.util.List<java.lang.String> init(
82          java.lang.String servletContextName,
83          javax.servlet.ServletContext servletContext,
84          java.lang.String themesPath, boolean loadFromServletContext,
85          java.lang.String[] xmls,
86          com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
87          return getService()
88                     .init(servletContextName, servletContext, themesPath,
89              loadFromServletContext, xmls, pluginPackage);
90      }
91  
92      public static void uninstallThemes(
93          java.util.List<java.lang.String> themeIds) {
94          getService().uninstallThemes(themeIds);
95      }
96  
97      public static ThemeLocalService getService() {
98          if (_service == null) {
99              _service = (ThemeLocalService)PortalBeanLocatorUtil.locate(ThemeLocalService.class.getName());
100 
101             ReferenceRegistry.registerReference(ThemeLocalServiceUtil.class,
102                 "_service");
103             MethodCache.remove(ThemeLocalService.class);
104         }
105 
106         return _service;
107     }
108 
109     public void setService(ThemeLocalService service) {
110         MethodCache.remove(ThemeLocalService.class);
111 
112         _service = service;
113 
114         ReferenceRegistry.registerReference(ThemeLocalServiceUtil.class,
115             "_service");
116         MethodCache.remove(ThemeLocalService.class);
117     }
118 
119     private static ThemeLocalService _service;
120 }