1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="PortletLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link PortletLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       PortletLocalService
37   * @generated
38   */
39  public class PortletLocalServiceUtil {
40      public static com.liferay.portal.model.Portlet addPortlet(
41          com.liferay.portal.model.Portlet portlet)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addPortlet(portlet);
44      }
45  
46      public static com.liferay.portal.model.Portlet createPortlet(long id) {
47          return getService().createPortlet(id);
48      }
49  
50      public static void deletePortlet(long id)
51          throws com.liferay.portal.kernel.exception.PortalException,
52              com.liferay.portal.kernel.exception.SystemException {
53          getService().deletePortlet(id);
54      }
55  
56      public static void deletePortlet(com.liferay.portal.model.Portlet portlet)
57          throws com.liferay.portal.kernel.exception.SystemException {
58          getService().deletePortlet(portlet);
59      }
60  
61      @SuppressWarnings("unchecked")
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
64          throws com.liferay.portal.kernel.exception.SystemException {
65          return getService().dynamicQuery(dynamicQuery);
66      }
67  
68      @SuppressWarnings("unchecked")
69      public static java.util.List dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      @SuppressWarnings("unchecked")
76      public static java.util.List dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end,
79          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
80          throws com.liferay.portal.kernel.exception.SystemException {
81          return getService()
82                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
83      }
84  
85      public static long dynamicQueryCount(
86          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
87          throws com.liferay.portal.kernel.exception.SystemException {
88          return getService().dynamicQueryCount(dynamicQuery);
89      }
90  
91      public static com.liferay.portal.model.Portlet getPortlet(long id)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getPortlet(id);
95      }
96  
97      public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getPortlets(start, end);
101     }
102 
103     public static int getPortletsCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getPortletsCount();
106     }
107 
108     public static com.liferay.portal.model.Portlet updatePortlet(
109         com.liferay.portal.model.Portlet portlet)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updatePortlet(portlet);
112     }
113 
114     public static com.liferay.portal.model.Portlet updatePortlet(
115         com.liferay.portal.model.Portlet portlet, boolean merge)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService().updatePortlet(portlet, merge);
118     }
119 
120     public static void checkPortlet(com.liferay.portal.model.Portlet portlet)
121         throws com.liferay.portal.kernel.exception.PortalException,
122             com.liferay.portal.kernel.exception.SystemException {
123         getService().checkPortlet(portlet);
124     }
125 
126     public static void checkPortlets(long companyId)
127         throws com.liferay.portal.kernel.exception.PortalException,
128             com.liferay.portal.kernel.exception.SystemException {
129         getService().checkPortlets(companyId);
130     }
131 
132     public static void clearCache() {
133         getService().clearCache();
134     }
135 
136     public static com.liferay.portal.model.Portlet clonePortlet(
137         long companyId, java.lang.String portletId)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getService().clonePortlet(companyId, portletId);
140     }
141 
142     public static com.liferay.portal.model.Portlet deployRemotePortlet(
143         com.liferay.portal.model.Portlet portlet, java.lang.String categoryName)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getService().deployRemotePortlet(portlet, categoryName);
146     }
147 
148     public static void destroyPortlet(com.liferay.portal.model.Portlet portlet) {
149         getService().destroyPortlet(portlet);
150     }
151 
152     public static void destroyRemotePortlet(
153         com.liferay.portal.model.Portlet portlet) {
154         getService().destroyRemotePortlet(portlet);
155     }
156 
157     public static java.util.List<com.liferay.portlet.expando.model.CustomAttributesDisplay> getCustomAttributesDisplays() {
158         return getService().getCustomAttributesDisplays();
159     }
160 
161     public static com.liferay.portal.model.PortletCategory getEARDisplay(
162         java.lang.String xml)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getService().getEARDisplay(xml);
165     }
166 
167     public static java.util.List<com.liferay.portal.model.Portlet> getFriendlyURLMapperPortlets() {
168         return getService().getFriendlyURLMapperPortlets();
169     }
170 
171     public static java.util.List<com.liferay.portal.kernel.portlet.FriendlyURLMapper> getFriendlyURLMappers() {
172         return getService().getFriendlyURLMappers();
173     }
174 
175     public static com.liferay.portal.model.PortletApp getPortletApp(
176         java.lang.String servletContextName) {
177         return getService().getPortletApp(servletContextName);
178     }
179 
180     public static com.liferay.portal.model.Portlet getPortletById(
181         long companyId, java.lang.String portletId)
182         throws com.liferay.portal.kernel.exception.SystemException {
183         return getService().getPortletById(companyId, portletId);
184     }
185 
186     public static com.liferay.portal.model.Portlet getPortletById(
187         java.lang.String portletId) {
188         return getService().getPortletById(portletId);
189     }
190 
191     public static com.liferay.portal.model.Portlet getPortletByStrutsPath(
192         long companyId, java.lang.String strutsPath)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         return getService().getPortletByStrutsPath(companyId, strutsPath);
195     }
196 
197     public static java.util.List<com.liferay.portal.model.Portlet> getPortlets() {
198         return getService().getPortlets();
199     }
200 
201     public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
202         long companyId)
203         throws com.liferay.portal.kernel.exception.SystemException {
204         return getService().getPortlets(companyId);
205     }
206 
207     public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
208         long companyId, boolean showSystem, boolean showPortal)
209         throws com.liferay.portal.kernel.exception.SystemException {
210         return getService().getPortlets(companyId, showSystem, showPortal);
211     }
212 
213     public static com.liferay.portal.model.PortletCategory getWARDisplay(
214         java.lang.String servletContextName, java.lang.String xml)
215         throws com.liferay.portal.kernel.exception.SystemException {
216         return getService().getWARDisplay(servletContextName, xml);
217     }
218 
219     public static boolean hasPortlet(long companyId, java.lang.String portletId)
220         throws com.liferay.portal.kernel.exception.SystemException {
221         return getService().hasPortlet(companyId, portletId);
222     }
223 
224     public static void initEAR(javax.servlet.ServletContext servletContext,
225         java.lang.String[] xmls,
226         com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
227         getService().initEAR(servletContext, xmls, pluginPackage);
228     }
229 
230     public static java.util.List<com.liferay.portal.model.Portlet> initWAR(
231         java.lang.String servletContextName,
232         javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
233         com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
234         return getService()
235                    .initWAR(servletContextName, servletContext, xmls,
236             pluginPackage);
237     }
238 
239     public static com.liferay.portal.model.Portlet updatePortlet(
240         long companyId, java.lang.String portletId, java.lang.String roles,
241         boolean active)
242         throws com.liferay.portal.kernel.exception.SystemException {
243         return getService().updatePortlet(companyId, portletId, roles, active);
244     }
245 
246     public static PortletLocalService getService() {
247         if (_service == null) {
248             _service = (PortletLocalService)PortalBeanLocatorUtil.locate(PortletLocalService.class.getName());
249         }
250 
251         return _service;
252     }
253 
254     public void setService(PortletLocalService service) {
255         _service = service;
256     }
257 
258     private static PortletLocalService _service;
259 }