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      public static java.util.List<Object> dynamicQuery(
62          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
63          throws com.liferay.portal.kernel.exception.SystemException {
64          return getService().dynamicQuery(dynamicQuery);
65      }
66  
67      public static java.util.List<Object> dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69          int end) throws com.liferay.portal.kernel.exception.SystemException {
70          return getService().dynamicQuery(dynamicQuery, start, end);
71      }
72  
73      public static com.liferay.portal.model.Portlet getPortlet(long id)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          return getService().getPortlet(id);
77      }
78  
79      public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
80          int start, int end)
81          throws com.liferay.portal.kernel.exception.SystemException {
82          return getService().getPortlets(start, end);
83      }
84  
85      public static int getPortletsCount()
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().getPortletsCount();
88      }
89  
90      public static com.liferay.portal.model.Portlet updatePortlet(
91          com.liferay.portal.model.Portlet portlet)
92          throws com.liferay.portal.kernel.exception.SystemException {
93          return getService().updatePortlet(portlet);
94      }
95  
96      public static com.liferay.portal.model.Portlet updatePortlet(
97          com.liferay.portal.model.Portlet portlet, boolean merge)
98          throws com.liferay.portal.kernel.exception.SystemException {
99          return getService().updatePortlet(portlet, merge);
100     }
101 
102     public static void checkPortlet(com.liferay.portal.model.Portlet portlet)
103         throws com.liferay.portal.kernel.exception.PortalException,
104             com.liferay.portal.kernel.exception.SystemException {
105         getService().checkPortlet(portlet);
106     }
107 
108     public static void checkPortlets(long companyId)
109         throws com.liferay.portal.kernel.exception.PortalException,
110             com.liferay.portal.kernel.exception.SystemException {
111         getService().checkPortlets(companyId);
112     }
113 
114     public static com.liferay.portal.model.Portlet deployRemotePortlet(
115         com.liferay.portal.model.Portlet portlet, java.lang.String categoryName)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService().deployRemotePortlet(portlet, categoryName);
118     }
119 
120     public static void destroyRemotePortlet(
121         com.liferay.portal.model.Portlet portlet) {
122         getService().destroyRemotePortlet(portlet);
123     }
124 
125     public static void destroyPortlet(com.liferay.portal.model.Portlet portlet) {
126         getService().destroyPortlet(portlet);
127     }
128 
129     public static java.util.List<com.liferay.portlet.expando.model.CustomAttributesDisplay> getCustomAttributesDisplays() {
130         return getService().getCustomAttributesDisplays();
131     }
132 
133     public static com.liferay.portal.model.PortletCategory getEARDisplay(
134         java.lang.String xml)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getService().getEARDisplay(xml);
137     }
138 
139     public static com.liferay.portal.model.PortletApp getPortletApp(
140         java.lang.String servletContextName) {
141         return getService().getPortletApp(servletContextName);
142     }
143 
144     public static com.liferay.portal.model.PortletCategory getWARDisplay(
145         java.lang.String servletContextName, java.lang.String xml)
146         throws com.liferay.portal.kernel.exception.SystemException {
147         return getService().getWARDisplay(servletContextName, xml);
148     }
149 
150     public static java.util.List<com.liferay.portal.model.Portlet> getFriendlyURLMapperPortlets() {
151         return getService().getFriendlyURLMapperPortlets();
152     }
153 
154     public static java.util.List<com.liferay.portal.kernel.portlet.FriendlyURLMapper> getFriendlyURLMappers() {
155         return getService().getFriendlyURLMappers();
156     }
157 
158     public static com.liferay.portal.model.Portlet getPortletById(
159         java.lang.String portletId) {
160         return getService().getPortletById(portletId);
161     }
162 
163     public static com.liferay.portal.model.Portlet getPortletById(
164         long companyId, java.lang.String portletId)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getService().getPortletById(companyId, portletId);
167     }
168 
169     public static com.liferay.portal.model.Portlet getPortletByStrutsPath(
170         long companyId, java.lang.String strutsPath)
171         throws com.liferay.portal.kernel.exception.SystemException {
172         return getService().getPortletByStrutsPath(companyId, strutsPath);
173     }
174 
175     public static java.util.List<com.liferay.portal.model.Portlet> getPortlets() {
176         return getService().getPortlets();
177     }
178 
179     public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
180         long companyId)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getService().getPortlets(companyId);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
186         long companyId, boolean showSystem, boolean showPortal)
187         throws com.liferay.portal.kernel.exception.SystemException {
188         return getService().getPortlets(companyId, showSystem, showPortal);
189     }
190 
191     public static boolean hasPortlet(long companyId, java.lang.String portletId)
192         throws com.liferay.portal.kernel.exception.SystemException {
193         return getService().hasPortlet(companyId, portletId);
194     }
195 
196     public static void initEAR(javax.servlet.ServletContext servletContext,
197         java.lang.String[] xmls,
198         com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
199         getService().initEAR(servletContext, xmls, pluginPackage);
200     }
201 
202     public static java.util.List<com.liferay.portal.model.Portlet> initWAR(
203         java.lang.String servletContextName,
204         javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
205         com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
206         return getService()
207                    .initWAR(servletContextName, servletContext, xmls,
208             pluginPackage);
209     }
210 
211     public static com.liferay.portal.model.Portlet newPortlet(long companyId,
212         java.lang.String portletId) {
213         return getService().newPortlet(companyId, portletId);
214     }
215 
216     public static com.liferay.portal.model.Portlet updatePortlet(
217         long companyId, java.lang.String portletId, java.lang.String roles,
218         boolean active)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getService().updatePortlet(companyId, portletId, roles, active);
221     }
222 
223     public static PortletLocalService getService() {
224         if (_service == null) {
225             _service = (PortletLocalService)PortalBeanLocatorUtil.locate(PortletLocalService.class.getName());
226         }
227 
228         return _service;
229     }
230 
231     public void setService(PortletLocalService service) {
232         _service = service;
233     }
234 
235     private static PortletLocalService _service;
236 }